﻿/*
 * Luxury hero search — frosted panel, understated dividers (uses css/tokens.css).
 */

.hero-search-scope {
    width: 100%;
    margin-top: 2.75rem;
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
}

.hero-search-label-overline {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.42em;
    text-transform: uppercase;
    color: rgba(237, 240, 245, 0.45);
    margin-bottom: 1rem;
    text-align: center;
}

.hero-search-shell {
    position: relative;
    padding: 1px;
    border-radius: 3px;
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.22),
        rgba(255, 255, 255, 0.04) 40%,
        rgba(255, 255, 255, 0.08)
    );
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.06) inset,
        0 24px 64px rgba(0, 0, 0, 0.35),
        0 4px 20px rgba(0, 0, 0, 0.2);
}

.hero-search-shell-inner {
    display: grid;
    grid-template-columns: 1.1fr 1fr 1fr auto;
    align-items: stretch;
    gap: 0;
    background: rgba(18, 18, 22, 0.65);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border-radius: 2px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.07);
}

@media (max-width: 991px) {
    .hero-search-shell-inner {
        grid-template-columns: 1fr;
    }
}

.hero-search-field-wrap {
    position: relative;
    padding: 1.15rem 1.35rem 1.05rem;
    border-right: 1px solid rgba(255, 255, 255, 0.07);
}

@media (max-width: 991px) {
    .hero-search-field-wrap {
        border-right: none;
    }

    .hero-search-field-wrap:nth-child(-n + 3) {
        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    }
}

.hero-search-caption {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-sans);
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: rgba(237, 240, 245, 0.38);
    margin-bottom: 0.52rem;
}

.hero-search-caption i {
    font-size: 0.85rem;
    color: rgba(237, 240, 245, 0.32);
}

.hero-search-select {
    display: block;
    width: 100%;
    font-family: var(--font-sans);
    font-size: 0.92rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: rgba(255, 255, 255, 0.96);
    background: transparent;
    border: none;
    padding: 0.15rem 1.85rem 0.15rem 0;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='rgba(255,255,255,0.35)' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    line-height: 1.45;
}

.hero-search-select:focus-visible {
    outline: 1px solid rgba(255, 255, 255, 0.22);
    outline-offset: 3px;
}

.hero-search-select:focus {
    outline: none;
}

.hero-search-select option {
    color: var(--black);
    background: var(--bg-cream);
    padding: 0.35rem;
}

.hero-search-submit-wrap {
    display: flex;
    align-items: stretch;
    border-left: 1px solid rgba(255, 255, 255, 0.07);
}

.hero-search-submit {
    min-width: 132px;
    padding: 0 1.5rem;
    font-family: var(--font-sans);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--black);
    background: var(--interactive);
    border: none;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.2s ease, box-shadow 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.12) inset;
}

.hero-search-submit:hover {
    background: var(--interactive-hover);
    box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.2) inset, 0 8px 32px rgba(0, 0, 0, 0.35);
}

.hero-search-submit:active {
    transform: scale(0.98);
}

.hero-search-submit i {
    font-size: 1.15rem;
    opacity: 0.85;
    line-height: 1;
}

@media (max-width: 991px) {
    .hero-search-submit-wrap {
        width: 100%;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.07);
    }

    .hero-search-submit {
        width: 100%;
        min-height: 3.35rem;
    }
}

.hero-browse-muted {
    margin-top: 1.35rem;
    text-align: center;
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero-browse-muted a {
    color: rgba(237, 240, 245, 0.45);
    text-decoration: none;
    transition: color 0.2s ease, letter-spacing 0.2s ease;
    border-bottom: 1px solid rgba(237, 240, 245, 0.15);
    padding-bottom: 1px;
}

.hero-browse-muted a:hover {
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 0.22em;
    border-bottom-color: rgba(255, 255, 255, 0.28);
}

/* ═══════════════════════════════════════════
 * Floating search (light) — between hero & content below
 * ═══════════════════════════════════════════ */

.hero-search-floating-scope {
    width: 100%;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    overflow: visible;
}

.hero-rs-stack {
    position: relative;
    text-align: left;
    overflow: visible;
}

/* ════════════════════════════════════════════════════════
 * .htabs / .htab  —  Sale / Rent toggle strip
 *
 * Strategy: the button itself is always transparent.
 * Active state is conveyed entirely through CHILD SPANS
 * (.htab__pill, .htab__dot, .htab__arrow) that are shown
 * or hidden via CSS class  .htab--active.
 * This avoids all <button> UA-stylesheet / Bootstrap
 * specificity wars on background-color.
 * ════════════════════════════════════════════════════════ */

/* Container strip */
.htabs {
    display: inline-flex;
    align-items: stretch;
    gap: 3px;
    border-radius: 10px 10px 0 0;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-bottom: none;
    position: relative;
    z-index: 4;
    overflow: visible;
}

/* Button reset — completely transparent, never gets a background */
.htab {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0.6rem 1.35rem;
    border: none;
    background: transparent !important;
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
    overflow: visible;
    min-width: 5.5rem;              /* fixed width → no layout shift on switch */

    border-radius: 8px 8px 0 0;
}
/* ── Pill (active background) ── */
.htab__pill {
    display: block;                 /* always in DOM so no reflow */
    position: absolute;
    inset: 0;
    background: #111111;
    border-radius: 8px 8px 0 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.18s ease;
}
.htab--active .htab__pill {
    opacity: 1;
}

/* ── Label (text + dot wrapper) ── */
.htab__label {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 700;               /* fixed weight → no reflow */
    letter-spacing: 0.13em;         /* fixed spacing → no reflow */
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.48);   /* inactive */
    transition: color 0.18s ease;
}
.htab--active .htab__label {
    color: #ffffff;
}

