﻿/* ==========================================================================
   Hero + Map/Name search bar
   Desktop: single pill bar. Tablet (<992px): 2-row card. Mobile (<576px): stacked.
   ========================================================================== */
:root {
    --hs-orange: #FA7616;
    --hs-orange-dark: #dd6a12;
    --hs-dark: #2b2b2b;
    --hs-text: #333;
    --hs-muted: #888;
    --hs-line: #e6e6e6;
    --hs-error: #d93025;
    position: relative;
    box-sizing: border-box;
}

    .hs *, .hs *::before, .hs *::after {
        box-sizing: border-box;
    }

.hs-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.hs-title {
    margin: 0 0 16px;
    font-size: clamp(30px, 5vw, 52px);
    line-height: 1.15;
    font-weight: 900;
    color: var(--hs-dark);
    max-width: 780px;
}

    .hs-title em {
        font-style: normal;
        color: var(--hs-orange);
    }

.hs-sub {
    margin: 0 0 24px;
    font-size: clamp(15px, 1.6vw, 18px);
    line-height: 1.4;
    color: var(--hs-text);
    max-width: 540px;
}

/* ---------- Bar ---------- */
.hs-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 880px;
    padding: 6px;
    background: #fff;
    border-radius: 999px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .08);
}

/* Map / Name toggle (real radio buttons, styled as a segmented pill) */
.hs-toggle {
    display: inline-flex;
    flex: 0 0 auto;
    margin: 0;
    padding: 4px;
    border: 0;
    border-radius: 999px;
    background: var(--hs-orange);
}

    .hs-toggle input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

    .hs-toggle label {
        min-width: 58px;
        padding: 7px 16px;
        border-radius: 999px;
        font-size: 14px;
        font-weight: 600;
        text-align: center;
        color: #fff;
        cursor: pointer;
        transition: background .2s, color .2s;
    }

    .hs-toggle input:checked + label {
        background: #fff;
        color: var(--hs-orange);
    }

    .hs-toggle input:focus-visible + label {
        outline: 2px solid var(--hs-dark);
        outline-offset: 2px;
    }

/* Selects */
.hs-field {
    position: relative;
    flex: 0 0 auto;
}

.hs-field--type {
    flex-basis: 180px;
}

.hs-field--loc {
    flex-basis: 130px;
}

.hs-select {
    width: 100%;
    height: 40px;
    padding: 0 28px 0 12px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center / 12px;
    font: inherit;
    font-size: 14px;
    color: var(--hs-text);
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

    .hs-select:focus-visible {
        outline: none;
        border-color: var(--hs-orange);
    }

.hs-field.is-invalid .hs-select {
    border-color: var(--hs-error);
    color: var(--hs-error);
}

/* Keyword + button */
.hs-keyword {
    flex: 1 1 auto;
    min-width: 0;
    height: 40px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 10px;
    font: inherit;
    font-size: 15px;
    color: var(--hs-text);
    background: transparent;
}

    .hs-keyword::placeholder {
        color: var(--hs-muted);
    }

    .hs-keyword:focus-visible {
        outline: none;
        border-color: var(--hs-orange);
    }

.hs-btn {
    flex: 0 0 auto;
    min-width: 120px;
    height: 46px;
    padding: 0 28px;
    border: 0;
    border-radius: 999px;
    background: var(--hs-orange);
    color: #fff;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
}

    .hs-btn:hover {
        background: var(--hs-orange-dark);
    }

    .hs-btn:focus-visible {
        outline: 2px solid var(--hs-dark);
        outline-offset: 2px;
    }

.hs-error {
    min-height: 20px;
    margin: 8px 0 0 24px;
    font-size: 13px;
    color: var(--hs-error);
}

/* Name mode: hide the map filters */
.hs[data-mode="name"] .hs-field {
    display: none;
}

.hs-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* Filters button: tablet & mobile only */
.hs-filter-btn {
    display: none;
    align-items: center;
    gap: 8px;
    min-width: 0;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--hs-line);
    border-radius: 10px;
    background: #fff;
    font: inherit;
    font-size: 14px;
    color: var(--hs-text);
    text-align: left;
    cursor: pointer;
}

    .hs-filter-btn svg {
        width: 18px;
        height: 18px;
        flex-shrink: 0;
    }

