/* Properties page – checkbox dropdown search filters */

.ul-property-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: clamp(14px, 1.15vw, 22px);
    margin-bottom: clamp(25px, 2.1vw, 40px);
    background-color: var(--white);
    border-radius: 18px;
    box-shadow: 0 10px 40px rgba(0, 9, 41, 0.05);
    position: relative;
    z-index: 5;
}

/* heading above the keyword search */
.ul-property-filters-heading {
    flex: 0 0 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 4px 2px clamp(14px, 1.05vw, 20px);
    margin-bottom: 4px;
    border-bottom: 1px solid #E6EBF2;
}

.ul-property-filters-heading .sub-title {
    color: var(--ul-primary);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.ul-property-filters-heading .title {
    margin: 0;
    color: #4B6A8F;
    font-size: clamp(17px, 1.1vw, 21px);
    font-weight: 500;
    line-height: 1.25;
}

/* full-width keyword search */
.ul-property-filters-keyword {
    flex: 0 0 100%;
    position: relative;
}

.ul-property-filters-keyword i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    line-height: 1;
    color: #8C8C8C;
    pointer-events: none;
}

.ul-property-filters-keyword input {
    width: 100%;
    height: 46px;
    padding: 0 16px 0 44px;
    background-color: #F4F6FA;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--ul-black);
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.ul-property-filters-keyword input::placeholder {
    color: #8C8C8C;
}

.ul-property-filters-keyword input:hover {
    background-color: #EEF1F6;
}

.ul-property-filters-keyword input:focus {
    outline: none;
    background-color: var(--white);
    border-color: var(--ul-primary);
    box-shadow: 0 0 0 3px rgba(210, 163, 35, 0.12);
}

.ul-property-filters-fields {
    flex: 1 1 0;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.ul-property-filter {
    position: relative;
}

.ul-property-filter-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    height: 46px;
    padding: 0 16px;
    background-color: #F4F6FA;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #6F6F6F;
    font-size: 14px;
    text-align: left;
    transition: 0.3s ease;
}

.ul-property-filter-toggle .label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ul-property-filter-toggle .arrow {
    flex-shrink: 0;
    width: 7px;
    height: 7px;
    border-right: 1.5px solid var(--ul-black);
    border-bottom: 1.5px solid var(--ul-black);
    transform: translateY(-3px) rotate(45deg);
    transition: transform 0.3s ease;
}

.ul-property-filter-toggle:hover {
    background-color: #EEF1F6;
}

.ul-property-filter.open .ul-property-filter-toggle,
.ul-property-filter-toggle:focus-visible {
    outline: none;
    background-color: var(--white);
    border-color: var(--ul-primary);
    box-shadow: 0 0 0 3px rgba(210, 163, 35, 0.12);
}

.ul-property-filter.open .ul-property-filter-toggle .arrow {
    transform: translateY(2px) rotate(-135deg);
}

.ul-property-filter.has-value .ul-property-filter-toggle {
    color: var(--ul-black);
    font-weight: 500;
}

/* dropdown panel */
.ul-property-filter-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 100%;
    width: max-content;
    max-width: min(360px, 90vw);
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: 0 25px 50px rgba(0, 9, 41, 0.12);
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: 0.3s ease;
}

