.plf-search-results--empty .plf-nearby-empty-actions {
    margin-top: 10px;
}

.plf-search-results--empty .plf-nearby-empty-action {
    display: inline-block;
    margin: 0 6px;
    padding: 6px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    color: #0f172a;
    text-decoration: none;
    background: #fff;
}

.plf-search-results--empty .plf-nearby-empty-action:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}
/* Google Maps InfoWindow: default close “X” is oversized — compact for #map only */
#map .gm-style-iw-chr {
    height: 30px !important;
    min-height: 30px !important;
    padding-top: 2px !important;
}
#map .gm-style-iw-chr button.gm-ui-hover-effect,
#map button.gm-ui-hover-effect[aria-label="Close"],
#map .gm-style-iw-tc button {
    width: 26px !important;
    height: 26px !important;
    min-width: 26px !important;
    min-height: 26px !important;
    padding: 0 !important;
    top: 2px !important;
    right: 2px !important;
}
#map .gm-style-iw-chr button.gm-ui-hover-effect img,
#map .gm-style-iw-chr button.gm-ui-hover-effect span {
    width: 12px !important;
    height: 12px !important;
}

/* ========== Mode switch: [ Property ]  Near: [ School ][ Transit ] (+ filter toolbar row) ========== */
.plf-filter-toolbar-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.65rem 1rem;
    margin: 0 0 0.5rem;
}
.plf-filter-toolbar-row .property-search-menu-container.plf-mode-segmented {
    flex: 1 1 auto;
    margin: 0;
    min-width: min(100%, 380px);
}
/* Row layout: reserve min *width* for toolbar. Do NOT use flex-basis 260px — under max-width:640px the row
   becomes flex-direction:column, and flex-basis becomes *height*, causing ~260px ghost height on .plf-filter-toolbar. */
.plf-filter-toolbar-row .plf-filter-toolbar {
    flex: 1 1 auto;
    min-width: min(100%, 260px);
    min-height: 0;
    margin-top: 0;
    margin-bottom: 0;
}
/* School/Station: global mode strip only (no Hide filters on same row) */
.plf-global-mode-row--standalone {
    margin-bottom: 0.25rem;
}
/* Property search: For Sale / For Rent (Phase 2; preserves other GET filters). */
.plf-business-mode-toggle {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.75rem;
    margin: 0.35rem 0 0.65rem;
}
.plf-business-mode-toggle__label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #64748b;
    user-select: none;
}
.plf-business-mode-toggle__nav {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 2px;
    padding: 3px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}
.plf-business-mode-toggle .plf-business-mode-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.85rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: background 0.15s ease, color 0.15s ease;
}
.plf-business-mode-toggle .plf-business-mode-tab:hover {
    background: #f1f5f9;
    color: #0f172a;
}
.plf-business-mode-toggle .plf-business-mode-tab.active {
    background: linear-gradient(180deg, #ffffff 0%, #e2e8f0 100%);
    border-color: #cbd5e1;
    color: #0f172a;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
.property-search-menu-container.plf-mode-segmented {
    margin-bottom: 0;
}
.plf-mode-segmented__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1rem;
}
.plf-mode-segmented__group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem 0.5rem;
}
.plf-mode-segmented__group--primary {
    flex: 0 0 auto;
}
.plf-mode-segmented__group--near {
    flex: 0 1 auto;
    align-items: center;
    padding: 2px 3px 2px 8px;
    border-radius: 10px;
    border: 1px solid #e8edf2;
    background: #f8fafc;
}
.plf-mode-segmented__near-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #64748b;
    white-space: nowrap;
    user-select: none;
}
.plf-mode-segmented__nav {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 2px;
    padding: 3px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}
.plf-mode-segmented__nav--primary {
    border-color: #cbd5e1;
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}
.plf-mode-segmented__nav--secondary {
    border: none;
    background: transparent;
    padding: 1px;
    box-shadow: none;
    gap: 3px;
}
.plf-mode-segmented .menu-link.plf-mode-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.95rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    white-space: nowrap;
}
/* Primary: MLS Property search */
.plf-mode-segmented .menu-link.plf-mode-tab--primary {
    padding: 0.55rem 1.15rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
}
.plf-mode-segmented .menu-link.plf-mode-tab--primary:hover {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.92);
}
.plf-mode-segmented .menu-link.plf-mode-tab--primary.active {
    color: #fff;
    background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
    border-color: #1d4ed8;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
}
/* Secondary: proximity anchor modes */
.plf-mode-segmented .menu-link.plf-mode-tab--secondary {
    padding: 0.42rem 0.8rem;
    font-size: 0.84rem;
    font-weight: 600;
    color: #64748b;
    background: rgba(255, 255, 255, 0.65);
    border-color: #e2e8f0;
}
.plf-mode-segmented .menu-link.plf-mode-tab--secondary:hover {
    color: #334155;
    background: #fff;
    border-color: #cbd5e1;
}
.plf-mode-segmented .menu-link.plf-mode-tab--secondary.active {
    color: #0f172a;
    background: #fff;
    border-color: #94a3b8;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
@media (max-width: 640px) {
    .plf-mode-segmented__row {
        flex-direction: column;
        align-items: stretch;
    }
    .plf-mode-segmented__group--near {
        padding: 6px 8px;
    }
    .plf-mode-segmented__nav--secondary {
        width: 100%;
        justify-content: stretch;
    }
    .plf-mode-segmented .menu-link.plf-mode-tab--secondary {
        flex: 1 1 0;
        min-width: 0;
        padding: 0.45rem 0.4rem;
        font-size: 0.78rem;
    }
    .plf-mode-segmented .menu-link.plf-mode-tab--primary {
        width: 100%;
        justify-content: center;
    }
}

/* Stacked toolbar row (≤768px): column flex makes flex-basis apply to height — keep toolbar height = content only. */
@media (max-width: 768px) {
    .plf-filter-toolbar-row {
        flex-direction: column;
        align-items: stretch;
    }

    .plf-filter-toolbar-row .plf-filter-toolbar {
        flex: 0 0 auto !important;
        min-width: 0 !important;
        min-height: 0 !important;
        width: 100%;
    }
}

/* School/Station page: list vs property panel (replaces icon-only switcher) */
.plf-panel-toggle-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem 0.65rem;
    margin: 0 0 0.75rem;
    justify-content: flex-end;
}
.plf-panel-toggle-bar--secondary {
    margin-top: 0;
    margin-bottom: 0.65rem;
    padding: 0.4rem 0 0.55rem;
    border-top: 1px solid #e8edf2;
    justify-content: flex-start;
}
.plf-panel-toggle-bar__label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    margin-right: 0.1rem;
    white-space: nowrap;
    align-self: center;
}
.plf-panel-toggle-bar--secondary .plf-panel-toggle {
    padding: 0.35rem 0.75rem;
    font-size: 0.8125rem;
}
.plf-panel-toggle {
    padding: 0.45rem 0.95rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.plf-panel-toggle:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}
.plf-panel-toggle.active {
    color: #1d4ed8;
    background: #eff6ff;
    border-color: #93c5fd;
}
.plf-panel-toggle:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Intro heading + blurb (rendered before #propertyFilterForm so filters do not stack over this text) */
.plf-search-messages {
    padding: 0 20px;
    margin: 0 0 0.3rem;
    box-sizing: border-box;
    max-width: 100%;
}
.plf-search-messages h3 {
    margin: 0 0 0.35rem;
    line-height: 1.3;
}
.plf-search-messages p {
    margin: 0;
    line-height: 1.45;
}

/* Phase 4.5A: Active search summary (read-only, GET-driven) */
.plf-active-filters-summary {
    margin: 0 20px 0.45rem;
    padding: 8px 12px;
    max-width: 100%;
    box-sizing: border-box;
    background: #f4f8fc;
    border: 1px solid #d9e6f2;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.45;
    color: #1a2b3c;
}
.plf-active-filters-summary__title {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 0.92em;
}
.plf-active-filters-summary__chips {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0;
}
.plf-active-filters-summary__sep {
    color: #6c757d;
    user-select: none;
}
.plf-summary-chip {
    white-space: nowrap;
}
.plf-active-filters-summary__hint {
    margin: 6px 0 0;
    font-size: 0.9em;
    color: #495057;
    line-height: 1.35;
}
.plf-active-filters-summary__list {
    margin: 0;
    padding-left: 1.15rem;
    list-style: disc;
}
.plf-active-filters-summary__list li {
    margin: 0.12em 0;
}

/* School/Station: avoid POI table flash before map/property panel (first paint) */
.plf-hide-poi-table #schoolSearch,
.plf-hide-poi-table #stationSearch {
    display: none;
}

/* Mobile: collapse filter block; desktop unchanged */
.plf-mobile-only {
    display: none;
}
@media (max-width: 767px) {
    .plf-mobile-only {
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
    }
    .plf-filter-toggle {
        margin: 0 0 10px;
        padding: 8px 12px;
        font-size: 14px;
        font-weight: 600;
        border: 1px solid #ced4da;
        border-radius: 6px;
        background: #fff;
        color: #1a2b3c;
        cursor: pointer;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        justify-content: center;
    }
    .plf-filter-toggle:focus {
        outline: 2px solid #007bff;
        outline-offset: 2px;
    }
    .plf-filter-panel-shell:not(.plf-filter-open) .plf-filter-panel-body {
        display: none;
    }
    .plf-filter-panel-shell.plf-filter-open .plf-filter-panel-body {
        display: block;
    }
}
@media (min-width: 768px) {
    .plf-filter-toggle.plf-mobile-only {
        display: none !important;
    }
    .plf-filter-panel-body {
        display: block !important;
    }
}

.plf-section-title {
    margin: 0 0 0.35rem;
    line-height: 1.3;
}
.plf-section-help {
    margin: 0 0 0.75rem;
    font-size: 0.95em;
    color: #495057;
    line-height: 1.45;
}

/* Phase 4.5B: shared anchor radius + proximity filter (inside property form) */
.plf-row-anchor-proximity {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 14px 24px;
    margin-bottom: 10px;
    padding: 0 4px;
    max-width: 100%;
    box-sizing: border-box;
}
.plf-row-anchor-proximity--compact {
    gap: 8px 18px;
    margin-bottom: 6px;
    padding: 0 2px;
}
.plf-anchor-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    margin-bottom: 2px;
    color: #333;
}
.plf-anchor-select {
    min-width: 180px;
    max-width: 100%;
    font-size: 12px;
    padding: 4px 6px;
    border-radius: 4px;
    border: 1px solid #ced4da;
}
.plf-anchor-help {
    flex-basis: 100%;
    margin: 0;
    font-size: 0.82rem;
    color: #6c757d;
    line-height: 1.4;
}
.plf-anchor-help--compact {
    font-size: 0.72rem;
    color: #868e96;
    line-height: 1.3;
    margin: 2px 0 0;
}
.plf-anchor-tip {
    flex-basis: 100%;
    margin: 4px 0 0;
    font-size: 0.78rem;
    color: #868e96;
    font-style: italic;
    line-height: 1.35;
}
.plf-anchor-select option:disabled {
    color: #adb5bd;
}

/* School/Station page: CTA aligns end of row */
.plf-panel-toggle-bar .plf-cta-property-search {
    margin-left: auto;
}
.plf-cta-property-search {
    padding: 8px 14px;
    font-size: 0.95em;
    background: #007bff;
    color: #fff;
    border: 1px solid #0069d9;
    border-radius: 6px;
    cursor: pointer;
}
.plf-cta-property-search:hover {
    background: #0069d9;
    color: #fff;
}
.plf-cta-property-search i {
    margin-right: 6px;
}

.hidden {
    display: none;
}

.range-slider-container {
    margin: 10px 0;
}

.range-value {
    margin: 10px 0;
}

.limit-marker {
    margin: 0 10px;
}

.limit-marker.left {
    text-align: left;
}

.limit-marker.right {
    text-align: right;
}

/* ========== PLF: Property Listing Filter – plugin-owned namespaced layout ========== */
.plf-root {
    box-sizing: border-box;
}
.plf-root *,
.plf-root *::before,
.plf-root *::after {
    box-sizing: border-box;
}

.plf-layout {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    max-width: 100%;
    overflow: visible;
}

.plf-main {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    flex: 1 1 auto;
    min-width: 0;
}

.plf-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.plf-row-filters {
    max-width: 100%;
    overflow: visible;
}

.plf-row-address {
    margin-bottom: 6px;
}

.plf-root .plf-address-container {
    margin: 0 0 10px 0;
}

.plf-root .plf-address-label-wrap {
    padding: 0 10px 0 0;
}

.plf-root .plf-address-input {
    min-width: 300px;
}

@media (min-width: 769px) {
    .plf-root .plf-address-input {
        min-width: 500px;
    }
}

.plf-root .plf-distance-input {
    width: 60px;
    padding: 0 3px;
    margin: 0 5px;
}

.plf-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 13px;
    margin-top: 2px;
}

.plf-actions .filterFormButton,
.plf-actions .sortButton {
    flex-shrink: 0;
}

.plf-root .plf-filter-wrap {
    flex: 0 0 auto;
    flex-shrink: 0;
}

/* Filter box widths: stable, controlled, no extra side space */
.plf-root .plf-filter-newcity .dropdown {
    width: 180px;
    min-width: 180px;
}

.plf-root .plf-filter-propertyType .dropdown {
    width: 130px;
    min-width: 130px;
}

.plf-root .plf-filter-price .dropdown {
    width: 200px;
    min-width: 200px;
}

.plf-root .plf-filter-scope .dropdown {
    width: 180px;
    min-width: 180px;
}

.plf-root .dropdown {
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    padding: 0;
    margin: 0;
    position: relative;
    overflow: visible;
}

.plf-root .dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    min-height: 38px;
    cursor: pointer;
    min-width: 0;
    overflow: hidden;
}

.plf-root .dropdown-toggle > div {
    display: flex;
    flex-direction: row;
    align-items: center;
    min-width: 0;
    overflow: hidden;
}

.plf-root .property-display-selector-value,
.plf-root .property-display-compositeCheck-value,
.plf-root .toggle-switch-checked-label,
.plf-root .range-value {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.plf-root .dropdown-toggle .fas.fa-pencil-alt {
    margin-left: auto;
}

.plf-root .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 10080;
    margin-top: 2px;
    background-color: azure;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.plf-root .dropdown-menu.Selector {
    width: 200px;
    min-width: 200px;
    min-height: 120px;
    height: auto;
    padding: 5px;
}

.plf-root .dropdown-menu.CompositeCheckbox {
    width: 500px;
    min-width: 400px;
    max-width: min(600px, 90vw);
    min-height: 150px;
    max-height: 400px;
    height: auto;
    overflow: auto;
}

.plf-root .dropdown-menu.plf-range-menu,
.plf-root .dropdown-menu.plf-toggle-menu {
    width: 280px;
    min-width: 250px;
}

.plf-root .plf-toggle-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: row;
}

.plf-root .plf-toggle-label {
    display: flex;
    flex-direction: row;
    align-items: center;
    min-width: 0;
    overflow: hidden;
}

.plf-root .plf-range-inner {
    display: flex;
    align-items: center;
}

.plf-root .plf-range-prefix {
    padding: 0 4px 0 8px;
}