.hs-filter-text {
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.hs-filter-btn.has-value {
    border-color: var(--hs-orange);
    color: var(--hs-orange);
    font-weight: 600;
}

.hs-filter-btn.is-invalid {
    border-color: var(--hs-error);
    color: var(--hs-error);
}

.hs-filter-btn:focus-visible {
    outline: none;
    border-color: var(--hs-orange);
    box-shadow: 0 0 0 2px rgba(244, 123, 32, .25);
}

/* ---------- Tablet (Filters panel replaces the dropdowns) ---------- */
@media (max-width: 991.98px) {
    .hs-bar {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        grid-template-areas: "toggle filters filters" "kw kw btn";
        gap: 10px;
        padding: 14px;
        border-radius: 20px;
    }

    .hs-toggle {
        grid-area: toggle;
        justify-self: start;
    }

    .hs-filter-btn {
        grid-area: filters;
        display: flex;
    }

    .hs-field {
        display: none;
    }

    .hs-keyword {
        grid-area: kw;
        height: 44px;
        border-color: var(--hs-line);
    }

    .hs-btn[data-hs="submit"] {
        grid-area: btn;
        height: 44px;
    }

    .hs[data-mode="name"] .hs-filter-btn {
        display: none;
    }

    .hs-error {
        margin-left: 4px;
    }
}

/* ---------- Mobile ---------- */
@media (max-width: 575.98px) {
    .hs {
        padding: 28px 16px 32px;
    }

    .hs-bar {
        grid-template-columns: 1fr;
        grid-template-areas: "toggle" "filters" "kw" "btn";
    }

    .hs-toggle {
        justify-self: stretch;
    }

        .hs-toggle label {
            flex: 1;
        }

    .hs-btn[data-hs="submit"] {
        width: 100%;
    }
}

/* ==========================================================================
   Location trigger + menu
   ========================================================================== */
.hs-loc-trigger {
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

    .hs-loc-trigger.has-value {
        color: var(--hs-orange);
        font-weight: 600;
    }

.hs-field.is-invalid .hs-loc-trigger {
    border-color: var(--hs-error);
    color: var(--hs-error);
}

.hs-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 30;
    min-width: 180px;
    padding: 6px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .14);
}

    .hs-menu button {
        display: block;
        width: 100%;
        padding: 10px 12px;
        border: 0;
        border-radius: 8px;
        background: none;
        font: inherit;
        font-size: 14px;
        color: var(--hs-text);
        text-align: left;
        cursor: pointer;
    }

        .hs-menu button:hover, .hs-menu button:focus-visible {
            outline: none;
            background: #fff3ea;
            color: var(--hs-orange);
        }

/* ==========================================================================
   Location modal
   ========================================================================== */
html.hs-lock {
    overflow: hidden;
}

.hs-modal {
    width: min(720px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    padding: 0;
    border: 0;
    border-radius: 20px;
    background: #fff;
    color: var(--hs-text);
    box-shadow: 0 16px 48px rgba(0, 0, 0, .2);
}

    .hs-modal[open] {
        display: flex;
        flex-direction: column;
    }

    .hs-modal::backdrop {
        background: rgba(0, 0, 0, .45);
    }

.hs-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 20px 0;
}

.hs-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--hs-dark);
}

.hs-close {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: #f2f2f2;
    color: var(--hs-dark);
    cursor: pointer;
}

    .hs-close svg {
        width: 16px;
        height: 16px;
    }

    .hs-close:hover {
        background: #e6e6e6;
    }

    .hs-close:focus-visible {
        outline: 2px solid var(--hs-orange);
        outline-offset: 2px;
    }

.hs-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
    padding: 18px 20px 0;
}

.hs-tab {
    padding: 4px 0;
    border: 0;
    border-bottom: 2px solid transparent;
    background: none;
    font: inherit;
    font-size: 15px;
    color: var(--hs-text);
    cursor: pointer;
}

    .hs-tab[aria-selected="true"] {
        color: var(--hs-orange);
        font-weight: 700;
        border-bottom-color: var(--hs-orange);
    }

    .hs-tab:focus-visible {
        outline: 2px solid var(--hs-orange);
        outline-offset: 2px;
    }