.ul-property-filter.open .ul-property-filter-dropdown {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.ul-property-filter-options {
    padding: 16px 18px 6px;
    max-height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ul-property-filter-option {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: #6B7A8C;
    font-size: 14px;
    padding-right: 20px;
    user-select: none;
}

.ul-property-filter-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ul-property-filter-option .checkbox {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border: 1px solid #C7CFD9;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s ease;
}

.ul-property-filter-option .checkbox::after {
    content: "";
    width: 5px;
    height: 9px;
    border-right: 2px solid var(--white);
    border-bottom: 2px solid var(--white);
    transform: translateY(-1px) rotate(45deg);
    opacity: 0;
}

.ul-property-filter-option input:checked + .checkbox {
    background-color: var(--ul-primary);
    border-color: var(--ul-primary);
}

.ul-property-filter-option input:checked + .checkbox::after {
    opacity: 1;
}

.ul-property-filter-option input:focus-visible + .checkbox {
    outline: 2px solid var(--ul-primary);
    outline-offset: 2px;
}

.ul-property-filter-option i {
    font-size: 18px;
    line-height: 1;
    color: #8C97A6;
    width: 20px;
    text-align: center;
}

.ul-property-filter-option:hover .txt {
    color: var(--ul-black);
}

.ul-property-filter-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 18px;
    margin-top: 6px;
    border-top: 1px solid #EEF1F5;
    font-size: 13px;
    color: var(--black);
}

.ul-property-filter-reset {
    background: none;
    border: 0;
    padding: 0;
    color: var(--ul-primary);
    font-size: 13px;
}

.ul-property-filter-reset:hover {
    color: var(--ul-secondary);
}

/* search button */
.ul-property-filters-submit {
    flex-shrink: 0;
    height: 46px;
    padding: 0 26px;
    background-color: var(--ul-primary);
    border: 1px solid var(--ul-primary);
    border-radius: 10px;
    color: var(--white);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    white-space: nowrap;
    transition: 0.3s ease;
}

.ul-property-filters-submit:hover {
    background-color: var(--ul-secondary);
    border-color: var(--ul-secondary);
}

/* responsive */
@media screen and (max-width: 991px) {
    .ul-property-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .ul-property-filters-fields {
        flex: none;
        grid-template-columns: repeat(2, 1fr);
    }

    /* right-hand column opens towards the left */
    .ul-property-filter:nth-child(2n) .ul-property-filter-dropdown {
        left: auto;
        right: 0;
    }
}

@media screen and (max-width: 575px) {
    .ul-property-filters-fields {
        grid-template-columns: 1fr;
    }

    .ul-property-filter:nth-child(2n) .ul-property-filter-dropdown {
        left: 0;
        right: auto;
    }

    .ul-property-filter-dropdown {
        width: 100%;
        max-width: none;
    }
}


/* ---------- results heading + sort ---------- */
.ul-property-results-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px 30px;
    padding-bottom: clamp(18px, 1.31vw, 25px);
    margin-bottom: clamp(20px, 1.84vw, 35px);
    border-bottom: 1px solid #D5DEEA;
}

