/* =====================================================
   City / Area Archive — Layout & Filter Bar Styles
   ===================================================== */

/* ── Full-width map breakout ──────────────────────────────
   The taxonomy template is inside .content_wrapper which is
   inside .container.main_wrapper. We escape both containers
   using negative margins + 100vw width.
─────────────────────────────────────────────────────────── */
/* ── Ensure parent containers don't clip the full-width breakout ── */
.content_wrapper,
.main_wrapper,
.website-wrapper {
    overflow-x: clip; /* clips horizontal scrollbar but allows negative-margin breakout */
}


.city-archive-map-hero {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-bottom: 30px;
    overflow: hidden;
}


/* Target the actual map container output by google_maps_base.php */
.city-archive-map-hero #gmap_wrapper {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    left: 0 !important;
    position: relative !important;
}

/* ── Body content stays in the readable column ──────────── */
.city-archive-body {
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* ── Breadcrumbs ── */
.city-archive-breadcrumbs {
    margin-bottom: 14px;
    font-size: 13px;
    color: #888;
}

/* ── Title + count row ── */
.city-archive-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 20px;
}
.city-archive-title {
    font-size: 26px;
    font-weight: 700;
    margin: 0;
    color: #1a1a1a;
}
.city-archive-desc {
    font-size: 14px;
    color: #666;
    margin: 4px 0 0;
}
.city-archive-count {
    font-size: 14px;
    color: #5ba99b;
    font-weight: 600;
    white-space: nowrap;
}
.city-archive-count strong {
    font-size: 20px;
    display: block;
    text-align: right;
    line-height: 1;
}

/* =====================================================
   FILTER BAR — single-line pill
   ===================================================== */

/* ── Outer wrapper ── */
.city-archive-filters {
    margin: 0 0 28px;
}

/* ── The bar ── */
.ca-filter-bar {
    display: flex;
    align-items: stretch;       /* children fill height */
    background: #fff;
    border: 1px solid #daeee9;
    border-radius: 50px;
    height: 52px;
    box-shadow: 0 2px 12px rgba(91,169,155,.10);
    overflow: visible;
    flex-wrap: nowrap;
}

/* ── Each cell ── */
.ca-filter-item {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1 1 0;
    min-width: 0;
}

/* ── Vertical separator ── */
.ca-filter-sep {
    display: block;
    width: 1px;
    flex-shrink: 0;
    background: #d8eae7;
    height: 28px;
    align-self: center;
}

/* ── Trigger button ── */
.ca-filter-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    width: 100%;
    height: 100%;
    padding: 0 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    color: #444;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color .15s;
    text-align: left;
}
.ca-filter-btn:hover,
.ca-filter-btn:focus {
    color: #5ba99b;
    outline: none;
}

/* ── Small icon from SVG (hidden if missing) ── */
.ca-filter-icon {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    opacity: .5;
}

/* Fallback icons using fontawesome — shown when SVG missing */
.ca-filter-btn::before {
    font-family: 'Font Awesome 6 Free', 'FontAwesome', sans-serif;
    font-weight: 900;
    font-size: 12px;
    color: #5ba99b;
    flex-shrink: 0;
    display: inline-block;
    width: 14px;
}
#ca-categ-wrap  .ca-filter-btn::before { content: '\f015'; }   /* home */
#ca-city-wrap   .ca-filter-btn::before { content: '\f3c5'; }   /* map-pin */
#ca-area-wrap   .ca-filter-btn::before { content: '\f3c5'; }
#ca-guests-wrap .ca-filter-btn::before { content: '\f0c0'; }   /* users */
#ca-beds-wrap   .ca-filter-btn::before { content: '\f236'; }   /* bed */
#ca-baths-wrap  .ca-filter-btn::before { content: '\f2cd'; }   /* bath */

/* Hide actual img icons — rely on FA pseudo-element */
.ca-filter-icon {
    display: none;
}