.hs-modal-body {
    flex: 1 1 auto;
    min-height: 160px;
    overflow-y: auto;
    padding: 18px 20px 4px;
}

.hs-checks {
    columns: 2;
    column-gap: 20px;
}
/* column-major order, like the design */
.hs-check {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 22px;
    cursor: pointer;
    break-inside: avoid;
}

    .hs-check input {
        position: absolute;
        opacity: 0;
        width: 22px;
        height: 22px;
        margin: 0;
    }

.hs-box {
    flex: 0 0 22px;
    height: 22px;
    border: 1px solid #cfcfcf;
    border-radius: 5px;
    background: #fff;
    transition: background .15s, border-color .15s;
}

.hs-check:hover .hs-box {
    border-color: var(--hs-orange);
}

.hs-check input:checked + .hs-box {
    border-color: var(--hs-orange);
    background: var(--hs-orange) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") no-repeat center / 14px;
}

.hs-check input:focus-visible + .hs-box {
    outline: 2px solid var(--hs-orange);
    outline-offset: 2px;
}

.hs-modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    padding: 16px 20px 20px;
    border-top: 1px solid #f0f0f0;
}

.hs-btn-outline {
    min-width: 100px;
    height: 42px;
    padding: 0 24px;
    border: 1px solid var(--hs-orange);
    border-radius: 999px;
    background: #fff;
    color: var(--hs-orange);
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

    .hs-btn-outline:hover {
        background: #fff3ea;
    }

    .hs-btn-outline:focus-visible {
        outline: 2px solid var(--hs-dark);
        outline-offset: 2px;
    }

.hs-btn--sm {
    min-width: 100px;
    height: 42px;
    font-size: 15px;
}

@media (max-width: 575.98px) {
    .hs-modal {
        width: calc(100vw - 24px);
        max-height: calc(100vh - 24px);
        border-radius: 16px;
    }

    .hs-checks {
        columns: 1;
    }

    .hs-modal-foot {
        justify-content: stretch;
    }

        .hs-modal-foot > * {
            flex: 1;
        }

    .hs-menu {
        right: 0;
    }
}

/* ==========================================================================
   Tablet & mobile Filters panel
   ========================================================================== */
.hs-filters {
    width: min(640px, calc(100vw - 32px));
    height: min(900px, calc(100vh - 48px));
}

.hs-filters-head {
    padding: 20px 20px 16px;
    border-bottom: 1px solid #ececec;
}

    .hs-filters-head .hs-modal-title {
        font-size: 20px;
    }

.hs-filters-body {
    flex: 1 1 auto;
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* Collapsible sections (native <details>) */
.hs-sec {
    border-bottom: 1px solid #ececec;
}

    .hs-sec > summary {
        position: relative;
        display: block;
        padding: 18px 48px 18px 20px;
        font-size: 15px;
        font-weight: 700;
        color: var(--hs-dark);
        list-style: none;
        cursor: pointer;
    }

        .hs-sec > summary::-webkit-details-marker {
            display: none;
        }

        .hs-sec > summary::after { /* chevron: up when open, down when closed */
            content: "";
            position: absolute;
            right: 22px;
            top: 50%;
            width: 8px;
            height: 8px;
            margin-top: -2px;
            border-left: 1.5px solid var(--hs-text);
            border-top: 1.5px solid var(--hs-text);
            transform: rotate(45deg);
            transition: transform .2s;
        }

    .hs-sec:not([open]) > summary::after {
        transform: rotate(225deg);
        margin-top: -6px;
    }

    .hs-sec > summary:focus-visible {
        outline: 2px solid var(--hs-orange);
        outline-offset: -2px;
    }

    .hs-sec > :not(summary) {
        margin-left: 20px;
        margin-right: 20px;
    }

    .hs-sec > :last-child {
        padding-bottom: 20px;
    }

.hs-sec-err {
    display: none;
    margin-top: -6px;
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--hs-error);
}

.hs-sec.is-invalid .hs-sec-err {
    display: block;
}

.hs-sec.is-invalid > summary {
    color: var(--hs-error);
}

/* Chips (single-select radios) */
.hs-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hs-chip-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.hs-chip {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 16px;
    border: 1px solid #d5d5d5;
    border-radius: 999px;
    background: #fff;
    font-size: 13px;
    color: var(--hs-text);
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}

    .hs-chip:hover {
        border-color: var(--hs-orange);
    }

.hs-chip-input:checked + .hs-chip {
    border-color: var(--hs-orange);
    background: #fff3ea;
    color: var(--hs-orange);
}

.hs-chip-input:focus-visible + .hs-chip {
    outline: 2px solid var(--hs-orange);
    outline-offset: 2px;
}

/* Location inside the panel */
.hs-filters .hs-tabs {
    padding: 0 0 14px;
}

.hs-filters .hs-tab {
    font-size: 14px;
}

.hs-filters .hs-checks {
    columns: 2;
    column-gap: 16px;
}

.hs-filters .hs-check {
    font-size: 13px;
    gap: 10px;
    margin-bottom: 10px;
    line-height: 20px;
}

    .hs-filters .hs-check input {
        width: 20px;
        height: 20px;
    }

.hs-filters .hs-box {
    flex-basis: 20px;
    height: 20px;
}

.hs-filters .hs-modal-foot {
    justify-content: flex-end;
}

    .hs-filters .hs-modal-foot > * {
        flex: 0 0 auto;
    }

/* Mobile: full-screen sheet */
@media (max-width: 575.98px) {
    .hs-filters {
        width: 100vw;
        max-width: 100vw;
        height: 100%;
        max-height: 100%;
        margin: 0;
        border-radius: 0;
    }

    .hs-filters-head {
        padding: 18px 16px 14px;
    }

    .hs-sec > summary {
        padding: 16px 44px 16px 16px;
    }

        .hs-sec > summary::after {
            right: 18px;
        }

    .hs-sec > :not(summary) {
        margin-left: 16px;
        margin-right: 16px;
    }

    .hs-filters .hs-checks {
        column-gap: 12px;
    }

    .hs-filters .hs-check {
        font-size: 12px;
        gap: 8px;
        line-height: 18px;
    }
}
/* Very narrow phones: one column so labels stay readable */
@media (max-width: 359.98px) {
    .hs-filters .hs-checks {
        columns: 1;
    }
}

/* ==========================================================================
   Property-Type driven fields
   data-kind on .hs: "none" | "location" | "subtype"
   ========================================================================== */
.hs [hidden] {
    display: none !important;
}

.hs-field--sub {
    flex-basis: 140px;
}

.hs:not([data-kind="subtype"]) .hs-field--sub {
    display: none;
}

.hs[data-kind="subtype"] .hs-field--loc {
    display: none;
}

.hs-keyword.is-invalid {
    border-color: var(--hs-error);
}

.hs-menu-hint {
    margin: 0;
    padding: 10px 12px;
    font-size: 13px;
    color: var(--hs-muted);
    white-space: nowrap;
}

.hs-modal-hint {
    margin: 6px 20px 0;
    font-size: 13px;
    color: var(--hs-muted);
}

.hs-sec-note {
    margin-top: -6px;
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--hs-muted);
}