.plf-root .plf-range-suffix {
    padding: 0 8px 0 4px;
}

.plf-root .plf-range-menu {
    height: 80px;
    padding: 15px;
}

.plf-root .plf-range-markers {
    display: flex;
    flex-direction: row;
    margin: 0 0 20px 0;
}

.plf-root .plf-range-slider {
    margin: 10px 25px;
}

.plf-root .plf-toggle-menu {
    height: 80px;
    padding: 15px;
}

.plf-root .toggle-switch-container {
    margin: 10px 8px;
    font-size: 13px;
}

.plf-root .toggle-switch-label {
    padding: 0 4px;
    margin: 0 4px;
}

.plf-root .plf-column-container {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 5px;
    padding-left: 12px;
}

.plf-root .plf-nested-checkbox {
    flex: 0 0 100%;
}

.plf-root .plf-sub-any-label {
    font-weight: bold;
}

.plf-root .checkbox-column {
    box-sizing: border-box;
    padding: 2px 5px;
}

.property-display-compositeCheck-value,
.plf-root .property-display-selector-value,
.plf-root .property-display-compositeCheck-value {
    padding: 0 8px;
}

/* Action buttons: single-line, no wrapping, consistent sizing */
.plf-root .filterFormButton,
.plf-root .sortButton {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 38px;
    padding: 8px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-sizing: border-box;
}

.plf-root .plf-btn-more {
    min-width: 120px;
    width: auto;
}

.plf-sort-wrap {
    position: relative;
}

.plf-popup {
    display: none;
}

.plf-sort-dropdown {
    display: none;
    position: absolute;
    background: white;
    border: 1px solid #ddd;
    z-index: 10080;
    width: 150px;
}

.plf-sort-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.plf-sort-dropdown li {
    padding: 5px 10px;
}

.plf-sort-dropdown li a {
    text-decoration: none;
    color: black;
    display: block;
}

.plf-sort-dropdown li a.selected,
.plf-sort-dropdown li a:hover {
    background-color: #f0f0f0;
}

@media (max-width: 768px) {
    .plf-layout {
        flex-direction: column;
    }
    .plf-main {
        width: 100%;
    }
    .plf-row {
        width: 100%;
    }
    .plf-row-filters .plf-filter-wrap {
        flex: 1 1 auto;
        min-width: 140px;
    }
    .plf-root .plf-filter-newcity .dropdown,
    .plf-root .plf-filter-propertyType .dropdown,
    .plf-root .plf-filter-price .dropdown,
    .plf-root .plf-filter-scope .dropdown {
        width: 100%;
        min-width: 0;
    }
    .plf-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

/* School/Station filter forms — dropdowns */
#schoolFilterForm .dropdown,
#stationFilterForm .dropdown {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background-color: #fff;
    margin-right: 12px;
    margin-bottom: 8px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

#schoolFilterForm .dropdown-menu,
#stationFilterForm .dropdown-menu {
    width: 300px;
    background-color: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 8px 0;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}

#schoolFilterForm .dropdown-menu.Selector,
#stationFilterForm .dropdown-menu.Selector {
    width: 200px;
    height: auto;
    padding: 8px;
}

#schoolFilterForm .dropdown-toggle,
#stationFilterForm .dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    min-height: 42px;
    cursor: pointer;
    border-radius: 8px;
}

#schoolFilterForm .dropdown-menu.CompositeCheckbox,
#stationFilterForm .dropdown-menu.CompositeCheckbox {
    width: 100%;
    height: auto;
    overflow: auto;
}

#CompositeCheckbox-community {
    min-width: 600px;
}

#DropdownMenu-bedrooms {
    width: 200px;
}

.control-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

/* General styles for both views */
.property-item-container {
    border: 1px solid #ccc;
    padding: 16px;
    margin-bottom: 20px; /* Add some margin to separate each container */
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s;
    min-width: 300px; /* Adjusted for responsive design */
    /* overflow: visible; *//* Prevent overflow */
    position: relative; /* Ensure proper positioning */
}

.property-item {
    display: flex;
    flex-direction: column;
    border: 1px solid #ccc;
    padding: 16px;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s;
    min-width: 300px; /* Adjusted for responsive design */
}

.property-item:hover {
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.property-carousel {
    width: 100%;
    /* height: 300px; */ /* Ensure the carousel has a defined height */
    overflow: hidden;
    position: relative;
    z-index: 1;
    margin-bottom: 16px;
    padding-bottom: 30px; /* Adjust padding to ensure dots are visible */
}

.property-carousel img {
    width: 100%;
    height: auto; /* Maintain aspect ratio */
    display: block;
}


.property-details {
    margin-bottom: 10px;
}

.property-details h3 {
    margin-top: 0;
    margin-bottom: 8px;
    font-size: 1.2em;
}

.property-details p {
    margin: 8px 0;
}

/* Close button styling */
.property-details .close-detail {
    align-self: flex-end;
    font-size: 20px;
    cursor: pointer;
    z-index: 1000;
}

.property-details-table {
    width: 100%;
    border-collapse: collapse;
}

.property-details-table td {
    border: 1px solid #ddd;
    padding: 8px;
}

.property-details-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.property-details-table tr:hover {
    background-color: #f1f1f1;
}

.property-details-flex {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.property-details-flex-group-container {
    display: flex;
    /*justify-content: space-between;*/
    flex-wrap: wrap;
}

.property-details-flex-group  {
    display: flex;
    /*flex: 1;*/
    flex-direction: row;
    /*min-width: 100px;*/
}

.property-details-flex-group > span {
    /*flex: 1;*/
    padding: 3px 10px;
    /*min-width: 100px;*/
}

.property-details-flex-group > span:first-child {
    font-weight: bold;
    /*max-width: 100px; */
}

.schedule-containter {
    display: flex;
    flex-direction: column;
    margin: 10px 0;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 5px;
    background-color: #f9f9f9;
}

.schedule-label {
    display: flex;
    flex-direction: row;
    font-weight: bold;
    margin-bottom: 5px;
    padding-bottom: 5px;
    border-bottom: 1px solid #ccc;
}

.schedule-label span {
    flex: 2;
    text-align: center;
    padding: 5px;
}

.schedule-label .date {
    flex: 3; /* Increase the flex value */
    min-width: 100px; /* Set a minimum width */
    padding-right: 8px;
}

.schedule-group {
    display: flex;
    flex-direction: row;
    margin: 5px 0;
}

.schedule-group .date,
.schedule-group .time {
    flex: 1;
    text-align: center;
    padding: 5px;
}

.schedule-group .date {
    flex: 3; /* Increase the flex value */
    min-width: 100px; /* Set a minimum width */
    padding-right: 8px;
}

.schedule-group .time {
    background-color: #eef;
    border-radius: 3px;
}

/*
.property-details-table td:first-child {
    font-weight: bold;
    width: 30%;
}
*/

/* Make every other cell bold */
.property-details-table td:nth-child(odd) {
    font-weight: bold;
}

.property-location iframe {
    width: 100%;
    height: 250px;
    border: none;
    border-radius: 8px;
}

/* Grid view styles */
#property-listing.grid-view .property-page.active {
    display: grid; /* Show the active page as grid */
    grid-template-columns: repeat(3, 1fr);
    gap: 16px; /* Adjust as needed */
}

#property-listing.grid-view .property-page.cover-image-page.active {
    display: block;
}

#property-listing.grid-view .property-details.grid-view-details {
    display: block;
}

#property-listing.grid-view .property-details.list-view-details {
    display: none;
}


/* List view styles */
#property-listing.list-view .property-page.active{
    display: block;
}

#property-listing.list-view .property-item {
    display: flex;
    flex-direction: row-reverse;
    width: 100%;
    margin-bottom: 10px;
}

#property-listing.list-view .property-carousel {
    width: 45%; /* Adjust the width for the carousel */
}

#property-listing.list-view .property-details {
    width: 55%; /* Adjust the width for the details */
    padding-left: 16px; /* Add some padding to the left */
    margin: 10px;
}

#property-listing.list-view .property-details.list-view-details {
    display: block;
}

#property-listing.list-view .property-details.grid-view-details {
    display: none;
}

/* Map view styles */
.map-view-container {
    display: flex;
    padding: 20px;
    border: 2px solid #ccc;
    border-radius: 8px;
    background-color: #f9f9f9;
}

.map-container {
    min-width: 70%;
    height: 750px;
    border-right: 1px solid #ddd;
    padding-right: 10px;
}



.map-view-container.full-width .map-container {
    min-width: 100%;
}

.map-view-container .map-property-details-container {
    width: 100%;
    padding: 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.map-view-container.map-view.full-width .map-property-details-container {
    display: none;
}

.map-view-container.map-view .map-property-details-container {
    width: 30%;
}

.map-view-container .close-details {
    display: none;
    position: absolute;
    top: 2px;
    right: 2px;
    background: #fff;
    border: 1px solid #ccc;
    padding: 1px;
    cursor: pointer;
    border-radius: 50%;
}

.map-view-container.details-visible .close-details {
    display: block;
}

.map-view-container .item-index {
    position: absolute;
    top: 2px;
    left: 2px;
    background: lightskyblue;
    border: 1px solid #ccc;
    padding: 1px 2px;
    font-size: large;
    font-weight:bold;
    opacity: 60%;
}


#property-listing.map-view .property-page.active{
    display: block;
}

#property-listing.map-view .property-item-container {
    display: none;
}

#property-listing.map-view .property-item-container.active {
    display: block;
}


#property-listing.map-view .property-item {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 10px;
}

#property-listing.map-view .property-carousel {
    height: 350px; /* Adjust the width for the carousel */
}

#property-listing.map-view .property-details {
    padding-left: 16px; /* Add some padding to the left */
    margin: 10px;
}

#property-listing.map-view .property-details.list-view-details {
    display: block;
}

#property-listing.map-view .property-details.grid-view-details {
    display: none;
}

.property-poi {
    display: block;
}

#property-listing.grid-view .property-poi {
    display: none;
}

.feature-property-detail-group #property-listing.grid-view .property-poi {
    display: block;
}

/* Common view icon styles */
.view-icons-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 0px 5px;
}

.view-icons-container i {
    font-size: 16px;
    cursor: pointer;
    color: #333;
}

.view-icons-container i:hover {
    color: #007bff;
}

/* View toggle button styles */
.view-toggle {
    margin-bottom: 20px;
    text-align: center;
}

.view-toggle button {
    margin: 0 10px;
}

.view-toggle button.active {
    background-color: #007bff;
    color: white;
}

.view-icons-container {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.view-icons-container button {
    margin: 0 5px;
}

.view-icons-container button.active {
    background-color: #007bff;
    color: white;
}

.view-icon-button {
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
}

.view-icon-button.active {
    background-color: #ddd;
    border-radius: 5px;
}

.property-page {
    display: none; /* Pages are hidden by default */
}

/* Search-2: shared pagination bar (top + bottom, Grid/List/Map) */
/* Search-2C: scroll-margin so anchor scroll clears sticky header */
#plf-search-results {
    scroll-margin-top: 72px;
    /* Reduce viewport jump when #map / tiles change height after hash scroll (scroll anchoring). */
    overflow-anchor: none;
}

.plf-search-results {
    margin-top: 0.65rem;
    position: relative;
    z-index: 1;
}

/* Map is a later DOM sibling than the sticky pagination bar; keep map subtree below so Prev/Next stay clickable. */
.plf-search-results > .map-view-container {
    position: relative;
    z-index: 0;
}

.pagination-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    padding: 8px 0;
}

/* Search-2B: sticky top bar on desktop.
 * PLF: Must sit ABOVE filter dropdowns when sticky overlaps the form (map view). Dropdowns use z-index 10080.
 * Below WP admin bar (~99999). */
.pagination-bar-top {
    margin-bottom: 8px;
    position: sticky;
    top: 0;
    z-index: 10050;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    box-sizing: border-box;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    pointer-events: auto;
}

/*
 * Stacking: .plf-search-results follows the form in the DOM with the same z-index (1), so the
 * whole results block (pagination + map) was painting above open dropdowns. Raise the form layer
 * so .dropdown-menu (inside the form) shows above #plf-search-results. Sticky .pagination-bar-top
 * still wins vs the map inside the same results subtree (z-index 10050 vs map container 0).
 * Intro copy lives in .plf-search-messages *before* this form in the DOM so it is not covered.
 */
#propertyFilterForm.plf-root {
    position: relative;
    /* Reset theme sticky `top` after we force position:relative (otherwise a ~110px flow gap appears). */
    top: auto;
    z-index: 50;
    margin-bottom: 0.25rem;
    margin-top: 0;
}

/* Mode + filter toolbar row is a preceding sibling of the collapsible filters; stack so dropdowns are not covered */
.plf-control-panel {
    position: relative;
    overflow: visible;
}
.plf-control-panel > .plf-filter-toolbar-row,
.plf-control-panel > .plf-filter-toolbar {
    position: relative;
    z-index: 1;
}
.plf-control-panel > .plf-control-panel__collapsible {
    position: relative;
    z-index: 2;
}

/* School/Station: theme wrappers sometimes clip absolutely positioned dropdowns */
.school-property-search-container,
.station-property-search-container,
.school-property-search-container #propertySearch,
.station-property-search-container #propertySearch {
    overflow: visible;
}

/* School/Station: property panel is toggled; extra air between filters, sticky pagination, and map */
.school-property-search-container #propertySearch .plf-search-results,
.station-property-search-container #propertySearch .plf-search-results {
    margin-top: 0.85rem;
}

.school-property-search-container #propertySearch .pagination-bar-top,
.station-property-search-container #propertySearch .pagination-bar-top {
    margin-top: 0.4rem;
}

/*
 * POI school/station: mode + view rows must stay above #schoolSearch/#stationSearch content.
 * A very high z-index on the filter panel alone can paint over these rows and swallow clicks.
 */
.school-property-search-container > .plf-global-mode-row,
.school-property-search-container > .plf-panel-toggle-bar,
.station-property-search-container > .plf-global-mode-row,
.station-property-search-container > .plf-panel-toggle-bar {
    position: relative;
    z-index: 100;
}

/*
 * POI school/station: the results grid is a *following sibling* of the filter panel. Without an
 * explicit stack order, the grid paints on top and visually clips open dropdowns (internal z-index
 * does not compete with a later sibling). Keep the whole filter subtree above the grid.
 */
.school-property-search-container #schoolSearch > .plf-control-panel,
.station-property-search-container #stationSearch > .plf-control-panel {
    z-index: 10;
}
.school-property-search-container #schoolSearch > .school-grid,
.station-property-search-container #stationSearch > .table-grid {
    position: relative;
    z-index: 0;
}
.school-property-search-container #schoolSearch .plf-control-panel:not(.is-collapsed) .plf-control-panel__collapsible,
.station-property-search-container #stationSearch .plf-control-panel:not(.is-collapsed) .plf-control-panel__collapsible {
    overflow: visible;
}

@media (max-width: 768px) {
    .pagination-bar-top {
        position: relative;
        box-shadow: none;
    }
}

.pagination-bar-bottom {
    margin-top: 10px;
}

.pagination-bar .pagination-summary {
    text-align: center;
    font-weight: 500;
    margin-bottom: 0;
}