/* ── Label ── */
.ca-filter-label {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    color: #555;
}

/* ── Caret ── */
.ca-filter-caret {
    font-size: 12px;
    line-height: 1;
    color: #aaa;
    flex-shrink: 0;
    margin-left: auto;
    padding-left: 4px;
}

/* ── Dropdown panel ── */
.ca-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 180px;
    background: #fff;
    border: 1px solid #d8eae7;
    border-radius: 12px;
    box-shadow: 0 10px 32px rgba(0,0,0,.14);
    z-index: 99999;
    max-height: 280px;
    overflow-y: auto;
}
.ca-dropdown-menu.ca-open {
    display: block;
}
.ca-dropdown-menu ul {
    list-style: none;
    margin: 0;
    padding: 6px 0;
}
.ca-dropdown-menu ul li {
    padding: 10px 18px;
    font-size: 13px;
    color: #444;
    cursor: pointer;
    transition: background .12s, color .12s;
    white-space: nowrap;
}
.ca-dropdown-menu ul li:hover,
.ca-dropdown-menu ul li.ca-selected {
    background: #eef8f5;
    color: #5ba99b;
}

/* ── Price slider cell ── */
.ca-price-wrap {
    flex: 1.6 1 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 20px 0 14px;
    border-left: 1px solid #d8eae7;
}
.ca-price-currency {
    font-size: 15px;
    color: #5ba99b;
    font-weight: 700;
    flex-shrink: 0;
    line-height: 1;
}
.ca-price-slider-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.ca-price-label {
    font-size: 11px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── jQuery UI slider — teal style ── */
#ca-price-slider.ui-slider {
    height: 3px !important;
    background: #daeee9 !important;
    border: none !important;
    border-radius: 3px !important;
    margin: 0 !important;
    cursor: pointer;
}
#ca-price-slider .ui-slider-range {
    background: #5ba99b !important;
    border-radius: 3px !important;
}
#ca-price-slider .ui-slider-handle {
    width: 16px !important;
    height: 16px !important;
    top: -7px !important;
    margin-left: -8px !important;
    background: #5ba99b !important;
    border: 2px solid #fff !important;
    border-radius: 50% !important;
    box-shadow: 0 1px 5px rgba(91,169,155,.5) !important;
    cursor: grab !important;
}
#ca-price-slider .ui-slider-handle:focus {
    outline: none !important;
}

/* ── Property grid ── */
.city-archive-grid {
    transition: opacity .2s;
}

/* ── Pagination ── */
.city-archive-pagination {
    margin-top: 30px;
    text-align: center;
}

/* ── Responsive ── */
@media (max-width: 991px) {
    .ca-filter-bar {
        height: auto;
        flex-direction: column;
        border-radius: 16px;
        overflow: visible;
    }
    .ca-filter-item,
    .ca-price-wrap {
        width: 100%;
        border-left: none !important;
        border-bottom: 1px solid #eaf2f0;
    }
    .ca-filter-sep { display: none; }
    .ca-filter-btn { height: 48px; }
    .ca-price-wrap {
        padding: 12px 18px;
        border-bottom: none;
    }
    .ca-dropdown-menu { min-width: 100%; }
}

/* Kingscliff archive polish: full-width map, stable heading, mint filter panel */
.content_wrapper,
.main_wrapper,
.website-wrapper {
    overflow-x: visible;
}

body.tax-property_city,
body.tax-property_area {
    overflow-x: hidden;
}

.city-archive-map-hero {
    width: 100vw;
    max-width: 100vw;
    left: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-bottom: 34px;
    clear: both;
}

.city-archive-map-hero #gmap_wrapper,
.city-archive-map-hero #googleMap,
.city-archive-map-hero #google_map_prop_list_wrapper,
.city-archive-map-hero .gmap_wrapper {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 0 !important;
}

.city-archive-body {
    width: 100%;
    max-width: 1390px;
    margin: 0 auto;
    padding: 0 24px;
    clear: both;
    float: none;
    box-sizing: border-box;
}