/* ── Dot ── */
.htab__dot {
    display: inline-block;          /* always in flow → no layout shift */
    width: 6px;
    height: 6px;
    min-width: 6px;
    border-radius: 50%;
    background: #ffffff;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.18s ease;
}
.htab--active .htab__dot {
    opacity: 1;
}

/* ── Arrow (triangle pointing to search box) ── */
.htab__arrow {
    display: block;
    position: absolute;
    left: 50%;
    bottom: -9px;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 9px solid transparent;
    border-right: 9px solid transparent;
    border-top: 9px solid #111111;
    pointer-events: none;
    z-index: 6;
    opacity: 0;
    transition: opacity 0.18s ease;
}
.htab--active .htab__arrow {
    opacity: 1;
}

/* Hover on inactive tab */
.htab:not(.htab--active):hover .htab__label {
    color: rgba(255, 255, 255, 0.78);
}


.hero-search-shell.hero-search-shell--light {
    position: relative;
    z-index: 1;
    margin-top: 0;
    padding: 1px;
    border-radius: 0 12px 12px 12px;
    background: var(--border-light);
    box-shadow: var(--shadow-lg);
}

.hero-rs-tab--active ~ *,
.hero-rs-tabs + .hero-search-shell.hero-search-shell--light {
    border-top-left-radius: 0;
}

.hero-search-shell.hero-search-shell--light:first-of-type {
    border-radius: 12px;
}

/* When tabs present: soften top seam */
.hero-rs-stack .hero-search-shell.hero-search-shell--light {
    border-radius: 0 12px 12px 12px;
    margin-top: -1px;
}

.hero-rs-stack:first-child .hero-search-shell.hero-search-shell--light {
    border-radius: 12px;
}

.hero-search-shell-inner.hero-search-shell-inner--light {
    background: var(--bg-white);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-radius: inherit;
    border: none;
    overflow: visible;
    box-shadow: none;
}

.hero-search-field-wrap.hero-search-field-wrap--light {
    border-right: 1px solid var(--border-light);
    padding: 1rem 1.15rem 0.95rem;
    position: relative;
}

/* Lift open dropdown above siblings (floating bar) */
.hero-search-shell-inner.hero-search-shell-inner--light
    .hero-search-field-wrap.hero-search-field-wrap--light:has(.hero-luxury-select--open) {
    z-index: 48;
}

.hero-search-caption.hero-search-caption--light {
    color: var(--text-muted);
    letter-spacing: 0.18em;
}

.hero-search-caption.hero-search-caption--light i {
    color: var(--text-subtle);
}

/* ── Luxury custom selects (replacing native <select> dropdown UI) ── */

.hero-luxury-select {
    position: relative;
    width: 100%;
}

.hero-luxury-select--open {
    z-index: 1;
}

.hero-luxury-select-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    width: 100%;
    min-height: 2.2rem;
    padding: 0.25rem 0.05rem;
    cursor: pointer;
    font-family: var(--font-sans);
    color: var(--text-dark);
    letter-spacing: 0.035em;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    -webkit-tap-highlight-color: transparent;
    transition:
        border-color 0.2s ease,
        box-shadow 0.22s ease,
        background-color 0.2s ease;
}

.hero-luxury-select-trigger::-moz-focus-inner {
    border: 0;
}

.hero-luxury-select-value {
    flex: 1;
    font-size: 0.94rem;
    font-weight: 600;
    line-height: 1.38;
}

.hero-luxury-select-chevron {
    flex-shrink: 0;
    display: inline-flex;
    opacity: 0.5;
    font-size: 0.78rem;
    transition: opacity 0.2s ease, transform 0.28s cubic-bezier(0.33, 1, 0.68, 1);
}