.pagination {
    clear: both;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 4px;
}

.pagination .page-button {
    margin: 0 2px;
    display: inline-block;
    padding: 6px 12px;
    text-decoration: none;
    border: 1px solid #ccc;
    background: #fff;
    color: #333;
    border-radius: 4px;
    cursor: pointer;
}

.pagination .page-button:hover {
    background: #f0f0f0;
}

.pagination .page-button.disabled {
    cursor: default;
    opacity: 0.5;
    pointer-events: none;
}

.page-button.active {
    background-color: #007bff;
    color: white;
    border: 1px solid #007bff;
}

.pagination-summary,
.pagination-summary-top {
    text-align: center;
    margin-bottom: 20px;
    font-weight: 500;
}

.pagination-summary-top {
    margin-bottom: 12px;
    margin-top: 0;
}

.pagination .page-ellipsis {
    padding: 0 4px;
    color: #666;
    user-select: none;
}

/* View Details link in property cards (Grid/List/Map) */
.property-view-details-link {
    display: inline-block;
    margin-left: 10px;
    padding: 4px 10px;
    font-size: 0.9em;
    color: #007bff;
    text-decoration: none;
    border: 1px solid #007bff;
    border-radius: 4px;
}

.property-view-details-link:hover {
    background-color: #007bff;
    color: #fff;
}

.plf-card-map-focus-link {
    display: inline-block;
    margin-left: 8px;
    padding: 4px 10px;
    font-size: 0.88em;
    font-weight: 600;
    color: #0f766e;
    text-decoration: none;
    border: 1px solid #99f6e4;
    border-radius: 4px;
    background: #f0fdfa;
}
.plf-card-map-focus-link:hover {
    background: #ccfbf1;
    color: #115e59;
}
.plf-card-map-focus-link .fas {
    margin-right: 0.35rem;
}
#property-listing.map-view .plf-card-map-focus-link {
    display: none;
}

@media (max-width: 640px) {
    .pagination .page-button {
        padding: 6px 10px;
        font-size: 0.9em;
    }
    .pagination-bar .pagination-summary {
        font-size: 0.9em;
    }
    .property-view-details-link {
        margin-left: 0;
        margin-top: 6px;
        display: block;
    }
    .plf-card-map-focus-link {
        margin-left: 0;
        margin-top: 6px;
        display: block;
    }
}

/* Feature Property Listing*/

.property-row.hidden-row {
    display: none
}

.property-row.visible-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px; /* Adjust the space between items */
}

.property-row0.visible-row {
    display: grid;
}

.feature-property-listing.hidden-row {
    display: none;
}

.feature-property-listing.visible-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px; /* Adjust the space between items */
}

.feature-property-item-container {
    flex: 1 1 calc(100% / 4 - 20px); /* For 4 columns, adjust as needed */
    box-sizing: border-box;
    margin-bottom: 20px; /* Add some space below each row */
    border: 1px solid #ddd; /* Optional: Add a border to each item */
    padding: 10px;
    background-color: #fff; /* Optional: Add a background color */
    max-width: 600px;
}

.feature-property-item-container img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto; /* Center the image */
}

.feature-property-item-container .property-item {
    text-align: center; /* Center the text */
}

.feature-property-item-container .plf-feature-card-head .plf-open-house-line {
    margin: 0.35rem 0 0;
    font-size: 0.9rem;
    text-align: left;
    width: 100%;
}

.feature-property-item-container .plf-feature-card-actions-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin-top: 0.5rem;
}

.property-image {
    margin-bottom: 10px; /* Add space below the image */
    position: relative; /* This makes the overlay position relative to this container */
    display: inline-block; /* Ensures that the image container does not stretch */
    width: 100%;
}

.property-image img {
    max-width: 100%;
    height: auto;
    border-radius: 5px; /* Optional: Add rounded corners to the images */
    display: block;
}

.overlay {
    position: absolute;
    padding: 5px 10px;
    border-radius: 5px;
    opacity: 0.8; /* Adjust for transparency */
    color: white; /* Default color, can be overridden by inline style */
    background: rgba(0, 0, 0, 0.5); /* Default background with transparency */
}

.overlay.center {
    left: 50%;
    transform: translate(-50%);
    width: 80%; /* Adjust the width to accommodate longer text */
    text-align: center; /* Center the text within the overlay */
    bottom:10%;
}

.overlay.bottom-center {
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%; /* Adjust the width to accommodate longer text */
    text-align: center; /* Center the text within the overlay */
}

.overlay.top-center {
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.overlay.top-left {
    top: 10px;
    left: 10px;
}

.overlay.top-right {
    top: 10px;
    right: 10px;
}

.overlay.bottom-left {
    bottom: 10px;
    left: 10px;
}

.overlay.bottom-right {
    bottom: 10px;
    right: 10px;
}

.property-info {
    display: flex;
    justify-content: space-between;
    /*text-align: left;*/
    font-size: 15px;
}

.read-more-container {
    text-align: center;
    margin-top: 20px;
}

.read-more-button {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
}

.read-more-container a {
	display: block;
	padding: 20px 0;
	margin: 0 auto;
	width: 40%;
	background-color: var(--wp--preset--color--vivid-cyan-blue);
	color: white;
	text-align: center;
	border-radius: 10px;    
}

.read-more-container a:hover {
	background-color: #001614;
	color: #ec9d0a;
}

.feature-property-detail-container {
    display: flex;
    flex-direction: row;
    gap: 30px; /* Adds space between the two groups */
    margin-bottom: 40px; /* Adds space at the bottom of the container */
}

.feature-property-detail-group {
    display: flex;
    flex-direction:column;
    gap: 10px; /* Adds space between elements inside the group */
    min-width: 0; /* flex: allow children (e.g. Slick) to shrink and use full width */
}

/* Feature detail: price + favorites row */
.plf-feature-detail__price-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
}

.plf-feature-detail__price-row .plf-favorites-button-wrapper {
    margin-bottom: 0;
}

/* Feature detail: ensure listing column is full width so Slick measures slide width correctly */
.feature-property-detail-container #property-listing.grid-view {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.feature-property-detail-container #property-listing.grid-view .property-page.cover-image-page {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.feature-property-detail-group .map-view-container {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.price-detail {
    /* padding: 10px;*/
    font-size: 25px;
    font-weight: bold;
}

.address-detail {
    /*padding: 10px;*/
    font-size: 18px;
}

.cover-image img {
    width: 100%;
    height: auto;
    margin-bottom: 20px; /* Space between the cover image and the carousel */
}

/* Feature listing detail: stronger hero image + gallery strip */
.feature-property-detail-container .cover-image.plf-feature-detail-cover {
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 12px;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
}

.feature-property-detail-container .plf-feature-detail-cover-img {
    display: block;
    width: 100%;
    min-height: 280px;
    max-height: min(52vh, 560px);
    height: auto;
    object-fit: cover;
    object-position: center;
    margin-bottom: 0;
}

@media (max-width: 900px) {
    .feature-property-detail-container .plf-feature-detail-cover-img {
        min-height: 220px;
        max-height: min(46vh, 420px);
    }
}

@media (max-width: 560px) {
    .feature-property-detail-container .plf-feature-detail-cover-img {
        min-height: 200px;
        max-height: 40vh;
    }
}

.feature-property-detail-group .property-carousel {
    margin-bottom: 20px;
}

/* Detail page: thumbnail strip — data-slides-to-show="1" fills column width (large single image) */
.feature-property-detail-container .property-carousel.plf-detail-thumbnail-carousel {
    padding: 12px 0 32px;
    margin-bottom: 32px;
    clear: both;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
}

.feature-property-detail-container .property-carousel.plf-detail-thumbnail-carousel .slick-list {
    overflow: hidden !important;
    margin: 0;
    padding: 4px 0 8px;
    width: 100% !important;
}

.feature-property-detail-container .property-carousel.plf-detail-thumbnail-carousel .slick-track {
    margin-left: 0;
    margin-right: 0;
}

.feature-property-detail-container .property-carousel.plf-detail-thumbnail-carousel .slick-slide {
    box-sizing: border-box;
    padding-left: 4px;
    padding-right: 4px;
}

.feature-property-detail-container .property-carousel.plf-detail-thumbnail-carousel .property-image {
    display: block;
    width: 100%;
    max-width: 100%;
    margin-bottom: 0;
}

.feature-property-detail-container .property-carousel.plf-detail-thumbnail-carousel .plf-detail-carousel-thumb {
    width: 100%;
    max-width: 100%;
    height: min(52vh, 520px);
    min-height: 280px;
    max-height: min(52vh, 520px);
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: 10px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.1);
    background: #f1f5f9;
}

@media (min-width: 901px) {
    .feature-property-detail-container .property-carousel.plf-detail-thumbnail-carousel .slick-slide {
        padding-left: 6px;
        padding-right: 6px;
    }
}

@media (max-width: 900px) {
    .feature-property-detail-container .property-carousel.plf-detail-thumbnail-carousel .plf-detail-carousel-thumb {
        min-height: 240px;
        height: min(46vh, 440px);
        max-height: min(46vh, 440px);
    }

    .feature-property-detail-container .property-carousel.plf-detail-thumbnail-carousel .slick-slide {
        padding-left: 4px;
        padding-right: 4px;
    }
}

@media (max-width: 560px) {
    .feature-property-detail-container .property-carousel.plf-detail-thumbnail-carousel .plf-detail-carousel-thumb {
        min-height: 220px;
        height: min(42vh, 380px);
        max-height: min(42vh, 380px);
    }
}

.about-home h3, .facts-features h3, .listing-details h3 {
    margin-bottom: 10px;
    font-size: 24px;
}

.about-home p {
    font-size: 16px;
    line-height: 1.5;
}

.fact-features .hosted-by {
    margin: 5px 0px;
}

.facts-features dl, .listing-details dl {
    margin: 0;
    padding: 0;
}

.facts-features dt, .listing-details dt {
    display: inline-block; /* Keep dt and dd on the same line */
    width: 200px; /* Set a fixed width for dt, adjust as needed */
    font-weight: bold;
    margin-bottom: 10px;
    vertical-align: top;
}

.facts-features dd, .listing-details dd {
    display: inline-block;
    margin-left: 0; /* Align with dt */
    margin-bottom: 10px;
    width: calc(100% - 210px); /* Adjust width based on dt's width */
    vertical-align: top;
}

.facts-features dl,
.listing-details dl {
    display: block; /* Ensures dt and dd pairs are aligned */
    margin-bottom: 10px; /* Adds space between rows */
    border-bottom: 1px solid #ddd; /* Optional divider between rows */
    padding: 5px 0;
}

.contact-us {
    text-align: center; 
}

/* Slick carousel arrows */
.slick-prev:before,
.slick-next:before {
    color: black; /* Change this to any visible color */
}

.slick-prev,
.slick-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: block;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5); /* Background for visibility */
    z-index: 2; /* Ensure the arrows are above the images */
}

.slick-prev {
    left: 10px;
}

.slick-next {
    right: 10px;
}

/* Override the default slick dots style */
.slick-dots {
    position: absolute;
    bottom: 0; /* Ensure the dots are positioned at the bottom of the carousel */
    display: block;
    width: 100%;
    padding: 10px;
    margin: 0;
    list-style: none;
    text-align: center;
    z-index: 1; /* Ensure dots are above other elements */
    background: rgba(255, 255, 255, 0.5); /* Optional: Add a background for better visibility */
}

/* Additional styling for better visibility */
.slick-dots li button:before {
    font-size: 12px;
    color: black; /* Change color to make dots more visible */
}

.slick-dots li.slick-active button:before {
    color: red; /* Change color to highlight active dot */
}



.filterFormButton {
    margin: 0px 5px; 
    height:30px; 
    width:80px;
}

.sortButton {
    cursor: pointer;
    /* padding: 5px 10px; */
    background-color: #f0f0f0;
    /* border: 1px solid #ddd; */
}

.sortDropdown {
    display: none;
    position: absolute;
    background: white;
    border: 1px solid #ddd;
    z-index: 10080;
    width: 150px;
}

.sortDropdown ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sortDropdown li {
    padding: 5px 10px;
}

.sortDropdown li a {
    text-decoration: none;
    color: black;
    display: block;
}

.sortDropdown li a.selected,
.sortDropdown li a:hover {
    background-color: #f0f0f0;
}

#sortDropdown-school {
    width: 200px;
}

#additionalFiltersPopup {
    position: fixed;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    background: #f7f7f7; /* Soft/pale background color */
    border: 1px solid #ddd;
    padding: 0; /* Remove padding to make popup-content fill the whole popup */
    z-index: 10200;
    width: 80%; /* Make the popup bigger */
    max-width: 800px;
    height: 80%; /* Increase height */
    overflow: auto; /* Enable scrolling if content overflows */
    display: none; /* Ensure the popup is hidden initially */
}

.popup-header {
    background-color: #e0e0e0;
    padding: 10px;
    cursor: move;
    display: flex;
    justify-content: flex-end;
}

/* Additional filters dialog: keep close control compact (B5) */
#additionalFiltersPopup button.plf-popup-close,
.plf-popup-close {
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    min-height: auto;
    line-height: 1.25;
    border-radius: 6px;
    border: 1px solid #94a3b8;
    background: #fff;
    color: #1e293b;
    cursor: pointer;
}
#additionalFiltersPopup button.plf-popup-close {
    margin-top: 0;
}

.popup-content {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 20px; /* Add padding here instead */
    height: 100%; /* Make popup-content fill the entire popup */
}

#additionalFiltersPopup button {
    /* align-self: flex-end; */
    margin-top: 10px;
}

.draggable {
    cursor: move;
}

/* Google Marker*/

.custom-marker {
    position: relative;
    display: inline-block;
    text-align: center;
}

.custom-marker i {
    font-size: 24px; /* Adjust the icon size as needed */
    display: block;
    margin: 0 auto;
    color: #000; /* Change the color as needed */
}

.price-label {
    font-size: 9px;
    background-color: white;
    padding: 2px 5px;
    border-radius: 3px;
    color: black;
    border: 1px solid #ccc;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.marker-label {
    background-color: white;
    border: 1px solid black;
    padding: 2px;
    font-size: 12px;
    text-align: center;
    white-space: nowrap;
}

/* Cluster fix: hide school/transit labels at low zoom to reduce bleed-through under clusters */
#map.plf-zoom-out .marker-label {
    visibility: hidden;
}

/* Cluster fix: ensure cluster icons are above school/transit overlays for reliable click target */
#map .cluster {
    z-index: 1000;
}

.search-address-container {
    display: flex;
    flex-direction: row;
    margin: 0px 0px 10px 15px;
    justify-content: space-between;
}

.search-address {
    display: flex;
    flex-direction: row;
    align-items: baseline;
}

.search-address-distance {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    padding: 0px 5px;
}

.autocomplete-container {
    position: relative;
    display: inline-block;
}

#autocomplete {
    width: 300px; /* Adjust the width as needed */
    padding-right: 30px; /* Ensure there's space for the clear button */
}

.clear-button {
    position: absolute;
    right: 10px; /* Adjust as needed */
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #999;
}

.clear-button:hover {
    color: #75bad8;
}