.city-archive-header {
    align-items: flex-end;
    gap: 24px;
    width: 100%;
    margin-bottom: 22px;
    clear: both;
}

.city-archive-title-group {
    flex: 1 1 auto;
    min-width: 0;
    float: none;
}

.city-archive-title {
    display: block;
    float: none;
    width: auto;
    max-width: none;
    margin: 0;
    color: #3a4135;
    font-family: "Outfit", sans-serif;
    font-size: 34px;
    font-weight: 500;
    line-height: 1.18;
    letter-spacing: 0;
    overflow-wrap: normal;
    word-break: normal;
}

.city-archive-desc {
    color: #5d6475;
    font-family: "Outfit", sans-serif;
}

.city-archive-count {
    flex: 0 0 auto;
    color: #6db5aa;
    font-family: "Outfit", sans-serif;
    font-size: 13px;
    font-weight: 500;
    text-align: right;
}

.city-archive-count strong {
    font-size: 22px;
}

.ca-filter-bar {
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 82px;
    height: auto;
    padding: 16px 18px;
    background: #F0F7F6FA;
    border: 1px solid rgba(109, 181, 170, 0.16);
    border-radius: 10px;
    box-shadow: 0 2px 11px 0 rgba(109, 181, 170, 0.14);
    box-sizing: border-box;
}

.ca-filter-item {
    flex: 1 1 150px;
    min-width: 135px;
    height: 48px;
    background: #fff;
    border: 1px solid rgba(109, 181, 170, 0.22);
    border-radius: 8px;
    box-sizing: border-box;
}

.ca-filter-sep {
    display: none;
}

.ca-filter-btn {
    gap: 11px;
    padding: 0 14px 0 16px;
    color: #3a4135;
    font-family: "Outfit", sans-serif;
    font-size: 14px;
}

.ca-filter-btn:hover,
.ca-filter-btn:focus {
    color: #6db5aa;
}

.ca-filter-btn::before {
    width: 16px;
    color: #6db5aa;
    font-size: 13px;
    text-align: center;
}

.ca-filter-label {
    color: #3a4135;
    font-size: 14px;
    font-weight: 400;
}

.ca-filter-caret {
    color: #3a4135;
}

.ca-price-wrap {
    flex: 0 1 190px;
    min-width: 188px;
    height: 48px;
    padding: 0 14px 0 16px;
    background: #fff;
    border: 1px solid rgba(109, 181, 170, 0.22);
    border-radius: 8px;
}

.ca-price-currency {
    color: #6db5aa;
}

.ca-price-slider-wrap {
    gap: 8px;
}

.ca-price-label {
    order: -1;
    color: #3a4135;
    font-family: "Outfit", sans-serif;
    font-size: 13px;
    font-weight: 500;
}

#ca-price-slider.ui-slider {
    background: rgba(109, 181, 170, 0.22) !important;
}

#ca-price-slider .ui-slider-range {
    background: #6db5aa !important;
}

#ca-price-slider .ui-slider-handle {
    background: #6db5aa !important;
    box-shadow: 0 2px 8px rgba(109, 181, 170, 0.36) !important;
}

@media (max-width: 991px) {
    .ca-filter-bar {
        flex-direction: row;
        flex-wrap: wrap;
        min-height: 0;
        border-radius: 10px;
    }

    .ca-filter-item,
    .ca-price-wrap {
        flex: 1 1 calc(50% - 8px);
        width: auto;
        border: 1px solid rgba(109, 181, 170, 0.22) !important;
    }
}

@media (max-width: 767px) {
    .city-archive-body {
        padding: 0 16px;
    }

    .city-archive-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .city-archive-title {
        font-size: 28px;
    }

    .city-archive-count,
    .city-archive-count strong {
        text-align: left;
    }

    .ca-filter-item,
    .ca-price-wrap {
        flex: 1 1 100%;
        width: 100%;
    }
}