/* Sub-type lists: 2 columns filled row by row (alphabetical across, like the design) */
.hs .hs-rows .hs-checks,
.hs-filters .hs-rows .hs-checks {
    columns: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 20px;
}

@media (max-width: 359.98px) {
    .hs .hs-rows .hs-checks, .hs-filters .hs-rows .hs-checks {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Compact variant: search bar only, for the top of MapsSearch.aspx / FindAgent.aspx
   <uc:HeroSearch runat="server" Variant="compact" DefaultMode="map|name" />
   ========================================================================== */
.hs--compact {
    padding: 16px;
    background: #fff; /* no hero image */
    border-bottom: 1px solid var(--hs-line);
}

    .hs--compact .hs-bar {
        max-width: none;
        border: 1px solid var(--hs-line);
        box-shadow: 0 2px 10px rgba(0, 0, 0, .05);
    }

    .hs--compact .hs-error {
        min-height: 0;
        margin-top: 6px;
    }

        .hs--compact .hs-error:empty {
            display: none;
        }

@media (max-width: 991.98px) {
    .hs--compact {
        padding: 12px;
    }

        .hs--compact .hs-bar {
            padding: 10px;
        }
}

@media (max-width: 575.98px) {
    .hs--compact {
        padding: 10px 12px;
    }
}