/*
.poi-container {
    margin-top: 10px;
    padding: 10px;
    border-top: 1px solid #ddd;
    display: none;
}

.poi-item {
    padding: 5px 0;
}

.poi-toggle {
    cursor: pointer;
    color: blue;
    text-decoration: underline;
}
*/

.poi-dropdown {
    position: relative;
    display: inline-block;
    width:100%;
    max-width: 500px;
}

.poi-dropdown-button {
    background-color: #4CAF50;
    color: white;
    padding: 16px;
    font-size: 16px;
    border: none;
    cursor: pointer;
    width: 100%;
}

.poi-dropdown-button:hover,
.poi-dropdown-button:focus {
    background-color: #3e8e41;
}

.poi-dropdown-content {
    display: none;
    position: absolute;
    width: 100%;
    background-color: #f9f9f9;
    max-height: 800px; /* Adjust as needed */
    overflow-y: auto; 
    /* min-width: 250px; */ /* Adjust as needed */
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    margin-top: 5px; /* Add a slight margin for better visibility */
}

.poi-dropdown:hover .poi-dropdown-content {
    display: block;
}

.poi-option {
    display: flex;
    justify-content: space-between;
    padding: 8px 16px;
    border-bottom: 1px solid #ddd;
}

.poi-option label {
    margin-right: 8px;
    white-space: nowrap;
}

.poi-option input[type="number"] {
    width: 60px;
}

.poi-item {
    padding: 8px;
    border-bottom: 1px solid #ddd;
}

.poi-item-distance {
    display: flex;
    justify-content: space-between;
}

.poi-item-distance > span:first-child {
    font-weight: bold;
    padding-right: 10px;
}

.poi-item-address {
    width: 100%;
    font-style: italic;
}

.poi-item:hover, .poi-item.selected-poi {
    background-color: lightskyblue;
}

.poi-results {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.poi-result-type-containter {
    display: none;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f9f9f9;
    max-width: 800px;
}

.poi-result-type-containter.selected {
    display: block;
}

.poi-result-type-label {
    font-weight: bold;
    font-size: larger;
    background-color: grey;
    color:  white;
    text-align: center;
    margin-bottom: 10px;
    padding: 5px;
}

.marker-icon {
    width: 30px;
    height: 30px;
}


.map-container-buttons-group {
    display: none;
}

.map-view-container.map-view .map-container-buttons-group {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Map toolbar: Clear Info + Search This Area (plugin-scoped) */
.map-view-container.map-view .plf-map-buttons-host {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 8px 10px 6px;
    pointer-events: none;
}
.map-view-container.map-view .plf-map-action-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
    max-width: 100%;
}
.plf-map-action-btn {
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #0f172a;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.plf-map-action-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}
.plf-map-action-btn:active {
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
}
.plf-map-action-btn:focus-visible {
    outline: 2px solid #0d9488;
    outline-offset: 2px;
}
.plf-map-action-btn--secondary {
    background: #fff;
    color: #334155;
}
.plf-map-action-btn--primary {
    background: #0d9488;
    border-color: #0f766e;
    color: #fff;
}
.plf-map-action-btn--primary:hover {
    background: #14b8a6;
    border-color: #0d9488;
    color: #fff;
}

/* Map POI layer toggles (exploration only; not listing search) */
.map-view-container.map-view .plf-map-poi-layer-bar {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-left: 4px;
    padding: 4px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    transition: opacity 0.2s ease, filter 0.2s ease;
}
.map-view-container.map-view .plf-map-poi-layer-bar.plf-map-poi-loading {
    opacity: 0.88;
    filter: grayscale(0.08);
}
.map-view-container.map-view .plf-map-poi-layer-bar__label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #64748b;
    text-transform: uppercase;
    margin-right: 2px;
}
.map-view-container.map-view .plf-map-poi-toggle {
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.map-view-container.map-view .plf-map-poi-toggle:hover {
    background: #f8fafc;
    border-color: #94a3b8;
}
.map-view-container.map-view .plf-map-poi-toggle.is-active {
    border-color: #0d9488;
    background: #ecfdf5;
    color: #0f766e;
}
.map-view-container.map-view .plf-map-poi-layer-bar.is-loading .plf-map-poi-toggle:disabled {
    opacity: 0.7;
    cursor: wait;
}
.map-view-container.map-view .plf-map-poi-layer-bar__loading {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    margin-left: 2px;
    white-space: nowrap;
}
.map-view-container.map-view .plf-map-poi-layer-bar__zoom-hint {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    margin-left: 2px;
    white-space: nowrap;
    max-width: 200px;
}
.map-view-container.map-view .plf-map-poi-iw {
    font-size: 13px;
    line-height: 1.35;
    max-width: 220px;
}
.map-view-container.map-view .plf-map-poi-iw__addr {
    color: #475569;
    font-size: 12px;
}
.map-view-container.map-view .plf-map-poi-iw__meta {
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.map-view-container.map-view .plf-map-poi-iw__type {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    margin-bottom: 2px;
}
.map-view-container.map-view .plf-map-poi-iw__type--school {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}
.map-view-container.map-view .plf-map-poi-iw__type--transit {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

/* Search This Area (map center anchor): hidden until user pans/zooms */
.map-view-container.map-view button.plf-search-this-area-btn {
    display: none;
}
.map-view-container.map-view button.plf-search-this-area-btn.plf-is-visible {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Search This Area: context banner under address (display only; SQL uses anchor_lat/lng). */
.plf-nearby-search-context {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.35;
    color: #0f172a;
    padding: 8px 10px;
    background: #ecfdf5;
    border: 1px solid #99f6e4;
    border-radius: 6px;
}

.plf-nearby-search-context strong {
    font-weight: 600;
}

/* Nearby geographic search: summary + address-as-label (legacy “Within km” hidden in PHP when nearby_enabled) */
#plf-nearby-summary.plf-nearby-summary {
    margin: 0 0 12px;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.45;
    color: #334155;
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    border-radius: 8px;
}
.plf-nearby-summary__title {
    font-weight: 700;
    font-size: 14px;
    color: #0f172a;
    margin: 0 0 8px;
}
.plf-nearby-summary__radius {
    margin: 0 0 6px;
}
.plf-nearby-summary__hint {
    margin: 0;
    font-size: 12px;
    color: #475569;
}
.plf-nearby-mode .plf-nearby-search-context {
    margin-top: 10px;
}
.plf-address-container--nearby-label .clear-button {
    display: none !important;
}
.plf-nearby-mode .plf-address-input[readonly] {
    background: #f8fafc;
    cursor: default;
}

/* Live Area Intelligence snapshot (compact POI summary; same data contract as PLF_POI_Summary_Service) */
.plf-area-intelligence {
    margin: 12px 0;
}
.plf-area-intelligence__title {
    font-weight: 700;
    font-size: 0.95rem;
    margin: 0 0 8px;
    color: #0f172a;
}
.plf-poi-highlights--embedded {
    margin-top: 0;
}
/* Placeholder categories (not yet in POI summary backend) */
.plf-poi-row--unsupported .plf-poi-label {
    color: #94a3b8;
}
.plf-poi-row--unsupported .plf-poi-value {
    color: #64748b;
    font-weight: 500;
    font-style: italic;
}
/* Supported category, no POI within radius */
.plf-poi-row--empty-match .plf-poi-value {
    color: #475569;
    font-weight: 500;
}

/* Compact POI highlights + collapsed legacy POI */
.plf-poi-highlights {
    margin: 12px 0;
    padding: 10px 12px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}
.plf-poi-highlights__title {
    font-weight: 700;
    font-size: 0.95rem;
    margin: 0 0 8px;
    color: #0f172a;
}
.plf-poi-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    font-size: 0.88rem;
    padding: 5px 0;
    border-bottom: 1px solid #eef2f7;
}
.plf-poi-row:last-of-type {
    border-bottom: none;
}
.plf-poi-label {
    color: #64748b;
}
.plf-poi-value {
    font-weight: 600;
    color: #0f172a;
}
.plf-poi-highlights__note {
    font-size: 0.78rem;
    color: #64748b;
    margin: 8px 0 0;
    line-height: 1.35;
}

/* Meaning badges (POI summary; rules in PHP from nearest distances) */
.plf-poi-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}
.plf-poi-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #334155;
    cursor: default;
    transition: opacity 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
[data-plf-lens]:not([data-plf-lens="default"]) .plf-area-intelligence .plf-poi-badge {
    opacity: 0.48;
}
[data-plf-lens="commuter"] .plf-area-intelligence .plf-poi-badge[data-plf-badge="transit-friendly"] {
    opacity: 1;
    border-color: #2563eb;
    background: #eff6ff;
    color: #1e40af;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.35);
}
[data-plf-lens="family"] .plf-area-intelligence .plf-poi-badge[data-plf-badge="school"] {
    opacity: 1;
    border-color: #15803d;
    background: #ecfdf5;
    color: #14532d;
    box-shadow: 0 0 0 1px rgba(21, 128, 61, 0.35);
}
[data-plf-lens="downsizer"] .plf-area-intelligence .plf-poi-badge[data-plf-badge="transit-friendly"],
[data-plf-lens="downsizer"] .plf-area-intelligence .plf-poi-badge[data-plf-badge="walkable"] {
    opacity: 1;
    border-color: #7c3aed;
    background: #f5f3ff;
    color: #5b21b6;
    box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.3);
}

/* Scenario lens selector (toolbar; UI-only) */
.plf-filter-toolbar-row .plf-lens-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    flex: 0 0 auto;
    flex-wrap: wrap;
}
.plf-lens-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
}
.plf-lens-select {
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 5px 8px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #0f172a;
    max-width: 160px;
}
@media (max-width: 640px) {
    .plf-filter-toolbar-row .plf-lens-wrap {
        margin-left: 0;
        width: 100%;
        justify-content: flex-end;
    }
}

.plf-poi-legacy-details {
    margin-top: 10px;
}
.plf-poi-legacy-details__summary {
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
    padding: 6px 0;
    list-style: none;
}
.plf-poi-legacy-details__summary::-webkit-details-marker {
    display: none;
}
.plf-poi-legacy-details__body {
    padding-top: 8px;
}
.property-poi--with-highlights .poi-dropdown {
    margin-top: 4px;
}

/* Map center anchor for geographic radius search */
.plf-nearby-search-anchor-pin {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #0d9488;
    border: 3px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.clear-info-window {
    display: none;
}

.map-view-container.map-view .clear-info-window {
    display: block;
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
}

.school-grid {
    display: grid;
    grid-template-columns: 30px minmax(150px, 2fr) minmax(100px, 1fr) minmax(200px, 3fr) repeat(5, minmax(100px, 1fr));
    gap: 1px;
    margin: 12px 8px 20px;
    border: 1px solid #e8edf2;
    border-radius: 10px;
    overflow: hidden;
    background: #e8edf2;
}

.school-grid-header, .school-grid-row {
    display: contents;
}

.school-grid-cell {
    padding: 12px 10px;
    border: none;
    background-color: #fff;
}

/*
.school-grid-name, .school-grid-address {
    max-width: 400px;
}

.school-grid-type, .school-grid-city, .school-grid-area, .school-grid-subArea, .school-grid-score, .school-grid-rank {
    max-width: 180px;
}
*/

.school-grid-header .school-grid-cell {
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
    font-weight: 700;
}

.school-grid-header .school-grid-cell.sortable:hover {
    cursor: pointer;
    background: #e0f2fe;
}

.school-grid-header .school-grid-cell.sortable i {
    margin-left: 5px;
}

.school-grid-cell a {
    color: #007bff;
    text-decoration: none;
}

.school-grid-cell a:hover {
    text-decoration: underline;
}

.school-grid-row.highlight {
    background-color: #e0f7fa;
}

@media (max-width: 768px) {
    .school-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .school-grid-header .school-grid-cell, .school-grid-row .school-grid-cell {
        grid-column: span 2;
    }
}


.table-grid {
    display: grid;
    grid-template-columns: 30px minmax(150px, 2fr) minmax(100px, 1fr) minmax(200px, 3fr) repeat(5, minmax(100px, 1fr));
    gap: 1px;
    margin: 12px 8px 20px;
    border: 1px solid #e8edf2;
    border-radius: 10px;
    overflow: hidden;
    background: #e8edf2;
}

#station-table-grid {
    grid-template-columns: 30px minmax(150px, 2fr) minmax(200px, 3fr);
}

.table-grid-header, .table-grid-row {
    display: contents;
}

.table-grid-cell {
    padding: 12px 10px;
    border: none;
    background-color: #fff;
}

.table-grid-header .table-grid-cell {
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
    font-weight: 700;
}

.table-grid-header .table-grid-cell.sortable:hover {
    cursor: pointer;
    background: #e0f2fe;
}

.table-grid-header .table-grid-cell.sortable i {
    margin-left: 5px;
}

.table-grid-cell a {
    color: #007bff;
    text-decoration: none;
}

.table-grid-cell a:hover {
    text-decoration: underline;
}

.table-grid-row.highlight {
    background-color: #e0f7fa;
}

/* ------------ presales --------------*/
.presales-grid.hidden-row {
    display: none
}
.presales-grid.visible-row {
	padding: 20px;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
}

.presale-container {
    /* flex: 1 1 calc(100% / 4 - 20px); */ /* For 4 columns, adjust as needed */
    box-sizing: border-box;
    margin-bottom: 20px; /* Add some space below each row */
    border: 1px solid #ddd; /* Optional: Add a border to each item */
    padding: 10px;
    background-color: #fff; /* Optional: Add a background color */
    max-width: 600px;
}
.presale {
	background-color: white;
	color: black;
	box-shadow: 0px 0px 20px #888888;
	transition: all 0.1s ease-in-out;
}
.presale:hover {
	transform: scale(1.04); 
}
.presale-image {
	position: relative;
	height: 300px;
    display: inline-block;
}
.presale-image a {
    position: relative;
    display: block;
    z-index: 10; /* Ensure link is above overlay elements */
}
.presale-image img{
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.presale-ready {
	position: absolute;
	right: 0;
	top: 0;
	background-color: rgba(0,0,0,0.5);
	padding: 5px;
	color: white;
    z-index: 5; /* Below the <a> link */
}
.presale-gradient {
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	height: 100%;
	background-image: radial-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0));
    z-index: 4; /* Below the <a> link */
}
.presale-name {
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	text-align: center;
	width: 100%;
	font-size: 3em;
	color: white;
	font-weight: normal;
	text-shadow: 0px 0px 5px #000000;
	padding: 5px;
    z-index: 10; /* Below the <a> link */
}
.presale-grid{
	padding: 5px;
	width: 100%;
	display: grid;
	grid:
	'location developer'
	'bedrooms bedrooms';
}
.presale-location {
	grid-area: location;
	font-weight: bold;
	font-size: 1.2em;
}
.presale-developer {
	grid-area: developer;
	text-align: right;
}
.presale-info {
	grid-area: bedrooms;
	margin-bottom: 5px;
	padding: 0;
}
.presale-info li {
	display: inline-block;
	border-right: 1px solid;
	padding: 0 10px 0 5px;
}
.presale-info li:first-child {
	padding-left: 0;
}

@media (max-width: 768px) {
    .table-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .table-grid-header .table-grid-cell, .table-grid-row .table-grid-cell {
        grid-column: span 2;
    }
}