.hero-luxury-select-trigger:hover {
    border-color: rgba(90, 98, 114, 0.12);
    background: rgba(90, 98, 114, 0.03);
}

.hero-luxury-select-trigger:hover .hero-luxury-select-chevron {
    opacity: 0.75;
}

.hero-luxury-select-trigger:focus {
    outline: none !important;
    box-shadow: none !important;
}

.hero-luxury-select-trigger:focus-visible {
    outline: none !important;
    border-color: rgba(90, 98, 114, 0.28);
    box-shadow:
        0 0 0 1px rgba(90, 98, 114, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.hero-luxury-select--open .hero-luxury-select-trigger {
    border-color: rgba(90, 98, 114, 0.16);
    background: rgba(250, 250, 248, 0.95);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.98),
        0 6px 20px rgba(26, 26, 26, 0.05);
}

.hero-luxury-select--open .hero-luxury-select-chevron {
    transform: rotate(-180deg);
    opacity: 0.92;
}

.hero-luxury-select-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 7px);
    z-index: 60;
    max-height: min(300px, 52vh);
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0.42rem;
    border-radius: 12px;
    border: 1px solid rgba(26, 26, 26, 0.08);
    background: linear-gradient(180deg, #ffffff 0%, #faf9f7 100%);
    box-shadow:
        0 24px 64px rgba(26, 26, 26, 0.12),
        0 10px 24px rgba(26, 26, 26, 0.07),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

@media (prefers-reduced-motion: reduce) {
    .hero-luxury-select-trigger,
    .hero-luxury-select-chevron {
        transition-duration: 0.01ms;
    }
}

.hero-luxury-option {
    display: block;
    width: 100%;
    text-align: start;
    margin: 0;
    padding: 0.6rem 0.82rem;
    cursor: pointer;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    line-height: 1.42;
    color: var(--charcoal-3);
    background: transparent;
    border: none;
    border-radius: 8px;
    -webkit-tap-highlight-color: transparent;
    transition:
        background-color 0.18s ease,
        color 0.18s ease;
}

.hero-luxury-option::-moz-focus-inner {
    border: 0;
}

.hero-luxury-option:hover {
    color: var(--text-dark);
    background: rgba(90, 98, 114, 0.09);
}

.hero-luxury-option:focus {
    outline: none !important;
}

.hero-luxury-option:focus-visible {
    outline: none !important;
    box-shadow: inset 0 0 0 1px rgba(90, 98, 114, 0.32);
    background: rgba(90, 98, 114, 0.07);
}

.hero-luxury-option--active {
    font-weight: 600;
    color: var(--black);
    background: rgba(90, 98, 114, 0.1);
    box-shadow: inset 3px 0 0 var(--charcoal-3);
}

.hero-luxury-option--active:hover {
    color: var(--black);
    background: rgba(90, 98, 114, 0.14);
}

.hero-search-submit-wrap.hero-search-submit-wrap--light {
    border-left: 1px solid var(--border-light);
}

/* Floating bar: same interactive CTA as dark hero (--interactive white + --black text) */
.hero-search-submit.hero-search-submit--floating {
    min-width: 132px;
    color: var(--black);
    background: var(--interactive);
    box-shadow:
        0 -1px 0 rgba(255, 255, 255, 0.12) inset,
        0 8px 28px rgba(0, 0, 0, 0.1);
}

.hero-search-submit.hero-search-submit--floating:hover {
    background: var(--interactive-hover);
    color: var(--black);
    box-shadow:
        0 -1px 0 rgba(255, 255, 255, 0.2) inset,
        0 8px 32px rgba(0, 0, 0, 0.16);
}

.hero-search-submit.hero-search-submit--floating:active {
    transform: scale(0.98);
}

.hero-browse-muted.hero-browse-muted--light {
    text-align: center;
    margin-top: 1rem;
}

.hero-browse-muted.hero-browse-muted--light a {
    color: var(--text-muted);
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

.hero-browse-muted.hero-browse-muted--light a:hover {
    color: var(--charcoal);
    border-bottom-color: rgba(0, 0, 0, 0.25);
}

@media (max-width: 991px) {
    .hero-rs-tabs {
        width: 100%;
        box-shadow: none;
    }

    .hero-rs-tab {
        flex: 1;
        text-align: center;
    }

    .hero-search-shell.hero-search-shell--light {
        border-radius: 0 0 12px 12px;
    }

    .hero-search-field-wrap.hero-search-field-wrap--light:nth-child(-n + 3) {
        border-bottom: 1px solid var(--border-light);
    }

    .hero-search-submit-wrap.hero-search-submit-wrap--light {
        border-left: none;
    }
}