.ul-property-results-heading {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ul-property-results-heading .title {
    color: var(--ul-primary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: clamp(15px, 1.05vw, 20px);
    letter-spacing: 0.3px;
}

.ul-property-results-heading .sub-title {
    color: #6B7A8C;
    font-size: clamp(14px, 0.95vw, 17px);
}

.ul-property-sort {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ul-property-sort a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 36px;
    padding: 0 14px;
    background-color: var(--white);
    border: 1px solid #D5DEEA;
    border-radius: 6px;
    color: #6B7A8C;
    font-size: 13px;
    transition: 0.3s ease;
}

.ul-property-sort a i {
    font-size: 0.8em;
    line-height: 1;
}

.ul-property-sort a i.up {
    transform: rotate(180deg);
}

.ul-property-sort a:hover,
.ul-property-sort a.active {
    border-color: var(--ul-primary);
    color: var(--ul-primary);
}

/* ---------- property card additions (theme .ul-project card) ---------- */
.ul-project-excerpt {
    color: #6B7A8C;
    font-size: clamp(13px, 0.84vw, 15px);
    line-height: 1.6;
    margin: 0 0 clamp(12px, 0.95vw, 18px);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* equal-height cards: stretch each card and pin the info row to the bottom */
.ul-projects-page-content-wrapper .ul-bs-row > .col,
.ul-property-details-similar .ul-bs-row > .col,
.ul-properties .ul-tab .ul-bs-row > .col {
    display: flex;
}

.ul-projects-page-content-wrapper .ul-project,
.ul-property-details-similar .ul-project,
.ul-properties .ul-tab .ul-project {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.ul-projects-page-content-wrapper .ul-project-txt,
.ul-property-details-similar .ul-project-txt,
.ul-properties .ul-tab .ul-project-txt {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.ul-projects-page-content-wrapper .ul-project-infos,
.ul-property-details-similar .ul-project-infos,
.ul-properties .ul-tab .ul-project-infos {
    margin-top: auto;
}

/* keep titles to max 2 lines so cards stay consistent */
.ul-projects-page-content-wrapper .ul-project-title,
.ul-property-details-similar .ul-project-title,
.ul-properties .ul-tab .ul-project-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* submit button wrapper (both variants) */
.ul-property-filters-submit-wrap {
    flex-shrink: 0;
}

@media screen and (max-width: 991px) {
    .ul-property-filters-submit-wrap .ul-property-filters-submit {
        width: 100%;
    }
}

/* ---------- home banner variant: compact bar based on the old .formsections ---------- */
.ul-banner {
    z-index: 2; /* dropdowns open over the cities section below */
}

.ul-banner-search {
    width: 100%;
}

.ul-property-filters--banner {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
    gap: 0;
    padding: 8px;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    background: #fff;
}

.ul-property-filters--banner .ul-property-filters-fields {
    display: contents;
}

.ul-property-filters--banner .ul-property-filters-keyword-cell,
.ul-property-filters--banner .ul-property-filter,
.ul-property-filters--banner .ul-property-filters-submit-wrap {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 14px 20px;
    border-left: 1px solid rgba(204, 204, 204, 0.337);
    min-width: 0;
}

/* keyword: full-width row above the dropdowns */
.ul-property-filters--banner .ul-property-filters-keyword-cell {
    grid-column: 1 / -1;
    border-left: none;
    border-bottom: 1px solid rgba(204, 204, 204, 0.337);
}

.ul-property-filters--banner .ul-property-filter:first-child {
    border-left: none;
}

.ul-property-filter-label {
    text-transform: uppercase;
    font-size: 10px;
    letter-spacing: 1px;
    font-weight: 500;
    opacity: 0.8;
    margin-bottom: 3px;
    color: var(--black);
}

.ul-property-filters-keyword-cell input {
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    color: #000;
    font-size: 13px;
    letter-spacing: 0.3px;
}

.ul-property-filters-keyword-cell input::placeholder {
    color: #000;
    opacity: 0.55;
}

.ul-property-filters-keyword-cell input:focus {
    outline: none;
}

.ul-property-filters--banner .ul-property-filter-toggle,
.ul-property-filters--banner .ul-property-filter-toggle:hover,
.ul-property-filters--banner .ul-property-filter.open .ul-property-filter-toggle,
.ul-property-filters--banner .ul-property-filter-toggle:focus-visible {
    height: auto;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: #000;
    font-size: 13px;
    letter-spacing: 0.3px;
    opacity: 0.9;
}

.ul-property-filters--banner .ul-property-filter.has-value .ul-property-filter-toggle {
    color: var(--ul-primary);
    opacity: 1;
}

.ul-property-filters--banner .ul-property-filter-toggle .arrow {
    width: 5px;
    height: 5px;
}

/* square, compact dropdown panels */
.ul-property-filters--banner .ul-property-filter-dropdown {
    top: 100%;
    border-radius: 0;
    max-width: min(300px, 90vw);
}

.ul-property-filters--banner .ul-property-filter-options {
    padding: 12px 14px 4px;
    gap: 9px;
    max-height: 260px;
}

.ul-property-filters--banner .ul-property-filter-option {
    font-size: 13px;
    gap: 8px;
}

.ul-property-filters--banner .ul-property-filter-option .checkbox {
    width: 15px;
    height: 15px;
    border-radius: 0;
}

.ul-property-filters--banner .ul-property-filter-option .checkbox::after {
    width: 4px;
    height: 8px;
}

.ul-property-filters--banner .ul-property-filter-option i {
    font-size: 15px;
    width: 16px;
}

.ul-property-filters--banner .ul-property-filter-footer {
    padding: 9px 14px;
    font-size: 12px;
}

.ul-property-filters--banner .ul-property-filter-reset {
    font-size: 12px;
}

.ul-property-filters--banner .ul-property-filters-submit {
    width: 100%;
    height: 100%;
    min-height: 40px;
    padding: 0 26px;
    border: 0;
    border-radius: 0;
    font-size: 13px;
    transition: 0.5s ease-in-out;
}

.ul-property-filters--banner .ul-property-filters-submit-wrap {
    padding: 10px 20px 10px 12px; /* right side matches the 20px cell padding on the left */
}

.ul-property-filters--banner .ul-property-filters-submit:hover {
    background: #060844;
}

@media screen and (max-width: 1000px) {
    .ul-property-filters--banner {
        grid-template-columns: repeat(2, 1fr);
    }

    .ul-property-filters--banner .ul-property-filters-keyword-cell,
    .ul-property-filters--banner .ul-property-filters-submit-wrap {
        grid-column: 1 / -1;
    }

    .ul-property-filters--banner .ul-property-filter,
    .ul-property-filters--banner .ul-property-filters-keyword-cell {
        border-bottom: 1px solid rgba(204, 204, 204, 0.337);
    }

    .ul-property-filters--banner .ul-property-filter:nth-child(2n + 1) {
        border-left: none;
    }

    .ul-property-filters--banner .ul-property-filters-submit {
        height: 38px;
    }
}

@media screen and (max-width: 500px) {
    .ul-property-filters--banner {
        grid-template-columns: 1fr;
    }

    .ul-property-filters--banner .ul-property-filter,
    .ul-property-filters--banner .ul-property-filters-submit-wrap {
        border-left: none;
    }
}

/* ---------- Properties page: square corners on the form and cards ---------- */
.ul-projects-page-content-wrapper .ul-property-filters,
.ul-projects-page-content-wrapper .ul-property-filters-keyword input,
.ul-projects-page-content-wrapper .ul-property-filter-toggle,
.ul-projects-page-content-wrapper .ul-property-filter-dropdown,
.ul-projects-page-content-wrapper .ul-property-filter-option .checkbox,
.ul-projects-page-content-wrapper .ul-property-filters-submit,
.ul-projects-page-content-wrapper .ul-property-sort a,
.ul-projects-page-content-wrapper .ul-project,
.ul-projects-page-content-wrapper .ul-project-img,
.ul-projects-page-content-wrapper .ul-project-img img,
.ul-projects-page-content-wrapper .ul-project-tag {
    border-radius: 0;
}

/* ---------- pagination + empty state ---------- */
.ul-property-pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: clamp(30px, 2.63vw, 50px);
}

.ul-property-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    background-color: var(--white);
    border: 1px solid #D5DEEA;
    color: #6B7A8C;
    font-size: 14px;
    transition: 0.3s ease;
}

.ul-property-pagination .page-numbers i {
    font-size: 11px;
    line-height: 1;
}

.ul-property-pagination .page-numbers.current,
.ul-property-pagination a.page-numbers:hover {
    background-color: var(--ul-primary);
    border-color: var(--ul-primary);
    color: var(--white);
}

.ul-property-empty {
    text-align: center;
    padding: clamp(40px, 4.2vw, 80px) 15px;
    background-color: var(--white);
    border: 1px solid #E6EBF2;
}

.ul-property-empty h3 {
    font-size: clamp(18px, 1.15vw, 22px);
    margin-bottom: 8px;
}

.ul-property-empty a {
    color: var(--ul-primary);
}

/* ---------- reset icon button (both forms) ---------- */
.ul-property-filters-submit-wrap {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.ul-property-filters-reset {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background-color: #F4F6FA;
    border: 1px solid transparent;
    color: #6B7A8C;
    transition: 0.3s ease;
}

.ul-property-filters-reset svg {
    transition: transform 0.4s ease;
}

.ul-property-filters-reset:hover {
    color: var(--ul-primary);
    border-color: var(--ul-primary);
    background-color: var(--white);
}

.ul-property-filters-reset:hover svg {
    transform: rotate(-90deg);
}

.ul-property-filters--banner .ul-property-filters-reset {
    width: 40px;
    height: auto;
    min-height: 40px;
}

@media screen and (max-width: 991px) {
    .ul-property-filters-submit-wrap .ul-property-filters-submit {
        flex: 1;
        width: auto;
    }
}

.ul-property-filters--banner .ul-property-filters-submit-wrap {
    flex-direction: row;
    align-items: stretch;
    justify-content: flex-start;
    min-width: max-content; /* the grid's "auto" column sizes to reset + search */
}

.ul-property-filters--banner .ul-property-filters-submit-wrap .ul-property-filters-submit {
    width: auto;
    flex: 1 1 auto;
    white-space: nowrap;
}

/* ---------- AJAX results loader ---------- */
.ul-property-results {
    position: relative;
    min-height: 200px;
}

.ul-property-results-inner {
    transition: opacity 0.25s ease;
}

.ul-property-results.is-loading .ul-property-results-inner {
    opacity: 0.35;
    pointer-events: none;
}

.ul-property-results-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 140px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
    pointer-events: none;
    z-index: 3;
}

.ul-property-results.is-loading .ul-property-results-loader {
    opacity: 1;
    visibility: visible;
}

.ul-property-results-loader .spinner {
    position: sticky;
    top: 45vh;
    width: 46px;
    height: 46px;
    border: 3px solid rgba(210, 163, 35, 0.2);
    border-top-color: var(--ul-primary);
    border-radius: 50%;
    animation: ul-property-spin 0.8s linear infinite;
}

@keyframes ul-property-spin {
    to {
        transform: rotate(360deg);
    }
}