/* ========== Phase A — UI/UX: map first paint (no grid flash before JS), collapsible filters, loading, polish ========== */

/* SSR view: hide map in grid/list until JS toggles; show map when container is map mode (avoids pagination flash). */
.map-view-container.grid-view #map,
.map-view-container.list-view #map {
    display: none;
}
.map-view-container.map-view #map {
    display: block;
}

/* Collapsible filter / control panels */
.plf-filter-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1rem;
    margin: 0.35rem 0 0.5rem;
    padding: 0.45rem 0.65rem;
    background: #f4f6f8;
    border: 1px solid #e2e6ea;
    border-radius: 8px;
}
.plf-keep-filters-label {
    font-size: 0.88rem;
    color: #334155;
    cursor: pointer;
    user-select: none;
}
.plf-control-panel__collapsible {
    overflow: hidden;
    max-height: 2800px;
    transition: max-height 0.38s ease, opacity 0.28s ease;
    opacity: 1;
}
/* Collapsed: max-height/opacity still reserve layout in some flex parents; display:none removes ghost height. */
.plf-control-panel.is-collapsed .plf-control-panel__collapsible {
    display: none !important;
    max-height: 0 !important;
    min-height: 0 !important;
    opacity: 0;
    pointer-events: none;
    margin: 0 !important;
    padding: 0 !important;
    border: 0;
    overflow: hidden;
}

.plf-control-panel:not(.is-collapsed) .plf-control-panel__collapsible {
    display: block !important;
}

.plf-control-panel.is-collapsed .plf-filter-toolbar {
    margin: 0 !important;
    padding: 2px !important;
}

.plf-control-panel.is-collapsed {
    padding: 0 !important;
    margin: 0 !important;
}

.plf-btn-secondary.plf-filter-toggle--bar,
.plf-filter-toggle--bar {
    font-size: 0.9rem;
    padding: 0.4rem 0.85rem;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #1e293b;
    cursor: pointer;
    font-weight: 600;
}
.plf-filter-toggle--bar:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}
.plf-filter-toggle--bar:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Results shell: loading overlay (pagination / search) */
.plf-results-shell {
    position: relative;
    min-height: 120px;
}
.plf-results-shell.plf-is-loading::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.72);
    pointer-events: none;
}
.plf-results-shell.plf-is-loading::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 45%;
    z-index: 41;
    width: 36px;
    height: 36px;
    margin: -18px 0 0 -18px;
    border: 3px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: plf-spin 0.75s linear infinite;
    pointer-events: none;
}
@keyframes plf-spin {
    to { transform: rotate(360deg); }
}

.plf-results-loading-banner {
    display: none;
    position: absolute;
    left: 50%;
    top: 45%;
    margin: 28px 0 0 0;
    transform: translateX(-50%);
    z-index: 42;
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
}
.plf-results-shell.plf-is-loading .plf-results-loading-banner {
    display: block;
}

#plf-search-results a.page-button.plf-loading-disabled {
    pointer-events: none;
    opacity: 0.45;
    cursor: not-allowed;
}

/* Tables — school / station grids (anchor lists) */
.school-property-search-container .school-grid-header,
.station-property-search-container .table-grid-header {
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #334155;
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
}
.school-property-search-container .school-grid-row:nth-child(even),
.station-property-search-container .table-grid-row:nth-child(even) {
    background: #fafbfc;
}
.school-property-search-container .school-grid-row:hover,
.station-property-search-container .table-grid-row:hover {
    background: #eff6ff;
}
.school-grid-cell,
.table-grid-cell {
    padding: 0.65rem 0.55rem;
    border-color: #e8edf2 !important;
    background-color: #fff;
}
.school-grid-header .school-grid-cell,
.table-grid-header .table-grid-cell {
    background: transparent;
    border-color: transparent !important;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}
.school-grid-checkbox,
.table-grid-checkbox,
.station-grid-checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
}
.school-property-search-container .school-grid-checkbox input[type="checkbox"],
.station-property-search-container .table-grid-checkbox input[type="checkbox"],
.station-property-search-container .station-grid-checkbox input[type="checkbox"] {
    width: 1.15rem;
    height: 1.15rem;
    min-width: 1.15rem;
    min-height: 1.15rem;
    cursor: pointer;
    margin: 0;
    accent-color: #2563eb;
}
.school-property-search-container .school-grid-row,
.station-property-search-container .table-grid-row {
    min-height: 2.75rem;
}
/* Sort control: lighter, aligned with table chrome */
#schoolFilterForm .sortButton,
#stationFilterForm .sortButton {
    font-weight: 600;
    font-size: 0.8125rem;
    padding: 0.45rem 0.85rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #334155;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
#schoolFilterForm .sortButton:hover,
#stationFilterForm .sortButton:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

/* Buttons — filter / sort */
.filterFormButton,
.plf-root .filterFormButton {
    border-radius: 6px;
    font-weight: 600;
    padding: 0.4rem 0.75rem;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.filterFormButton:hover {
    filter: brightness(0.97);
}
.filterFormButton:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* Dropdown toggles */
.plf-root .dropdown-toggle {
    border-radius: 6px;
    border-color: #cbd5e1;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.plf-root .dropdown-toggle:hover {
    border-color: #94a3b8;
}
.plf-root .dropdown-toggle:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Sliders (jQuery UI) */
.plf-root .ui-slider {
    border-radius: 6px;
    border-color: #cbd5e1;
    background: #fff;
}
.plf-root .ui-slider .ui-slider-handle {
    border-radius: 50%;
    width: 22px;
    height: 22px;
    top: 50%;
    margin-top: -11px;
    border-color: #64748b;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.15);
}
.plf-root .ui-slider .ui-slider-handle:focus,
.plf-root .ui-slider .ui-slider-handle.ui-state-active {
    border-color: #2563eb;
    border-width: 2px;
    outline: none;
}
.plf-root .ui-slider .ui-slider-range {
    background: #2563eb;
    border-radius: 4px;
}

/* Map labels / clusters — readability */
/* Let clicks pass through to the property Marker (overlayLayer children otherwise steal hits). */
#map .price-label,
#map .open-house-flag,
#map .plf-map-marker-match-hint {
    pointer-events: none;
}

.price-label {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 6px;
    border-radius: 4px;
    border-color: #cbd5e1;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}
.marker-label {
    font-size: 11px;
    padding: 3px 6px;
    border-radius: 4px;
    border-color: #94a3b8;
}
#map .cluster {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}
.custom-marker i {
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.25));
}

/* ========== UX refinement: anchor flow, dropdowns, sliders, map side panel, POI, price ========== */

/* School/Station: keep filter dropdowns above map & collapsible (no clipping) */
.school-property-search-container,
.station-property-search-container {
    overflow: visible;
}
.plf-control-panel:not(.is-collapsed) .plf-control-panel__collapsible {
    overflow: visible;
}
.school-property-search-container .dropdown-menu,
.station-property-search-container .dropdown-menu,
.plf-root .plf-filter-panel-shell .dropdown-menu {
    z-index: 10080;
}
.plf-range-dropdown-summary {
    margin: 0.5rem 0 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1e293b;
}

/* Map: property detail as right docked panel over map */
.map-view-container.map-view {
    position: relative;
}
.map-view-container.map-view.details-visible .map-container-buttons-group {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
}
.map-view-container.map-view.details-visible .map-property-details-container {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 40%;
    min-width: 300px;
    max-width: 560px;
    z-index: 15;
    background: #fff;
    box-shadow: -8px 0 28px rgba(15, 23, 42, 0.12);
    border-left: 1px solid #e2e8f0;
    padding: 14px 16px;
    overflow-x: hidden;
    box-sizing: border-box;
}
.map-view-container.map-view.details-visible .map-property-details-container .property-details {
    font-size: 0.95rem;
    line-height: 1.5;
}
.map-view-container.map-view.details-visible .map-property-details-container .property-details-flex-group {
    gap: 4px;
}
.map-view-container.map-view.details-visible .map-container {
    border-right: none;
}

.map-view-container .close-details {
    font-size: 0.75rem;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 6px;
    min-width: auto;
    min-height: auto;
}

.plf-map-info-bubble {
    font-size: 13px;
    line-height: 1.35;
}
.plf-map-info-price {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
}
.plf-map-info-oh {
    display: inline-block;
    margin-top: 0.2rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: #b45309;
}

.plf-property-card-price {
    display: inline-block;
    padding: 8px 12px 8px 0;
    font-size: 1.22rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
}

.price-label {
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
}

.plf-poi-info-bubble {
    font-size: 13px;
    max-width: 240px;
    line-height: 1.35;
}
.plf-poi-info-meta {
    color: #475569;
    font-size: 12px;
}
.poi-item-distance {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-weight: 600;
    font-size: 13px;
}
.poi-item-address {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #64748b;
}

/* A3: School/Station — sort dropdown above collapsible / flex rows */
#schoolFilterForm,
#stationFilterForm {
    position: relative;
    overflow: visible;
}
#schoolFilterForm > div,
#stationFilterForm > div {
    overflow: visible;
}
#schoolFilterForm .sortDropdown,
#stationFilterForm .sortDropdown {
    z-index: 10080 !important;
    position: absolute;
    left: 0;
    top: 100%;
    margin-top: 4px;
    min-width: 200px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    border-radius: 8px;
    background: #fff;
}
#schoolFilterForm .sortButton,
#stationFilterForm .sortButton {
    position: relative;
    z-index: 2;
}

/* School/Station POI: stacked layout — City+Sort row, then fields, then full-width Search (no overlap) */
.plf-poi-filter-form-layout {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    font-size: 13px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.plf-poi-filter-main {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    width: 100%;
}

.plf-poi-filter-row--city-sort {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 10px;
    align-items: start;
    width: 100%;
    min-width: 0;
}

.plf-poi-filter-city-wrap {
    min-width: 0;
}

.plf-poi-sort-cluster {
    position: relative;
    flex-shrink: 0;
    align-self: start;
}

.plf-poi-sort-cluster .sortButton {
    white-space: nowrap;
}

.plf-poi-filter-stack {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.plf-poi-filter-submit-row {
    width: 100%;
    margin-top: 2px;
}

#schoolFilterForm .plf-poi-filter-submit,
#stationFilterForm .plf-poi-filter-submit {
    font-weight: 700;
    min-height: 40px;
    width: 100%;
    padding-left: 16px;
    padding-right: 16px;
    border-radius: 8px;
    border: 1px solid #1d4ed8;
    background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
    box-sizing: border-box;
}

#schoolFilterForm .plf-poi-filter-submit:hover,
#stationFilterForm .plf-poi-filter-submit:hover {
    filter: brightness(1.05);
}

/* POI dropdowns: stay in viewport; menus anchor to field */
.school-property-search-container #schoolFilterForm .dropdown,
.station-property-search-container #stationFilterForm .dropdown {
    max-width: 100%;
    box-sizing: border-box;
}

.school-property-search-container #schoolFilterForm .dropdown-menu,
.station-property-search-container #stationFilterForm .dropdown-menu {
    max-width: min(100vw - 32px, 340px) !important;
    width: auto !important;
    min-width: 0 !important;
    left: 0 !important;
    right: auto !important;
}

/* Denser selector row: keep pencil on same line as label/value */
.school-property-search-container #schoolFilterForm .plf-toggle-inner,
.station-property-search-container #stationFilterForm .plf-toggle-inner {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.school-property-search-container #schoolFilterForm .plf-toggle-inner .fa-pencil-alt,
.station-property-search-container #stationFilterForm .plf-toggle-inner .fa-pencil-alt {
    flex: 0 0 auto;
    margin-left: auto;
}

.school-property-search-container #schoolFilterForm .dropdown-toggle,
.station-property-search-container #stationFilterForm .dropdown-toggle {
    min-height: 36px;
    padding: 6px 10px;
}

@media (max-width: 768px) {
    .plf-poi-filter-row--city-sort {
        grid-template-columns: 1fr;
    }

    .plf-poi-sort-cluster {
        width: 100%;
    }

    .plf-poi-sort-cluster .sortButton {
        width: 100%;
        justify-content: center;
    }

    #schoolFilterForm .plf-poi-filter-submit,
    #stationFilterForm .plf-poi-filter-submit {
        min-height: 44px;
    }
}

/* Property search: hide intro heading+paragraph on mobile once user is in property_search flow */
@media (max-width: 768px) {
    .plf-search-messages.plf-search-messages--active-flow h3,
    .plf-search-messages.plf-search-messages--active-flow > p {
        display: none;
    }

    .plf-search-messages.plf-search-messages--active-flow {
        margin: 0;
        padding: 0;
        min-height: 0;
    }
}

/* OH-1: card line + list detail block */
.plf-open-house-line {
    display: block;
    margin: 0.35rem 0 0.25rem;
    padding: 0.35rem 0.5rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: #0f766e;
    background: #ecfdf5;
    border: 1px solid #99f6e4;
    border-radius: 6px;
    max-width: 100%;
}
.plf-open-house-line .fas {
    margin-right: 0.35rem;
}
.plf-open-house-detail-block {
    margin: 0.75rem 0 0;
    padding: 0.65rem 0.75rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
}
.plf-open-house-detail-title {
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.35rem;
}
.plf-open-house-detail-list {
    margin: 0;
    padding-left: 1.15rem;
    color: #334155;
}
.plf-open-house-detail-list li {
    margin: 0.25rem 0;
}
/* OH-3: stored open houses (plf_open_houses) — detail sidebar heading */
.plf-open-house-detail-block.plf-open-house-detail-block--stored .plf-open-house-detail-heading {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 0.4rem;
    padding: 0;
    line-height: 1.3;
}
.plf-open-house-line--stored {
    line-height: 1.35;
}

/*
 * School/Station POI dropdowns: load LAST so theme / Bootstrap cannot override.
 * - Collapsible uses overflow:hidden for collapse animation; POI pages need visible when expanded.
 * - Results grid is a following sibling; raise filter panel stacking so menus paint above the grid.
 * - !important beats aggressive theme rules; enqueue uses filemtime so changes are not cached stale.
 */
.school-property-search-container,
.station-property-search-container,
.school-property-search-container #schoolSearch,
.station-property-search-container #stationSearch {
    overflow: visible !important;
}
.school-property-search-container #schoolSearch > .plf-control-panel,
.station-property-search-container #stationSearch > .plf-control-panel {
    position: relative !important;
    /* Below mode/view chrome (z-index 100); above POI grid (z-index 0). */
    z-index: 10 !important;
}
.school-property-search-container #schoolSearch > .school-grid,
.station-property-search-container #stationSearch > .table-grid {
    position: relative !important;
    z-index: 0 !important;
}
.school-property-search-container #schoolSearch .plf-control-panel:not(.is-collapsed) .plf-control-panel__collapsible,
.station-property-search-container #stationSearch .plf-control-panel:not(.is-collapsed) .plf-control-panel__collapsible {
    overflow: visible !important;
}
.school-property-search-container #schoolFilterForm .dropdown,
.station-property-search-container #stationFilterForm .dropdown {
    overflow: visible !important;
}
.school-property-search-container #schoolFilterForm .dropdown-menu,
.station-property-search-container #stationFilterForm .dropdown-menu {
    z-index: 10080 !important;
}