#ca-area-wrap,
#ca-area-menu {
    display: none !important;
}

/* Mobile filter drawer */
@media (max-width: 767px) {
    body.kingscliff-filter-drawer-open {
        overflow: hidden;
    }

    .kingscliff-filter-toggle {
        position: fixed;
        top: 95%;
        right: 10px;
        bottom: auto;
        z-index: 100001;
        display: grid;
        place-items: center;
        width: 40px;
        height: 40px;
        min-height: 40px;
        padding: 0;
        transform: translateY(-50%);
        border: 0;
        border-radius: 50%;
        background: #6db5aa;
        color: #fff;
        box-shadow: 0 5px 18px rgba(32, 54, 51, 0.22);
        font-family: "Outfit", sans-serif;
        font-size: 0;
        font-weight: 600;
        cursor: pointer;
    }

    .kingscliff-filter-toggle-icon {
        font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", FontAwesome, sans-serif;
        margin: 0;
        font-size: 18px;
        font-weight: 900;
        margin-top: 11px;
    }

    .kingscliff-filter-backdrop {
        position: fixed;
        inset: 0;
        z-index: 100002;
        background: rgba(32, 54, 51, 0.42);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
    }

    .kingscliff-filter-backdrop.is-visible {
        opacity: 1;
        pointer-events: auto;
    }

    .kingscliff-filter-drawer {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        z-index: 100003;
        display: flex;
        flex-direction: column;
        width: min(88vw, 360px);
        max-width: 100%;
        background: #f0f7f6;
        box-shadow: -12px 0 35px rgba(32, 54, 51, 0.18);
        transform: translateX(100%);
        transition: transform 0.28s ease;
    }

    .kingscliff-filter-drawer.is-open {
        transform: translateX(0);
    }

    .kingscliff-filter-drawer-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 70px;
        padding: 0 20px;
        border-bottom: 1px solid rgba(109, 181, 170, 0.2);
        background: #fff;
        color: #3a4135;
        font-family: "Outfit", sans-serif;
        font-size: 18px;
    }

    .kingscliff-filter-close {
        display: grid;
        place-items: center;
        width: 34px;
        height: 34px;
        border: 0;
        border-radius: 50%;
        background: #edf6f6;
        color: #203633;
        font-size: 24px;
        line-height: 1;
        cursor: pointer;
    }

    .kingscliff-filter-drawer-body {
        flex: 1;
        overflow-y: auto;
        padding: 18px 16px 28px;
        -webkit-overflow-scrolling: touch;
    }

    .kingscliff-filter-drawer .city-archive-filters {
        margin: 0;
    }

    .kingscliff-filter-drawer .ca-filter-bar {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
        width: 100% !important;
        min-height: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent !important;
        box-shadow: none !important;
    }

    .kingscliff-filter-drawer .ca-filter-item,
    .kingscliff-filter-drawer .ca-price-wrap {
        flex: 0 0 auto !important;
        width: 100% !important;
        height: 50px !important;
        min-height: 50px !important;
        border: 1px solid rgba(109, 181, 170, 0.22) !important;
        border-radius: 10px !important;
        background: #fff !important;
    }

    .kingscliff-filter-drawer .ca-filter-btn {
        height: 48px !important;
        padding: 0 14px !important;
    }

    .kingscliff-filter-drawer .ca-price-wrap {
        display: flex;
        padding: 10px 14px !important;
    }

    .kingscliff-filter-drawer .ca-filter-sep {
        display: none !important;
    }

    .kingscliff-filter-drawer .ca-dropdown-menu {
        position: absolute;
        top: calc(100% + 6px);
        left: 0;
        width: 100%;
    }
}

@media (max-width: 420px) {
    .kingscliff-filter-toggle {
        right: 16px;
        width: 45px;
        height: 45px;
        min-height: 45px;
    }
}