/* ===== Phase 1 mobile UX fixes (safe, CSS-first) ===== */
@media (max-width: 768px) {
    /* Cards: prevent clipping/squeezing and force readable single-column flow */
    .property-item-container,
    .property-item {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        flex: 1 1 100% !important;
        box-sizing: border-box;
    }

    #property-listing.grid-view .property-page.active {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }

    #property-listing.list-view .property-item,
    #property-listing.map-view .property-item {
        flex-direction: column !important;
    }

    #property-listing.list-view .property-carousel,
    #property-listing.list-view .property-details {
        width: 100% !important;
        margin: 0;
        padding-left: 0;
    }

    #property-listing.map-view .property-details {
        margin: 8px 0 0;
        padding-left: 0;
    }

    .property-card {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    /* School / Transit controls: larger taps + clearer active state */
    .plf-mode-segmented .menu-link.plf-mode-tab,
    .plf-panel-toggle {
        min-height: 44px;
        padding: 0.62rem 0.95rem;
        font-size: 0.92rem;
        border-width: 1px;
    }

    .plf-mode-segmented .menu-link.plf-mode-tab.active,
    .plf-panel-toggle.active {
        box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
    }

    .plf-panel-toggle-bar {
        justify-content: flex-start;
        gap: 0.45rem;
        margin-bottom: 0.6rem;
    }

    .plf-panel-toggle-bar__label {
        width: 100%;
        margin: 0 0 0.2rem;
    }

    /* General mobile spacing */
    .plf-search-messages,
    .plf-active-filters-summary {
        margin-left: 12px;
        margin-right: 12px;
        padding-left: 10px;
        padding-right: 10px;
    }

    .control-panel {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-bottom: 12px;
    }

    .view-icons-container {
        width: 100%;
        justify-content: space-between;
        gap: 8px;
        margin: 0;
    }

    /* Map: avoid giant fixed desktop height + side panel squeeze */
    .map-view-container {
        padding: 10px;
        display: block;
    }

    .map-container {
        min-width: 0 !important;
        width: 100% !important;
        height: 52vh !important;
        min-height: 320px;
        max-height: 600px;
        border-right: none;
        padding-right: 0;
    }

    .map-view-container.map-view.details-visible .map-property-details-container {
        width: calc(100% - 8px) !important;
        max-width: 100% !important;
        right: 4px;
        left: 4px;
        top: auto;
        bottom: 4px;
        max-height: 48vh;
        border-left: none;
        border-top: 1px solid #e2e8f0;
        box-shadow: 0 -8px 22px rgba(15, 23, 42, 0.14);
        border-radius: 10px;
    }

    .map-view-container .close-details {
        top: 6px;
        right: 6px;
        min-height: 32px;
    }

    .map-view-container.map-view .map-container-buttons-group {
        flex-wrap: wrap;
        gap: 8px;
        align-items: stretch;
    }
}

/* ===== Phase 2 structural mobile UX cleanup ===== */
.plf-mobile-flow-shell,
.plf-nearby-page-shell {
    max-width: 100%;
}

@media (max-width: 768px) {
    /* 1) Clear mobile hierarchy (mode -> secondary content -> filters -> view -> results) */
    .plf-nearby-page-shell > .plf-global-mode-row {
        margin: 0 0 8px;
        padding: 0 4px;
    }

    .plf-mobile-secondary-nav {
        margin: 0 4px 8px;
        padding: 6px 8px;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        background: #f8fafc;
    }

    .plf-mobile-secondary-nav .plf-panel-toggle-bar__label {
        font-size: 0.76rem;
        text-transform: uppercase;
        letter-spacing: 0.03em;
        color: #64748b;
        margin-bottom: 6px;
    }

    .plf-mobile-secondary-nav .plf-cta-property-search {
        margin-left: 0;
        width: 100%;
        justify-content: center;
        min-height: 42px;
    }

    .plf-mobile-secondary-nav .plf-panel-toggle {
        flex: 1 1 calc(50% - 6px);
        min-width: 0;
    }

    .plf-mobile-section {
        margin-top: 8px;
        padding: 0 4px;
    }

    /* 2) Filters: collapsed by default mobile feel + cleaner framing */
    .plf-control-panel {
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        padding: 8px 8px 4px;
        background: #fff;
    }

    .plf-filter-toolbar {
        margin-top: 0;
        margin-bottom: 8px;
        border-radius: 8px;
    }

    .plf-filter-panel-shell .plf-filter-panel-body {
        padding-top: 2px;
    }

    .plf-layout {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .plf-main {
        width: 100%;
    }

    .plf-actions {
        width: 100%;
        justify-content: flex-start;
        gap: 8px;
    }

    .plf-actions .filterFormButton,
    .plf-actions .sortButton {
        min-height: 40px;
    }

    /* 3) View selector as clear mode step */
    #view-selector.view-icons-container {
        width: 100%;
        margin: 4px 0;
        padding: 4px;
        border: 1px solid #e2e8f0;
        border-radius: 8px;
        background: #f8fafc;
    }

    #view-selector.view-icons-container .view-icon-button {
        flex: 1 1 0;
        min-height: 42px;
        border-radius: 8px;
    }

    /* 4) Mobile map mode = map priority + bottom-sheet listing detail */
    .map-view-container.map-view {
        position: relative;
        padding: 8px;
        border-radius: 10px;
    }

    .map-view-container.map-view .map-container {
        height: min(60vh, 520px) !important;
        min-height: 340px;
        border-radius: 10px;
        overflow: hidden;
    }

    .map-view-container.map-view.full-width .map-property-details-container {
        display: none;
    }

    .map-view-container.map-view.details-visible .map-property-details-container {
        display: block;
        position: absolute;
        left: 8px;
        right: 8px;
        bottom: 8px;
        top: auto;
        width: auto !important;
        max-height: min(46vh, 420px);
        overflow-y: auto;
        background: #fff;
        border: 1px solid #dbe6f3;
        border-radius: 12px;
        box-shadow: 0 -10px 26px rgba(15, 23, 42, 0.18);
        z-index: 22;
    }

    .map-view-container.map-view.details-visible #property-listing.map-view .property-item-container.active {
        margin-bottom: 0;
        box-shadow: none;
        border: none;
        padding: 10px 8px;
    }

    .map-view-container.map-view.details-visible .close-details {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 30px;
        min-height: 30px;
        z-index: 30;
    }

    /* 5) Property detail page: true single-column reading flow on phone */
    .plf-property-detail-page .feature-property-detail-container {
        flex-direction: column;
        gap: 16px;
        margin-bottom: 22px;
    }

    .plf-property-detail-page .feature-property-detail-group {
        width: 100%;
    }

    .plf-property-detail-page .facts-features dt,
    .plf-property-detail-page .listing-details dt,
    .plf-property-detail-page .facts-features dd,
    .plf-property-detail-page .listing-details dd {
        display: block;
        width: 100%;
        margin: 0 0 6px;
    }

    .plf-property-detail-page .facts-features dl,
    .plf-property-detail-page .listing-details dl {
        padding: 8px 0;
    }

    .plf-property-detail-page .about-home h3,
    .plf-property-detail-page .facts-features h3,
    .plf-property-detail-page .listing-details h3 {
        font-size: 1.2rem;
        margin-bottom: 8px;
    }

    .plf-property-detail-page .about-home p {
        font-size: 1rem;
        line-height: 1.6;
    }
}

/* ===== Phase 3 refinement: mobile visual simplification ===== */
@media (max-width: 768px) {
    /* Top controls read as one guided flow */
    .plf-nearby-page-shell > .plf-global-mode-row,
    .plf-mobile-flow-shell--property > #plf-control-panel-property-area {
        margin-bottom: 10px;
    }

    .plf-mode-segmented__row {
        gap: 8px;
    }

    .plf-mode-segmented__group--primary .plf-mode-tab--primary {
        font-size: 0.98rem;
        font-weight: 700;
    }

    .plf-mode-segmented__group--near {
        margin-top: 2px;
        opacity: 0.96;
    }

    .plf-mobile-secondary-nav {
        margin-top: -2px;
    }

    .plf-mobile-secondary-nav .plf-panel-toggle {
        background: #fff;
        border-color: #dbe3ef;
    }

    .plf-mobile-secondary-nav .plf-panel-toggle.active {
        background: #eaf2ff;
        border-color: #84aef8;
        color: #0f3f9f;
    }

    /* Filters: less heavy, clearer grouping */
    .plf-control-panel {
        padding: 6px 8px 4px;
        border-color: #e7edf5;
        box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
    }

    .plf-filter-toolbar {
        background: #f8fafd;
        border-color: #e7edf5;
        padding: 0.4rem 0.55rem;
        gap: 0.45rem 0.65rem;
    }

    .plf-filter-toolbar .plf-filter-toggle--bar {
        min-height: 40px;
        border-radius: 8px;
        font-weight: 700;
    }

    .plf-keep-filters-label {
        font-size: 0.82rem;
        color: #51657f;
    }

    .plf-root .plf-row {
        gap: 6px;
        margin-bottom: 4px;
    }

    .plf-root .plf-filter-wrap,
    .plf-root .dropdown,
    .plf-root .dropdown-btn {
        width: 100%;
        min-width: 0;
    }

    .plf-root .dropdown-btn {
        min-height: 42px;
    }

    .plf-active-filters-summary {
        background: #f7fbff;
        border: 1px solid #dfeaf7;
        border-radius: 10px;
        padding: 8px 10px;
    }

    .plf-active-filters-summary__title {
        font-size: 0.84rem;
        letter-spacing: 0.01em;
        margin-bottom: 6px;
        color: #234a77;
    }

    .plf-active-filters-summary__list {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .plf-active-filters-summary__list li {
        margin: 0;
        padding: 4px 8px;
        border-radius: 999px;
        background: #e9f2fd;
        color: #27496f;
        font-size: 0.8rem;
        line-height: 1.25;
        white-space: nowrap;
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .plf-active-filters-summary__hint {
        margin: 8px 0 0;
        font-size: 0.79rem;
        color: #50647d;
    }

    /* Card polish: stronger hierarchy + cleaner actions */
    .property-item-container {
        border-color: #dbe4ef;
        border-radius: 12px;
        box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
        padding: 12px 12px 10px;
        margin-bottom: 12px;
    }

    .plf-property-card-head {
        margin: 0 0 10px;
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    /* PLF: signal pills + “Match N” score on one row (wraps on narrow widths). */
    .plf-match-hints-row {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.35rem 0.65rem;
        margin: 0.35rem 0 0.5rem;
    }

    .plf-match-hints-row .plf-match-signals {
        margin: 0;
    }

    .plf-match-hints-row .plf-match-score {
        margin: 0;
    }

    .plf-property-card-price {
        padding: 0;
        font-size: 1.24rem;
    }

    .plf-property-card-address {
        padding: 0;
        font-size: 0.95rem;
        line-height: 1.45;
        color: #0f2238;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .plf-property-card-actions {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        margin-top: 2px;
    }

    .property-view-details-link,
    .plf-card-map-focus-link {
        margin-left: 0;
        padding: 8px 11px;
        min-height: 38px;
        display: inline-flex;
        align-items: center;
        border-radius: 8px;
        font-size: 0.84rem;
        font-weight: 700;
    }

    .plf-property-card-actions .plf-favorites-button-wrapper {
        margin-left: auto;
        display: inline-flex;
        align-items: center;
    }

    .property-details.list-view-details,
    .property-details.grid-view-details {
        margin-top: 2px;
    }

    /* Map polish: one primary detail interaction, less overlap noise */
    .plf-map-info-bubble {
        display: none;
    }

    .map-view-container.map-view .map-container-buttons-group {
        position: relative;
    }

    .map-view-container.map-view .clear-info {
        position: absolute;
        top: 8px;
        right: 8px;
        left: auto;
        transform: none;
        padding: 6px 10px;
        min-height: 34px;
        border-radius: 8px;
        border-color: #d8e3f1;
        background: rgba(255, 255, 255, 0.94);
        z-index: 12;
    }

    .map-view-container.map-view.details-visible .map-container {
        filter: saturate(0.92);
    }

    /* Property detail: readability + conversion emphasis */
    .plf-property-detail-page .plf-feature-detail__price-row {
        gap: 0.45rem 0.8rem;
        margin: 8px 0 4px !important;
    }

    .plf-property-detail-page .price-detail {
        font-size: 1.6rem;
        line-height: 1.15;
    }

    .plf-property-detail-page .address-detail {
        font-size: 1.02rem;
        line-height: 1.45;
        display: block;
        margin: 0 0 8px;
    }

    .plf-property-detail-page .contact-us {
        position: relative;
        margin-top: 12px;
        padding: 10px 10px 6px;
        border: 1px solid #dbe5f2;
        border-radius: 10px;
        background: #f8fbff;
    }

    .plf-property-detail-page .facts-features,
    .plf-property-detail-page .listing-details,
    .plf-property-detail-page .about-home {
        background: #fff;
        border: 1px solid #e4ebf5;
        border-radius: 10px;
        padding: 10px 11px;
        margin-bottom: 10px;
    }

    /* Phase 3 regression micro-fixes: reduce density + improve scanning */
    .plf-filter-toolbar-row {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .property-search-menu-container.plf-mode-segmented,
    .plf-filter-toolbar {
        width: 100%;
    }

    .plf-root .dropdown-btn,
    .plf-root .range-slider-container,
    .plf-root .search-address-container {
        margin-bottom: 6px;
    }

    .plf-active-filters-summary__list {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: thin;
    }

    .plf-active-filters-summary__list li {
        flex: 0 0 auto;
        white-space: nowrap;
        max-width: none;
    }

    .plf-property-card-head {
        gap: 5px;
    }

    .property-item .property-details {
        font-size: 0.92rem;
    }

    .property-view-details-link,
    .plf-card-map-focus-link {
        font-size: 0.82rem;
        line-height: 1.2;
    }

    .plf-property-card-actions .plf-favorites-button-wrapper {
        margin-left: 0;
    }

    .plf-property-card-actions {
        justify-content: flex-start;
    }

    .map-view-container.map-view.details-visible .map-property-details-container {
        max-height: min(42vh, 360px);
        padding: 10px 8px 8px;
    }

    .map-view-container.map-view .map-container {
        height: min(56vh, 460px) !important;
        min-height: 300px;
    }

    .plf-property-detail-page #map-view .map-container {
        height: min(38vh, 330px) !important;
        min-height: 220px;
    }

    .plf-property-detail-page .contact-us .plf-collab-submit,
    .plf-property-detail-page .contact-us button[type="submit"] {
        width: 100%;
        min-height: 44px;
        font-size: 0.96rem;
        font-weight: 700;
    }

    /* Final patch: tighten top control stack so results appear sooner */
    .plf-global-mode-row.plf-filter-toolbar-row.plf-global-mode-row--standalone,
    .plf-mobile-flow-shell--property > #plf-control-panel-property-area,
    .plf-nearby-page-shell > .plf-global-mode-row,
    .plf-mobile-secondary-nav,
    .plf-control-panel > .plf-filter-toolbar-row,
    .plf-control-panel > .plf-filter-toolbar {
        margin-top: 0;
        margin-bottom: 6px;
    }

    .plf-mode-segmented__group--near {
        margin-top: 0;
    }

    .plf-panel-toggle-bar.plf-mobile-secondary-nav {
        padding: 6px 8px;
    }

    .plf-filter-toolbar {
        padding: 6px 8px;
        gap: 6px;
    }

    .plf-filter-toolbar .plf-filter-toggle--bar,
    .plf-mobile-secondary-nav .plf-panel-toggle,
    .plf-mobile-secondary-nav .plf-cta-property-search {
        min-height: 38px;
        padding: 0.45rem 0.72rem;
    }

    /* More Filters popup: keep fully visible on phones */
    #additionalFiltersPopup {
        top: 8vh;
        left: 50%;
        width: min(94vw, 520px);
        max-width: 94vw;
        height: auto;
        max-height: 84vh;
        border-radius: 10px;
        box-shadow: 0 14px 34px rgba(15, 23, 42, 0.28);
    }

    #additionalFiltersPopup .popup-content {
        padding: 12px;
        gap: 8px;
    }

    /* Map-first recovery: shrink control bars, grow map viewport */
    .map-view-container.map-view .map-container-buttons-group {
        margin-bottom: 4px;
        gap: 4px;
    }

    .map-view-container.map-view .clear-info {
        min-height: 34px;
        padding: 0.35rem 0.7rem;
        font-size: 0.82rem;
        line-height: 1.15;
    }

    .map-view-container.map-view .map-container {
        height: min(60vh, 500px) !important;
        min-height: 320px;
    }

    /* Map detail card density tuning */
    .map-view-container.map-view.details-visible .map-property-details-container {
        max-height: min(40vh, 340px);
        padding: 8px 8px 6px;
        border-radius: 10px;
    }

    .map-view-container.map-view.details-visible #property-listing.map-view .property-item-container.active {
        padding: 8px 6px;
    }

    .map-view-container.map-view.details-visible .property-item .property-details {
        font-size: 0.88rem;
        line-height: 1.35;
    }

    /* Isolate selected detail and inquiry from surrounding noise */
    .plf-property-detail-page .facts-features,
    .plf-property-detail-page .listing-details,
    .plf-property-detail-page .about-home,
    .plf-property-detail-page .contact-us {
        box-shadow: 0 2px 8px rgba(15, 23, 42, 0.07);
    }

    .plf-property-detail-page .feature-property-detail-container {
        gap: 12px;
    }

    /* Search pages: compact footer while preserving content */
    body.plf-mobile-search-page footer,
    body.plf-mobile-search-page #colophon,
    body.plf-mobile-search-page .site-footer {
        font-size: 0.86rem;
        line-height: 1.25;
        padding-top: 10px;
        padding-bottom: 10px;
        margin-top: 14px;
    }

    body.plf-mobile-search-page footer .widget,
    body.plf-mobile-search-page #colophon .widget,
    body.plf-mobile-search-page .site-footer .widget {
        margin-bottom: 8px;
    }

    /* Floating utility for long result scrolling */
    .plf-mobile-back-to-top {
        position: fixed;
        right: 12px;
        bottom: 16px;
        z-index: 10040;
        border: 1px solid #cbd5e1;
        background: rgba(255, 255, 255, 0.96);
        color: #0f172a;
        border-radius: 999px;
        min-width: 38px;
        min-height: 38px;
        padding: 0 11px;
        box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
        font-size: 0.8rem;
        font-weight: 700;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        pointer-events: none;
        transform: translateY(8px);
        transition: opacity 0.18s ease, transform 0.18s ease;
    }

    .plf-mobile-back-to-top.is-visible {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }
}

/* --- School / station: desktop table vs mobile card lists --- */
@media (min-width: 769px) {
    .plf-poi-mobile-cards {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .plf-poi-desktop-table {
        display: none !important;
    }

    /* Same DOM count as desktop grid; avoid theme/parent clipping hiding lower cards. */
    .plf-poi-results-wrap,
    .plf-poi-mobile-cards,
    .plf-poi-mobile-cards-list {
        max-height: none !important;
        overflow: visible !important;
    }

    .plf-poi-results-wrap {
        margin-top: 4px;
    }

    .plf-poi-mobile-cards {
        margin: 0 0 6px;
        padding: 8px 6px 0;
        border-radius: 12px;
        border: 1px solid #dbeafe;
        background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 48%, #fff 100%);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
    }

    .plf-poi-mobile-cards-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding: 4px 4px 6px;
        position: sticky;
        top: 0;
        z-index: 5;
        background: linear-gradient(180deg, #eff6ff 0%, #eff6ff 82%, rgba(239, 246, 255, 0) 100%);
        border-bottom: 1px solid #bfdbfe;
        margin: 0 -2px 6px;
        padding-left: 8px;
        padding-right: 8px;
    }

    .plf-poi-mobile-cards-head__title {
        font-size: 0.8rem;
        font-weight: 800;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        color: #1e40af;
    }

    .plf-poi-mobile-selectall-label {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-size: 0.8rem;
        font-weight: 600;
        color: #0f172a;
        margin: 0;
    }

    .plf-poi-mobile-selectall-label input {
        width: 18px;
        height: 18px;
    }

    .plf-poi-mobile-cards-list {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .plf-poi-mobile-card {
        border: 1px solid #e2e8f0;
        border-left: 3px solid #2563eb;
        border-radius: 10px;
        padding: 7px 9px 8px;
        background: #fff;
        box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
    }

    .plf-poi-mobile-card.highlight {
        border-color: #93c5fd;
        box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
    }

    .plf-poi-mobile-card__top {
        display: flex;
        align-items: flex-start;
        gap: 8px;
    }

    .plf-poi-mobile-card__chk {
        margin: 2px 0 0;
        flex: 0 0 auto;
    }

    .plf-poi-mobile-card__chk input {
        width: 18px;
        height: 18px;
    }

    .plf-poi-mobile-card__title-block {
        flex: 1 1 auto;
        min-width: 0;
    }

    .plf-poi-mobile-card__name {
        font-weight: 800;
        font-size: 0.95rem;
        line-height: 1.25;
        color: #0f172a;
    }

    .plf-poi-mobile-card__type {
        font-size: 0.78rem;
        color: #64748b;
        margin-top: 2px;
    }

    .plf-poi-mobile-card__metrics {
        flex: 0 0 auto;
        text-align: right;
        min-width: 5.75rem;
        padding: 4px 6px;
        border-radius: 8px;
        background: #f1f5f9;
        border: 1px solid #e2e8f0;
    }

    .plf-poi-mobile-card__metric {
        font-size: 0.8rem;
        line-height: 1.3;
    }

    .plf-poi-mobile-card__metric + .plf-poi-mobile-card__metric {
        margin-top: 2px;
        padding-top: 4px;
        border-top: 1px dashed #cbd5e1;
    }

    .plf-poi-mobile-k {
        font-size: 0.65rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #475569;
    }

    .plf-poi-mobile-card__address {
        font-size: 0.82rem;
        line-height: 1.35;
        color: #334155;
        margin-top: 6px;
    }

    .plf-poi-mobile-card__loc {
        font-size: 0.76rem;
        line-height: 1.35;
        color: #64748b;
        margin-top: 4px;
    }

    .plf-poi-mobile-sep {
        margin: 0 4px;
    }

    .plf-poi-mobile-card--station {
        display: flex;
        align-items: flex-start;
        gap: 10px;
    }

    .plf-poi-mobile-card__station-body {
        flex: 1 1 auto;
        min-width: 0;
    }

    .plf-poi-mobile-card__line {
        font-size: 0.84rem;
        color: #0f172a;
        margin-top: 4px;
        font-weight: 600;
    }

    .plf-poi-mobile-card--station .plf-poi-mobile-k {
        color: #0369a1;
    }
}

/* --- Mobile nav drawer (plugin-owned; desktop unchanged) --- */
.plf-mobile-nav-root {
    display: none;
}

@media (max-width: 992px) {
    .plf-mobile-nav-root {
        display: block;
        position: fixed;
        top: 10px;
        right: 10px;
        z-index: 100100;
    }

    body.plf-mobile-nav-open {
        overflow: hidden;
    }

    .plf-mobile-nav-toggle {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 46px;
        height: 46px;
        padding: 0;
        border-radius: 12px;
        border: 1px solid #cbd5e1;
        background: rgba(255, 255, 255, 0.96);
        box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
        cursor: pointer;
        position: relative;
        z-index: 100110;
    }

    .plf-mobile-nav-toggle__bar {
        display: block;
        height: 2px;
        width: 22px;
        margin: 0 auto;
        background: #0f172a;
        border-radius: 2px;
    }

    .plf-mobile-nav-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.45);
        z-index: 100090;
    }

    .plf-mobile-nav-panel {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: min(92vw, 380px);
        z-index: 100095;
        background: #fff;
        box-shadow: -8px 0 28px rgba(15, 23, 42, 0.18);
        display: flex;
        flex-direction: column;
    }

    .plf-mobile-nav-panel__inner {
        display: flex;
        flex-direction: column;
        height: 100%;
        min-height: 0;
    }

    .plf-mobile-nav-panel__head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 14px 10px;
        border-bottom: 1px solid #e2e8f0;
        flex: 0 0 auto;
    }

    .plf-mobile-nav-panel__title {
        font-size: 1.05rem;
        font-weight: 800;
        color: #0f172a;
    }

    .plf-mobile-nav-close {
        border: none;
        background: transparent;
        font-size: 1.6rem;
        line-height: 1;
        padding: 4px 8px;
        cursor: pointer;
        color: #64748b;
    }

    .plf-mobile-nav-panel__nav {
        flex: 1 1 auto;
        overflow-y: auto;
        padding: 8px 0 24px;
    }

    .plf-mobile-nav-links {
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .plf-mobile-nav-links li {
        margin: 0;
        border-bottom: 1px solid #f1f5f9;
    }

    .plf-mobile-nav-links a {
        display: block;
        padding: 14px 18px;
        font-size: 1rem;
        font-weight: 600;
        color: #0f172a;
        text-decoration: none;
    }

    .plf-mobile-nav-links a:active,
    .plf-mobile-nav-links a:hover {
        background: #f8fafc;
    }

    /* Homepage / presale-style pages only: contain wide Gutenberg blocks; not PLF search/detail */
    body.home,
    body.page-id-18,
    body.page-slug-featured-presales {
        overflow-x: hidden !important;
    }

    body.home .alignfull,
    body.page-id-18 .alignfull,
    body.page-slug-featured-presales .alignfull,
    body.home .wp-block-cover,
    body.page-id-18 .wp-block-cover,
    body.page-slug-featured-presales .wp-block-cover,
    body.home .wp-block-group.has-global-padding,
    body.page-id-18 .wp-block-group.has-global-padding,
    body.page-slug-featured-presales .wp-block-group.has-global-padding {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    body.home .alignfull,
    body.page-id-18 .alignfull,
    body.page-slug-featured-presales .alignfull {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Inset toggle on these pages only (search pages keep default 10px above) */
    body.home .plf-mobile-nav-root,
    body.page-id-18 .plf-mobile-nav-root,
    body.page-slug-featured-presales .plf-mobile-nav-root {
        top: 12px !important;
        right: 12px !important;
    }
}

@media (min-width: 993px) {
    .plf-mobile-nav-root {
        display: none !important;
    }
}

/* --- Sticky Call/Text/Message bar (contact hub pages; mobile width) --- */
@media (max-width: 768px) {
    .plf-sticky-comm {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 100060;
        display: flex;
        gap: 8px;
        padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
        box-sizing: border-box;
        background: rgba(255, 255, 255, 0.98);
        border-top: 1px solid #e2e8f0;
        box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
    }

    body:has(.plf-sticky-comm) {
        padding-bottom: calc(54px + env(safe-area-inset-bottom, 0px));
    }

    body.plf-mobile-nav-open .plf-sticky-comm {
        visibility: hidden;
        pointer-events: none;
    }

    .plf-sticky-comm__btn {
        flex: 1 1 0;
        min-width: 0;
        text-align: center;
        font-size: 0.95rem;
        font-weight: 700;
        line-height: 1.2;
        padding: 12px 8px;
        border-radius: 10px;
        text-decoration: none;
        border: 2px solid transparent;
        box-sizing: border-box;
    }

    .plf-sticky-comm__btn--call {
        background: #16a34a;
        border-color: #16a34a;
        color: #fff;
    }

    .plf-sticky-comm__btn--call:active,
    .plf-sticky-comm__btn--call:hover {
        background: #15803d;
        border-color: #15803d;
        color: #fff;
    }

    .plf-sticky-comm__btn--text {
        background: #fff;
        border-color: #16a34a;
        color: #16a34a;
    }

    .plf-sticky-comm__btn--text:active,
    .plf-sticky-comm__btn--text:hover {
        background: #f0fdf4;
        color: #15803d;
        border-color: #15803d;
    }

    .plf-sticky-comm__btn--message {
        background: #f1f5f9;
        border-color: #e2e8f0;
        color: #0f172a;
    }

    .plf-sticky-comm__btn--message:active,
    .plf-sticky-comm__btn--message:hover {
        background: #e2e8f0;
    }

    .plf-sticky-comm--message-only .plf-sticky-comm__btn--message {
        flex: 1 1 auto;
    }
}

@media (min-width: 769px) {
    .plf-sticky-comm {
        display: none !important;
    }
}

/* --- Mobile corrective: tighter filter panels (Property + School/Station), less empty chrome --- */
@media (max-width: 768px) {
    .plf-control-panel {
        padding: 6px 8px 4px;
    }

    .plf-control-panel.is-collapsed {
        padding: 0 !important;
        margin: 0 !important;
    }

    .plf-control-panel.is-collapsed > .plf-filter-toolbar {
        margin-bottom: 0 !important;
        margin-top: 0 !important;
        padding: 2px !important;
        gap: 4px !important;
        min-height: 0;
    }

    .plf-control-panel.is-collapsed .plf-filter-toolbar .plf-filter-toggle--bar {
        min-height: 32px !important;
        padding: 0.28rem 0.55rem !important;
    }

    .plf-control-panel.is-collapsed > .plf-search-messages {
        margin-bottom: 4px !important;
    }

    .plf-control-panel > .plf-filter-toolbar {
        margin-bottom: 6px;
        padding: 6px 8px;
    }

    .plf-control-panel:not(.is-collapsed) > .plf-control-panel__collapsible {
        padding-top: 0.2rem;
        padding-bottom: 0.35rem;
    }

    .plf-search-messages {
        margin-top: 0;
        margin-bottom: 8px;
    }
}

/*
 * =========================================================================
 * PLF — FINAL AUTHORITATIVE OVERRIDES (single block; must be last in this file)
 * - Property detail ≤991px: FSE wrappers + contained width (no 100vw breakout; inline 65%/35% neutralized)
 * - Landscape ≤932px: block-theme header, PLF compact search, map/POI/school, property detail hero
 * Replaces duplicate earlier @media (landscape) blocks and duplicate 991 rules.
 * =========================================================================
 */

/* --- D) Property detail full width on mobile / tablet --- */
@media (max-width: 991px) {
    /* Common WP / block theme wrappers that constrain content width */
    .entry-content:has(.plf-property-detail-page),
    .wp-block-post-content:has(.plf-property-detail-page),
    .post-content:has(.plf-property-detail-page),
    .is-layout-constrained:has(.plf-property-detail-page),
    .wp-block-group:has(.plf-property-detail-page),
    main:has(.plf-property-detail-page) {
        max-width: none !important;
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        box-sizing: border-box !important;
    }

    /* Contained single-column layout: no 100vw / calc breakout; neutralize inline 65%/35% on groups */
    .plf-property-detail-page,
    .plf-property-detail-page .feature-property-detail-container,
    .plf-property-detail-page .feature-property-detail-group {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    .plf-property-detail-page {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: max(10px, env(safe-area-inset-left, 0px)) !important;
        padding-right: max(10px, env(safe-area-inset-right, 0px)) !important;
        overflow-x: hidden !important;
    }

    .plf-property-detail-page .feature-property-detail-container {
        display: flex !important;
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        gap: 12px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-bottom: 24px !important;
        overflow-x: hidden !important;
    }

    .plf-property-detail-page .feature-property-detail-group {
        flex: 1 1 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin: 0 !important;
        overflow-x: hidden !important;
    }

    /* Map/detail shell containment */
    .plf-property-detail-page #map-view,
    .plf-property-detail-page #property-listing,
    .plf-property-detail-page #property-listing.grid-view,
    .plf-property-detail-page .map-view-container,
    .plf-property-detail-page .property-page,
    .plf-property-detail-page .property-details,
    .plf-property-detail-page .cover-image,
    .plf-property-detail-page .plf-feature-detail-cover,
    .plf-property-detail-page .about-home,
    .plf-property-detail-page .facts-features,
    .plf-property-detail-page .listing-details,
    .plf-property-detail-page .contact-us,
    .plf-property-detail-page .hosted-by,
    .plf-property-detail-page .plf-collab-section {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }

    /* Slick carousel containment */
    .plf-property-detail-page .property-carousel,
    .plf-property-detail-page .slick-slider,
    .plf-property-detail-page .slick-list,
    .plf-property-detail-page .slick-track,
    .plf-property-detail-page .property-image,
    .plf-property-detail-page .plf-detail-carousel-thumb {
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    .plf-property-detail-page .slick-list {
        overflow: hidden !important;
    }

    .plf-property-detail-page .property-image img,
    .plf-property-detail-page .plf-detail-carousel-thumb,
    .plf-property-detail-page .plf-feature-detail-cover-img {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
    }

    /* Prevent long text / dl from widening layout */
    .plf-property-detail-page .facts-features dl,
    .plf-property-detail-page .listing-details dl,
    .plf-property-detail-page .about-home p,
    .plf-property-detail-page .address-detail,
    .plf-property-detail-page .price-detail {
        overflow-wrap: anywhere !important;
        word-break: break-word !important;
    }
}

/*
 * =========================================================================
 * Landscape mobile (max-width 932px): single authoritative block.
 * Block themes (FSE) render the header with .wp-block-columns, .wp-block-navigation,
 * etc.; .wp-block-template-part header matches headers injected via template parts.
 * PLF rules below compact search UI, maps, school/station, and property detail.
 * Desktop and portrait tablets are unchanged (width + orientation query only).
 * =========================================================================
 */
@media (max-width: 932px) and (orientation: landscape) {
    /* --- Block theme header: override theme flex/padding so the bar stays a short strip --- */
    header,
    .wp-block-template-part header,
    .site-header {
        padding: 2px 6px !important;
        min-height: 0 !important;
    }

    header .wp-block-columns,
    .wp-block-template-part header .wp-block-columns,
    .site-header .wp-block-columns {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 4px !important;
        min-height: 0 !important;
        margin-bottom: 0 !important;
    }

    header .wp-block-column,
    .wp-block-template-part header .wp-block-column,
    .site-header .wp-block-column {
        flex: 0 0 auto !important;
        width: auto !important;
        max-width: none !important;
        min-width: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    /* Live current-site fix: header blue band still uses block columns with inline flex-basis (e.g. 18% / 70%) */
    header .wp-block-columns.is-layout-flex,
    .wp-block-template-part header .wp-block-columns.is-layout-flex {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 6px !important;
    }

    header .wp-block-columns.is-layout-flex > .wp-block-column,
    .wp-block-template-part header .wp-block-columns.is-layout-flex > .wp-block-column {
        flex: 0 1 auto !important;
        flex-basis: auto !important;
        width: auto !important;
        max-width: 100% !important;
        min-width: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    header .wp-block-group,
    .wp-block-template-part header .wp-block-group,
    .site-header .wp-block-group {
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Live DOM: flex group + global-padding wrappers were stacking the header band vertically */
    header .wp-block-group.is-layout-flex,
    .wp-block-template-part header .wp-block-group.is-layout-flex {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 8px !important;
    }

    header .wp-block-group.has-global-padding,
    .wp-block-template-part header .wp-block-group.has-global-padding {
        padding-top: 4px !important;
        padding-bottom: 4px !important;
    }

    /* Current-site landscape width refinement: blue header band still feels too wide/heavy */
    header .has-vivid-cyan-blue-background-color,
    .wp-block-template-part header .has-vivid-cyan-blue-background-color {
        padding-left: 8px !important;
        padding-right: 8px !important;
        padding-top: 4px !important;
        padding-bottom: 4px !important;
    }

    header .has-vivid-cyan-blue-background-color > .wp-block-columns,
    .wp-block-template-part header .has-vivid-cyan-blue-background-color > .wp-block-columns {
        margin: 0 !important;
    }

    header .has-vivid-cyan-blue-background-color .wp-block-group.has-global-padding,
    .wp-block-template-part header .has-vivid-cyan-blue-background-color .wp-block-group.has-global-padding {
        padding-left: 4px !important;
        padding-right: 4px !important;
    }

    header .wp-block-navigation,
    .wp-block-template-part header .wp-block-navigation {
        min-height: 0 !important;
    }

    /* FINAL FIX: hide block-theme responsive navigation container (causes tall header) */
    header .wp-block-navigation__responsive-container,
    .wp-block-template-part header .wp-block-navigation__responsive-container {
        display: none !important;
    }

    header .wp-block-navigation__container,
    .wp-block-template-part header .wp-block-navigation__container {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 6px !important;
        min-height: 0 !important;
    }

    header .wp-block-navigation__container > ul,
    .wp-block-template-part header .wp-block-navigation__container > ul {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 6px !important;
        margin: 0 !important;
        padding: 0 !important;
        list-style: none !important;
    }

    header .wp-block-navigation-item,
    .wp-block-template-part header .wp-block-navigation-item {
        margin: 0 !important;
    }

    header .wp-block-site-title,
    header .wp-block-site-title a,
    .wp-block-template-part header .wp-block-site-title,
    .wp-block-template-part header .wp-block-site-title a,
    header .wp-block-site-logo,
    .wp-block-template-part header .wp-block-site-logo {
        line-height: 1.15 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    header .wp-block-site-title,
    header .wp-block-site-title a,
    .wp-block-template-part header .wp-block-site-title,
    .wp-block-template-part header .wp-block-site-title a {
        font-size: clamp(0.78rem, 2.2vw, 0.95rem) !important;
    }

    /*
     * Hide duplicate theme nav only when body.plf-mobile-nav-enabled (PLF drawer/button active):
     * avoids two competing menus and a tall stacked list; without that class the theme nav
     * must stay visible — never use unconditional display:none on .wp-block-navigation__container here.
     */
    body.plf-mobile-nav-enabled header nav > ul.menu,
    body.plf-mobile-nav-enabled header .main-navigation > ul,
    body.plf-mobile-nav-enabled header .wp-block-navigation .wp-block-navigation__container {
        display: none !important;
    }

    /* --- PLF: compact shells, filters, maps, school/station, detail --- */
    .plf-nearby-page-shell,
    .plf-mobile-flow-shell {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }

    .plf-nearby-page-shell > .plf-global-mode-row,
    .plf-mobile-flow-shell--property > #plf-control-panel-property-area {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        padding: 2px 4px !important;
    }

    .plf-global-mode-row.plf-filter-toolbar-row.plf-global-mode-row--standalone {
        margin-bottom: 0 !important;
        padding: 2px 4px !important;
        gap: 4px !important;
    }

    .plf-filter-toolbar-row {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 4px !important;
        margin-bottom: 0 !important;
    }

    .plf-mode-segmented__row {
        flex-direction: row !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 3px !important;
        margin: 0 !important;
    }

    .plf-mode-segmented__group--near {
        margin-top: 0 !important;
        padding: 1px 4px !important;
    }

    .plf-mode-segmented__near-label {
        display: none !important;
    }

    .plf-mode-segmented .menu-link.plf-mode-tab {
        padding: 0.22rem 0.5rem !important;
        font-size: 0.74rem !important;
        min-height: 0 !important;
        line-height: 1.2 !important;
    }

    .plf-mode-segmented .menu-link.plf-mode-tab--primary {
        width: auto !important;
        padding: 0.24rem 0.55rem !important;
        font-size: 0.78rem !important;
    }

    .plf-mode-segmented .menu-link.plf-mode-tab--secondary {
        flex: 0 1 auto !important;
        padding: 0.2rem 0.45rem !important;
        font-size: 0.72rem !important;
    }

    .plf-mobile-secondary-nav {
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        padding: 2px 4px !important;
        gap: 4px !important;
    }

    .plf-mobile-secondary-nav .plf-panel-toggle-bar__label {
        display: none !important;
    }

    .plf-mobile-secondary-nav .plf-panel-toggle,
    .plf-mobile-secondary-nav .plf-cta-property-search {
        min-height: 28px !important;
        padding: 0.2rem 0.45rem !important;
        font-size: 0.74rem !important;
    }

    .plf-control-panel {
        padding: 2px 4px 0 !important;
        margin-bottom: 0 !important;
    }

    .plf-filter-toolbar {
        margin-bottom: 2px !important;
        margin-top: 0 !important;
        padding: 2px 4px !important;
        gap: 4px !important;
    }

    .plf-filter-toolbar .plf-filter-toggle--bar {
        min-height: 28px !important;
        padding: 0.2rem 0.45rem !important;
        font-size: 0.74rem !important;
    }

    .plf-search-messages,
    .plf-anchor-help--compact,
    .plf-section-help.plf-active-filters-summary__hint {
        display: none !important;
    }

    .plf-active-filters-summary {
        margin-top: 2px !important;
        margin-bottom: 2px !important;
        padding: 4px 6px !important;
    }

    .plf-active-filters-summary__title {
        margin-bottom: 2px !important;
        font-size: 0.72rem !important;
    }

    .plf-mobile-section {
        margin-top: 2px !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        padding-top: 0 !important;
    }

    .plf-results-shell {
        min-height: 48px !important;
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    .plf-root {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    .plf-mode-tab,
    .plf-panel-toggle {
        min-height: 30px !important;
        padding: 3px 6px !important;
        font-size: 12px !important;
    }

    .plf-poi-filter-form-layout {
        gap: 4px !important;
    }

    .plf-poi-filter-main {
        gap: 3px !important;
    }

    .plf-poi-filter-stack {
        gap: 2px !important;
    }

    .plf-poi-filter-row--city-sort {
        gap: 4px 8px !important;
    }

    .school-property-search-container #schoolFilterForm .dropdown-toggle,
    .station-property-search-container #stationFilterForm .dropdown-toggle {
        min-height: 32px !important;
        padding: 4px 8px !important;
    }

    .school-property-search-container > .plf-global-mode-row,
    .station-property-search-container > .plf-global-mode-row {
        margin-bottom: 2px !important;
        padding-left: 2px !important;
        padding-right: 2px !important;
    }

    .school-property-search-container > .plf-mobile-secondary-nav,
    .station-property-search-container > .plf-mobile-secondary-nav {
        margin-bottom: 2px !important;
        padding: 3px 6px !important;
    }

    .school-property-search-container #schoolSearch > h4,
    .station-property-search-container #stationSearch > h4 {
        margin: 2px 0 4px !important;
        font-size: 0.95rem !important;
    }

    .school-property-search-container #schoolSearch > .plf-control-panel,
    .station-property-search-container #stationSearch > .plf-control-panel {
        padding: 4px 6px 2px !important;
        margin-bottom: 4px !important;
    }

    .school-property-search-container #schoolSearch .plf-filter-toolbar,
    .station-property-search-container #stationSearch .plf-filter-toolbar {
        margin-bottom: 4px !important;
        padding: 3px 6px !important;
    }

    .school-property-search-container .plf-poi-filter-form-layout,
    .station-property-search-container .plf-poi-filter-form-layout {
        gap: 8px !important;
    }

    .school-property-search-container > .plf-mobile-secondary-nav .plf-cta-property-search,
    .station-property-search-container > .plf-mobile-secondary-nav .plf-cta-property-search {
        min-height: 34px !important;
        padding: 0.35rem 0.6rem !important;
        font-size: 0.8rem !important;
    }

    .plf-poi-mobile-cards-head {
        position: static !important;
        margin: 0 0 2px !important;
        padding: 2px !important;
    }

    .map-view-container.map-view .map-container {
        height: min(50vh, 360px) !important;
        min-height: 200px !important;
    }

    .map-view-container.map-view.details-visible .map-property-details-container {
        left: 6px !important;
        right: 6px !important;
        bottom: 6px !important;
        max-height: 40vh !important;
        padding: 7px 8px 6px !important;
    }

    #additionalFiltersPopup {
        top: 5vh !important;
        max-height: 88vh !important;
    }

    .plf-property-detail-page .plf-feature-detail-cover-img {
        min-height: 120px !important;
        max-height: min(28vh, 220px) !important;
    }

    .plf-property-detail-page #map-view .map-container,
    .plf-property-detail-page .map-view-container .map-container {
        min-height: 120px !important;
        height: min(28vh, 200px) !important;
    }

    .plf-property-detail-page .about-home,
    .plf-property-detail-page .facts-features,
    .plf-property-detail-page .listing-details {
        padding-top: 6px !important;
        padding-bottom: 6px !important;
    }

    .plf-mobile-back-to-top {
        bottom: 10px !important;
        right: 10px !important;
    }

    /* Homepage landscape compact mode (body.home + page-id-18; not PLF search templates) */
    body.home .wp-block-cover,
    body.page-id-18 .wp-block-cover {
        min-height: 180px !important;
    }

    body.home .wp-block-cover__inner-container,
    body.page-id-18 .wp-block-cover__inner-container {
        padding-top: 8px !important;
        padding-bottom: 8px !important;
    }

    /* Hide decorative intro lines in homepage hero on landscape */
    body.home .wp-block-cover__inner-container > p,
    body.page-id-18 .wp-block-cover__inner-container > p {
        display: none !important;
    }

    /* Keep the main branding headline but tighten it */
    body.home .wp-block-cover__inner-container h1,
    body.page-id-18 .wp-block-cover__inner-container h1 {
        font-size: 22px !important;
        line-height: 1.1 !important;
        margin: 8px 0 !important;
    }

    /* Reduce extra full-width padding feel */
    body.home .alignfull,
    body.page-id-18 .alignfull {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Prevent slight horizontal spill */
    body.home,
    body.page-id-18 {
        overflow-x: hidden !important;
    }
}
