/* ============================================================================
   SmartSearch — premium AI room search (Atria Hotel)
   One open cream/ivory composition. No hard boxed cards.
   Visual classes only; JS behaviour hooks (ids, data-*, *-chip) live in markup.
   ========================================================================== */

/* ── Page surface ───────────────────────────────────────────────────────── */
.smart-search-page {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    padding: clamp(2.5rem, 5vw, 4.5rem) 0 4rem;
    color: #071323;
    background:
        radial-gradient(circle at 80% 6%, rgba(212, 169, 66, .20), transparent 34rem),
        radial-gradient(circle at 6% 14%, rgba(255, 249, 240, .9), transparent 30rem),
        radial-gradient(circle at 92% 88%, rgba(201, 153, 46, .10), transparent 32rem),
        linear-gradient(165deg, #FAF5EC 0%, #F7F1E8 52%, #F4ECDD 100%);
}

.smart-search-page::before,
.smart-search-page::after {
    content: "";
    position: absolute;
    inset: auto;
    pointer-events: none;
    z-index: -1;
}

/* soft gold ring, top-right */
.smart-search-page::before {
    width: 40rem;
    height: 40rem;
    right: -18rem;
    top: -16rem;
    border: 1px solid rgba(201, 153, 46, .14);
    border-radius: 50%;
    box-shadow: inset 0 0 0 6rem rgba(201, 153, 46, .04);
}

/* faint blueprint grid fading up from the bottom */
.smart-search-page::after {
    left: 0;
    right: 0;
    bottom: 0;
    height: 18rem;
    background:
        linear-gradient(90deg, rgba(201, 153, 46, .07) 1px, transparent 1px),
        linear-gradient(0deg, rgba(7, 19, 35, .04) 1px, transparent 1px);
    background-size: 84px 84px;
    mask-image: linear-gradient(to top, rgba(0, 0, 0, .55), transparent);
}

.smart-search-container {
    width: min(1320px, calc(100% - 2rem));
    margin: 0 auto;
}

/* ── Hero composition — one soft surface holding both halves ─────────────── */
.smart-search-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr);
    gap: 3rem;
    align-items: start;
    padding: clamp(1.75rem, 3.2vw, 2.75rem);
    border-radius: 34px;
    background:
        radial-gradient(120% 90% at 88% -8%, rgba(212, 169, 66, .12), transparent 52%),
        radial-gradient(80% 70% at 3% 3%, rgba(255, 255, 255, .5), transparent 44%),
        rgba(255, 250, 242, .72);
    border: 1px solid rgba(201, 153, 46, .12);
    box-shadow: 0 30px 80px rgba(7, 19, 35, .09), inset 0 1px 0 rgba(255, 255, 255, .6);
}

/* ── Left half: preferences — open on the surface, no card chrome ───────── */
.smart-search-preferences {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.smart-search-prefs-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.6rem;
}

.smart-search-badge {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    width: fit-content;
    padding: .38rem .85rem;
    border-radius: 999px;
    background: rgba(201, 168, 76, .13);
    border: 1px solid rgba(201, 168, 76, .28);
    color: #7d6426;
    font-size: .73rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.smart-search-title {
    margin: .75rem 0 .35rem;
    color: #081424;
    font-family: "Playfair Display", serif;
    font-size: clamp(1.75rem, 2.7vw, 2.45rem);
    font-weight: 700;
    line-height: 1.08;
}

.smart-search-subtitle {
    margin: 0;
    color: #6f7786;
    font-size: .98rem;
}

.smart-search-count {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    flex-shrink: 0;
    margin-top: .12rem;
    padding: .55rem .85rem;
    border-radius: 999px;
    color: #0a1628;
    background: #fffaf0;
    border: 1px solid rgba(201, 168, 76, .24);
    box-shadow: 0 8px 20px rgba(10, 22, 40, .07);
    font-weight: 800;
    font-size: .78rem;
}

/* Preference groups are rows separated by hairlines — never boxed cards */
.smart-search-sections {
    display: grid;
    gap: 0;
}

.smart-search-section {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 1rem;
    padding: 1.15rem 0;
    border-top: 1px solid rgba(10, 22, 40, .08);
}

.smart-search-section:first-child {
    border-top: 0;
    padding-top: 0;
}

.smart-search-section__icon {
    width: 46px;
    height: 46px;
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #0a1628, #132746);
    color: var(--gold, #c9a84c);
    box-shadow: 0 12px 24px rgba(10, 22, 40, .18);
}

.smart-search-section__icon i {
    font-size: 1.12rem;
}

.smart-search-section__main {
    min-width: 0;
}

.smart-search-section__label {
    display: block;
    margin-bottom: .72rem;
    color: #8a7440;
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.smart-search-controls {
    display: grid;
    gap: .75rem;
}

/* ── Inputs ──────────────────────────────────────────────────────────────── */
.smart-search-price-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .7rem;
}

.smart-search-price-field,
.smart-search-note {
    position: relative;
    display: block;
}

.smart-search-price-field input,
.smart-search-note textarea,
.smart-search-advanced-body .form-control,
.smart-search-advanced-body .form-select {
    width: 100%;
    border: 1px solid rgba(10, 22, 40, .12);
    border-radius: 16px;
    background: rgba(255, 255, 255, .72);
    color: #0a1628;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.smart-search-price-field input {
    min-height: 48px;
    padding: .7rem 3.2rem .7rem 1rem;
    font-weight: 700;
}

.smart-search-price-field span {
    display: block;
    margin-bottom: .35rem;
    color: #6b7280;
    font-size: .72rem;
    font-weight: 700;
}

.smart-search-price-field b {
    position: absolute;
    right: .9rem;
    bottom: .82rem;
    color: #9a7b2e;
    font-size: .72rem;
    letter-spacing: .06em;
}

.smart-search-price-field input:focus,
.smart-search-note textarea:focus,
.smart-search-advanced-body .form-control:focus,
.smart-search-advanced-body .form-select:focus {
    outline: none;
    border-color: var(--site-accent, rgba(201, 168, 76, .72));
    background: #fff;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--site-accent, #c9a84c) 16%, transparent);
}

.smart-search-note textarea {
    resize: vertical;
    min-height: 92px;
    max-height: 180px;
    padding: .95rem 1rem 1.75rem;
    line-height: 1.5;
}

.smart-search-note__counter {
    position: absolute;
    right: .9rem;
    bottom: .55rem;
    color: #8d96a5;
    font-size: .72rem;
    font-weight: 700;
}

/* ── Chips ───────────────────────────────────────────────────────────────── */
.smart-search-chipset {
    display: flex;
    flex-wrap: wrap;
    gap: .56rem;
}

.smart-search-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .42rem;
    min-height: 38px;
    padding: .56rem .85rem;
    border: 1px solid rgba(10, 22, 40, .11);
    border-radius: 999px;
    background: rgba(255, 255, 255, .68);
    color: #263244;
    font-size: .84rem;
    font-weight: 750;
    line-height: 1;
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
}

.smart-search-chip:hover {
    transform: translateY(-1px);
    border-color: rgba(201, 168, 76, .68);
    box-shadow: 0 10px 22px rgba(10, 22, 40, .08);
}

.smart-search-chip.is-active {
    background: linear-gradient(145deg,
        color-mix(in srgb, var(--site-accent, #f3d987) 42%, transparent),
        color-mix(in srgb, var(--site-accent, #d4a942) 24%, transparent));
    border-color: var(--site-accent, rgba(201, 153, 46, .72));
    color: var(--site-text, #071323);
    box-shadow: 0 10px 22px rgba(201, 153, 46, .2);
}

.smart-search-chip.is-active i {
    color: #b5841f;
}

.smart-search-chip--guest {
    min-width: 46px;
    height: 46px;
    padding: 0 .9rem;
    border-radius: 999px;
    font-size: .95rem;
}

/* ── Advanced (dates/sort) ──────────────────────────────────────────────── */
.smart-search-advanced-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border: 1px solid rgba(10, 22, 40, .1);
    border-radius: 17px;
    padding: .85rem 1rem;
    background: rgba(255, 255, 255, .58);
    color: #0a1628;
    font-weight: 850;
}

.smart-search-advanced-toggle .toggle-copy {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}

.smart-search-advanced-toggle .chev {
    transition: transform .2s ease;
}

.smart-search-advanced-toggle.is-open .chev {
    transform: rotate(180deg);
}

.smart-search-advanced-body {
    display: none;
    margin-top: .85rem;
    padding: 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, .48);
    border: 1px solid rgba(10, 22, 40, .08);
}

.smart-search-advanced-body.is-open {
    display: block;
}

.smart-search-advanced-body label {
    color: #6d7480;
    font-size: .72rem;
    font-weight: 850;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.smart-search-date-info {
    display: flex;
    gap: .55rem;
    margin-top: .85rem;
    padding: .75rem .85rem;
    border-radius: 15px;
    background: rgba(201, 168, 76, .11);
    border: 1px solid rgba(201, 168, 76, .2);
    color: #6f5d2b;
    font-size: .8rem;
    line-height: 1.45;
}

/* ── Actions ─────────────────────────────────────────────────────────────── */
.smart-search-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .75rem;
    margin-top: 1.25rem;
}

.smart-search-btn-primary,
.smart-search-btn-reset {
    min-height: 50px;
    border-radius: var(--site-button-radius, 16px) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    font-weight: 850;
}

.smart-search-btn-primary {
    /* Themed primary button; falls back to the original gold gradient when theme is off */
    background: var(--site-btn-primary-bg, linear-gradient(135deg, #f3d987, #c9a84c 58%, #a98231));
    color: var(--site-btn-primary-text, #07101d);
    border: 0;
    box-shadow: 0 12px 28px rgba(201, 168, 76, .34);
}

.smart-search-btn-primary:hover {
    color: var(--site-btn-primary-text, #07101d);
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(201, 168, 76, .42);
}

.smart-search-btn-reset {
    border: 1px solid rgba(10, 22, 40, .12);
    background: rgba(255, 255, 255, .68);
    color: #0a1628;
    padding: 0 1rem;
}

/* ── Right half: AI concierge — open zone, defined by orb + soft capsules ── */
.smart-search-ai {
    position: relative;
    z-index: 1;
    min-width: 0;
    overflow: visible;
    color: #071323;
    padding: clamp(.5rem, 1.4vw, 1.1rem) clamp(.25rem, 1vw, 1rem);
    background: radial-gradient(circle at 50% 7%, rgba(212, 169, 66, .16), transparent 15rem);
}

/* faint vertical seam in the gutter — connects the halves, never a hard border */
.smart-search-ai::before {
    content: "";
    position: absolute;
    left: -1.5rem;
    top: 8%;
    height: 84%;
    width: 1px;
    background: linear-gradient(180deg, transparent, rgba(201, 153, 46, .28) 20%, rgba(201, 153, 46, .28) 80%, transparent);
    pointer-events: none;
}

.smart-search-ai__inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* ── AI orb ──────────────────────────────────────────────────────────────── */
.smart-search-orb {
    position: relative;
    width: 156px;
    height: 156px;
    margin: .35rem auto 1.4rem;
    display: grid;
    place-items: center;
}

.smart-search-orb__glow {
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 169, 66, .30), transparent 68%);
    filter: blur(6px);
    pointer-events: none;
}

.smart-search-orb__ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid rgba(201, 153, 46, .42);
    animation: smartOrbRing 2.8s ease-in-out infinite;
    pointer-events: none;
}

.smart-search-orb__ring.ring-2 {
    inset: 16px;
    border-color: rgba(201, 153, 46, .28);
    animation-delay: .5s;
}

.smart-search-orb__ring.ring-3 {
    inset: 32px;
    border-color: rgba(201, 153, 46, .18);
    animation-delay: .95s;
}

.smart-search-orb__core {
    position: relative;
    z-index: 1;
    width: 108px;
    height: 108px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 36% 26%, #1c3050 0%, #0d1c33 42%, #071323 100%);
    border: 1px solid rgba(212, 169, 66, .55);
    box-shadow:
        0 0 0 6px rgba(255, 250, 242, .5),
        0 18px 38px rgba(7, 19, 35, .30),
        inset 0 2px 10px rgba(255, 255, 255, .10),
        inset 0 0 26px rgba(212, 169, 66, .18);
}

.smart-search-orb__wave {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    height: 38px;
}

.smart-search-orb__wave span {
    display: block;
    width: 4px;
    height: 30%;
    border-radius: 999px;
    background: linear-gradient(180deg, #f3d987, #d4a942 70%, #c9992e);
    box-shadow: 0 0 8px rgba(212, 169, 66, .55);
    animation: smartOrbWave 1.5s ease-in-out infinite;
}

.smart-search-orb__wave span:nth-child(1) { animation-delay: 0s; }
.smart-search-orb__wave span:nth-child(2) { animation-delay: .18s; }
.smart-search-orb__wave span:nth-child(3) { animation-delay: .36s; }
.smart-search-orb__wave span:nth-child(4) { animation-delay: .54s; }
.smart-search-orb__wave span:nth-child(5) { animation-delay: .36s; }
.smart-search-orb__wave span:nth-child(6) { animation-delay: .18s; }
.smart-search-orb__wave span:nth-child(7) { animation-delay: 0s; }

/* Analyzing state — orb pulses, rings + wave speed up */
.smart-search-ai.is-analyzing .smart-search-orb__core {
    animation: smartOrbPulse 1.25s ease-in-out infinite;
}

.smart-search-ai.is-analyzing .smart-search-orb__ring {
    animation-duration: 1.5s;
}

.smart-search-ai.is-analyzing .smart-search-orb__wave span {
    animation-duration: .62s;
}

/* Result state — calm, warm steady glow */
.smart-search-ai.is-result .smart-search-orb__core {
    animation: smartOrbCalm 3.4s ease-in-out infinite;
}

@keyframes smartOrbRing {
    0%, 100% { transform: scale(.92); opacity: .3; }
    50% { transform: scale(1.06); opacity: .7; }
}

@keyframes smartOrbPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 6px rgba(255, 250, 242, .5), 0 18px 38px rgba(7, 19, 35, .30), inset 0 0 26px rgba(212, 169, 66, .18); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 6px rgba(255, 250, 242, .5), 0 22px 50px rgba(212, 169, 66, .40), inset 0 0 32px rgba(212, 169, 66, .34); }
}

@keyframes smartOrbCalm {
    0%, 100% { box-shadow: 0 0 0 6px rgba(255, 250, 242, .5), 0 18px 38px rgba(7, 19, 35, .26), inset 0 0 26px rgba(212, 169, 66, .22); }
    50% { box-shadow: 0 0 0 6px rgba(255, 250, 242, .5), 0 18px 44px rgba(212, 169, 66, .30), inset 0 0 30px rgba(212, 169, 66, .30); }
}

@keyframes smartOrbWave {
    0%, 100% { height: 22%; opacity: .65; }
    50% { height: 92%; opacity: 1; }
}

/* ── AI status / titles ─────────────────────────────────────────────────── */
.smart-search-ai__title {
    margin: 0;
    color: #071323;
    font-family: "Playfair Display", serif;
    font-size: clamp(1.45rem, 2.2vw, 1.9rem);
    font-weight: 700;
    line-height: 1.18;
}

.smart-search-ai__subtitle {
    margin: .7rem auto 1.35rem;
    max-width: 28rem;
    color: #6B7280;
    font-size: .94rem;
    line-height: 1.62;
}

.smart-search-status {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    min-height: 34px;
    margin-bottom: 1.2rem;
    padding: .38rem .8rem;
    border-radius: 999px;
    background: rgba(212, 169, 66, .12);
    border: 1px solid rgba(201, 153, 46, .24);
    color: #8a6d22;
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .04em;
    transition: background .25s ease, border-color .25s ease, color .25s ease;
}

/* Soft state colours — no aggressive warning boxes, just a calm tint shift. */
.smart-search-status.is-searching {
    background: rgba(212, 169, 66, .18);
    border-color: rgba(201, 153, 46, .34);
    color: #8a6d22;
}

.smart-search-status.is-success {
    background: rgba(46, 160, 103, .12);
    border-color: rgba(46, 160, 103, .3);
    color: #1f7a4d;
}

.smart-search-status.is-empty {
    background: rgba(120, 130, 145, .12);
    border-color: rgba(120, 130, 145, .28);
    color: #5b6473;
}

.smart-search-status.is-error {
    background: rgba(201, 72, 72, .12);
    border-color: rgba(201, 72, 72, .3);
    color: #a23b3b;
}

/* ── AI process steps ───────────────────────────────────────────────────── */
.smart-search-steps {
    width: 100%;
    display: grid;
    gap: .66rem;
    margin-bottom: 1rem;
}

.smart-search-step {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: .7rem;
    min-height: 58px;
    padding: .65rem .8rem;
    border-radius: 17px;
    background: rgba(255, 255, 255, .62);
    border: 1px solid rgba(201, 153, 46, .16);
    color: #8b93a1;
    text-align: left;
    transition: border-color .2s ease, background .2s ease, color .2s ease, transform .2s ease;
}

.smart-search-step i {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #0d1c33, #142a4a);
    color: var(--gold, #d4a942);
}

.smart-search-step span {
    font-size: .84rem;
    font-weight: 750;
    line-height: 1.35;
}

.smart-search-step__dots {
    display: inline-flex;
    gap: .25rem;
}

.smart-search-step__dots b {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(201, 153, 46, .4);
    display: block;
}

.smart-search-step.is-active {
    color: #071323;
    border-color: rgba(201, 153, 46, .5);
    background: linear-gradient(145deg, rgba(243, 217, 135, .32), rgba(212, 169, 66, .16));
    box-shadow: 0 10px 24px rgba(201, 153, 46, .16);
    transform: translateY(-1px);
}

.smart-search-step.is-active .smart-search-step__dots b {
    animation: smartDot 1s ease-in-out infinite;
}

.smart-search-step.is-active .smart-search-step__dots b:nth-child(2) { animation-delay: .14s; }
.smart-search-step.is-active .smart-search-step__dots b:nth-child(3) { animation-delay: .28s; }

.smart-search-step.is-done {
    color: #071323;
    border-color: rgba(201, 153, 46, .28);
    background: rgba(255, 250, 242, .92);
}

.smart-search-step.is-done .smart-search-step__dots b {
    background: #c9992e;
}

.smart-search-step.is-done .smart-search-step__dots .bi-check2-circle {
    color: #2ea067;
    font-size: 1.05rem;
}

@keyframes smartDot {
    0%, 100% { transform: translateY(0); opacity: .35; }
    50% { transform: translateY(-4px); opacity: 1; }
}

/* ── AI result / empty state ────────────────────────────────────────────── */
.smart-search-ai__state {
    width: 100%;
    margin-top: auto;
    padding-top: .5rem;
}

.smart-search-empty,
.smart-search-summary {
    border-radius: 20px;
    background: rgba(255, 255, 255, .6);
    border: 1px dashed rgba(201, 153, 46, .34);
    padding: 1rem;
    color: #5b626e;
}

.smart-search-empty i {
    color: var(--gold, #c9992e);
    font-size: 1.35rem;
    margin-bottom: .45rem;
}

.smart-search-empty strong {
    display: block;
    color: #071323;
    font-size: .98rem;
    margin-bottom: .25rem;
}

.smart-search-empty p {
    margin: 0;
    font-size: .82rem;
    line-height: 1.55;
}

.smart-search-summary {
    display: none;
    text-align: left;
    border-style: solid;
    border-color: rgba(201, 153, 46, .24);
    background: rgba(255, 250, 242, .9);
}

.smart-search-summary__msg {
    color: #1c2433;
    font-size: .9rem;
    line-height: 1.55;
}

.smart-search-summary__msg strong {
    color: #071323;
}

.smart-search-summary__metric {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    margin-bottom: .65rem;
}

.smart-search-summary__metric strong {
    color: var(--site-accent, #c9992e);
    font-family: "Playfair Display", serif;
    font-size: 2rem;
    line-height: 1;
}

.smart-search-summary__metric span {
    color: #6B7280;
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .07em;
}

.smart-search-pref-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .42rem;
    margin-top: .85rem;
}

.smart-search-pref-chip {
    display: inline-flex;
    align-items: center;
    gap: .32rem;
    padding: .28rem .58rem;
    border-radius: 999px;
    background: rgba(212, 169, 66, .14);
    border: 1px solid rgba(201, 153, 46, .2);
    color: #6f5a22;
    font-size: .72rem;
    font-weight: 750;
}

.smart-search-note-soft {
    margin-top: .55rem;
    padding: .58rem .7rem;
    border-radius: 13px;
    background: rgba(212, 169, 66, .1);
    border: 1px solid rgba(201, 153, 46, .2);
    color: #6f5a22;
    font-size: .76rem;
    line-height: 1.45;
}

.smart-search-loading {
    display: grid;
    justify-items: center;
    gap: .45rem;
    color: #6f5a22;
}

.smart-search-loading i {
    color: var(--site-accent, #c9992e);
    font-size: 1.25rem;
}

.smart-search-panel-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .55rem;
    margin-top: .9rem;
}

.smart-search-panel-actions[hidden] {
    display: none !important;
}

.smart-search-panel-action {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    gap: .36rem;
    border: 1px solid rgba(201, 153, 46, .28);
    border-radius: 999px;
    padding: .42rem .72rem;
    background: rgba(255, 250, 242, .76);
    color: #4b3f1f;
    font-size: .75rem;
    font-weight: 850;
    text-decoration: none;
}

button.smart-search-panel-action {
    cursor: pointer;
}

.smart-search-panel-action:hover {
    color: #071323;
    border-color: rgba(201, 153, 46, .55);
    background: #fffaf0;
}

.smart-search-ai-recs {
    display: grid;
    gap: .85rem;
    margin-top: .9rem;
}

.smart-search-ai-rec {
    overflow: hidden;
    border-radius: 18px;
    background: #fffaf0;
    border: 1px solid rgba(10, 22, 40, .08);
    box-shadow: 0 14px 32px rgba(10, 22, 40, .08);
}

.smart-search-ai-rec__image {
    position: relative;
    height: 164px;
    background: linear-gradient(135deg, #0a1628, #182b4b);
}

.smart-search-ai-rec__image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.smart-search-ai-rec__image b {
    position: absolute;
    top: .7rem;
    right: .7rem;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    padding: .28rem .62rem;
    background: linear-gradient(135deg, #efd57d, #c9a84c);
    color: #081424;
    font-size: .74rem;
    box-shadow: 0 8px 18px rgba(201, 168, 76, .35);
}

.smart-search-ai-rec__placeholder {
    height: 100%;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, .42);
    font-size: 1.8rem;
}

.smart-search-ai-rec__body {
    padding: .95rem;
}

.smart-search-ai-rec__body h3 {
    margin: 0 0 .38rem;
    color: #071323;
    font-family: "Playfair Display", serif;
    font-size: 1.12rem;
    font-weight: 750;
    line-height: 1.2;
}

.smart-search-ai-rec__meta,
.smart-search-ai-rec__features,
.smart-search-ai-rec__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .38rem .62rem;
}

.smart-search-ai-rec__meta {
    color: #6f7786;
    font-size: .76rem;
    margin-bottom: .62rem;
}

.smart-search-ai-rec__body p {
    margin: 0 0 .65rem;
    color: #5d512f;
    font-size: .78rem;
    line-height: 1.48;
}

.smart-search-ai-rec__features {
    margin-bottom: .78rem;
}

.smart-search-ai-rec__features small {
    flex-basis: 100%;
    color: #8a7440;
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.smart-search-ai-rec__features span {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    border-radius: 999px;
    padding: .22rem .5rem;
    background: rgba(10, 22, 40, .06);
    color: #3c4655;
    font-size: .7rem;
    font-weight: 750;
}

.smart-search-ai-rec__footer {
    display: grid;
    gap: .75rem;
    padding-top: .78rem;
    border-top: 1px solid rgba(10, 22, 40, .08);
}

.smart-search-ai-rec__footer strong {
    color: #071323;
    font-family: "Playfair Display", serif;
    font-size: 1.22rem;
    line-height: 1;
}

.smart-search-ai-rec__footer small {
    margin-left: .35rem;
    color: #7b8491;
    font-size: .72rem;
}

.smart-search-ai-rec__total {
    display: block;
    margin-top: .18rem;
    color: #6f7786;
    font-size: .74rem;
}

.smart-search-ai-rec__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.smart-search-ai-rec__actions .btn {
    min-height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .78rem;
    font-weight: 850;
}

/* ── Results ─────────────────────────────────────────────────────────────── */
.smart-search-results {
    margin-top: clamp(2rem, 4vw, 3rem);
}

.smart-search-results__head {
    display: none;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.1rem;
}

.smart-search-results__head h2 {
    margin: 0;
    color: #0a1628;
    font-family: "Playfair Display", serif;
    font-size: clamp(1.65rem, 2.6vw, 2.2rem);
    font-weight: 750;
}

.smart-search-results__count {
    color: #7b8491;
    font-size: .86rem;
    font-weight: 750;
}

.smart-search-results__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

/* ── Room card ───────────────────────────────────────────────────────────── */
.smart-search-room-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 22px;
    background: #fffaf0;
    border: 1px solid rgba(10, 22, 40, .06);
    box-shadow: 0 14px 38px rgba(10, 22, 40, .1);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    /* Skip rendering/layout for off-screen cards — keeps long result lists smooth on scroll.
       The intrinsic size estimate prevents scrollbar jump while cards are virtualized. */
    content-visibility: auto;
    contain-intrinsic-size: auto 460px;
}

.smart-search-room-card:hover {
    transform: translateY(-4px);
    border-color: rgba(201, 168, 76, .28);
    box-shadow: 0 22px 48px rgba(10, 22, 40, .16);
}

.smart-search-room-card__image {
    position: relative;
    height: 205px;
    background: linear-gradient(135deg, #0a1628, #182b4b);
}

.smart-search-room-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.smart-search-room-card__placeholder {
    height: 100%;
    display: grid;
    place-items: center;
    color: rgba(255, 255, 255, .45);
    font-size: 2rem;
}

.smart-search-room-card__type,
.smart-search-room-card__score {
    position: absolute;
    top: .82rem;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    min-height: 28px;
    border-radius: 999px;
    padding: .28rem .68rem;
    font-size: .72rem;
    font-weight: 850;
    /* No backdrop-filter: blur over each card badge — it forces an expensive GPU
       repaint for every card while scrolling. Solid fills give the same look. */
}

.smart-search-room-card__type {
    left: .82rem;
    background: rgba(10, 22, 40, .92);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .13);
}

.smart-search-room-card__score {
    right: .82rem;
    background: var(--site-accent, linear-gradient(135deg, #efd57d, #c9a84c));
    color: var(--site-btn-primary-text, #081424);
    box-shadow: 0 8px 18px rgba(201, 168, 76, .35);
}

.smart-search-room-card__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.1rem;
}

.smart-search-room-card__body h3 {
    margin: 0 0 .35rem;
    color: #0a1628;
    font-family: "Playfair Display", serif;
    font-size: 1.2rem;
    font-weight: 750;
    line-height: 1.2;
}

.smart-search-room-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem .8rem;
    color: #6f7786;
    font-size: .8rem;
    margin-bottom: .75rem;
}

.smart-search-room-card__amenities {
    display: flex;
    flex-wrap: wrap;
    gap: .38rem;
    margin-bottom: .85rem;
}

.smart-search-room-card__amenity {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    border-radius: 999px;
    padding: .24rem .56rem;
    background: rgba(10, 22, 40, .06);
    color: #3c4655;
    font-size: .72rem;
    font-weight: 750;
}

.smart-search-room-card__reason {
    margin-bottom: .95rem;
    border-left: 3px solid var(--gold, #c9a84c);
    border-radius: 13px;
    background: rgba(201, 168, 76, .11);
    color: #5d512f;
    padding: .7rem .78rem;
    font-size: .8rem;
    line-height: 1.48;
}

.smart-search-room-card__footer {
    margin-top: auto;
    padding-top: .9rem;
    border-top: 1px solid rgba(10, 22, 40, .08);
}

.smart-search-room-card__price {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: .8rem;
    margin-bottom: .85rem;
}

.smart-search-room-card__price strong {
    display: block;
    color: #0a1628;
    font-family: "Playfair Display", serif;
    font-size: 1.35rem;
    line-height: 1.05;
}

.smart-search-room-card__price span {
    color: #7b8491;
    font-size: .74rem;
}

.smart-search-room-card__old-price {
    display: block;
    color: #98a1ad;
    font-size: .78rem;
    text-decoration: line-through;
    margin-bottom: .15rem;
}

.smart-search-room-card__estimate {
    color: #6f7786;
    font-size: .78rem;
    text-align: right;
}

.smart-search-room-card__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .55rem;
}

.smart-search-room-card__actions .btn {
    min-height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .38rem;
    font-size: .82rem;
    font-weight: 850;
}

.smart-search-room-card__actions .btn-outline-dark {
    border-color: rgba(10, 22, 40, .18);
    color: #0a1628;
}

/* ── Empty results ──────────────────────────────────────────────────────── */
.smart-search-empty-results {
    display: none;
    text-align: center;
    max-width: 560px;
    margin: 0 auto;
    padding: 3rem 1rem;
    color: #6f7786;
}

.smart-search-empty-results i {
    display: block;
    margin-bottom: .7rem;
    color: var(--site-accent, #c3a25a);
    font-size: 2rem;
}

/* ── Skeleton loading cards (shown while the AJAX search resolves) ─────────── */
.smart-search-skel-card {
    border-radius: 22px;
    overflow: hidden;
    background: #fffaf0;
    border: 1px solid rgba(10, 22, 40, .06);
    box-shadow: 0 14px 38px rgba(10, 22, 40, .06);
}

.smart-search-skel-card__img {
    height: 205px;
}

.smart-search-skel-card__body {
    padding: 1.1rem;
    display: grid;
    gap: .65rem;
}

.smart-search-skel-line {
    height: 14px;
    border-radius: 7px;
}

.smart-search-skel-line.lg { height: 22px; width: 70%; }
.smart-search-skel-line.sm { width: 45%; }

.smart-search-skel-card__img,
.smart-search-skel-line {
    background: linear-gradient(100deg, rgba(10, 22, 40, .06) 30%, rgba(10, 22, 40, .12) 50%, rgba(10, 22, 40, .06) 70%);
    background-size: 200% 100%;
    animation: smartSkelShimmer 1.3s ease-in-out infinite;
}

@keyframes smartSkelShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── "Show more rooms" ──────────────────────────────────────────────────── */
.smart-search-results__more {
    display: flex;
    justify-content: center;
    margin-top: 1.6rem;
}

.smart-search-show-more {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-height: 48px;
    padding: 0 1.6rem;
    border-radius: 14px;
    border: 1px solid rgba(201, 153, 46, .4);
    background: rgba(255, 250, 242, .9);
    color: #6f5a22;
    font-weight: 850;
    font-size: .9rem;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}

.smart-search-show-more:hover {
    transform: translateY(-2px);
    border-color: rgba(201, 153, 46, .7);
    background: #fffaf0;
    box-shadow: 0 12px 26px rgba(201, 153, 46, .18);
}

/* ── Disabled state page ─────────────────────────────────────────────────── */
.smart-search-disabled {
    max-width: 620px;
    margin: clamp(2rem, 6vw, 5rem) auto;
    padding: clamp(2rem, 4vw, 3.25rem);
    text-align: center;
    border-radius: 30px;
    background:
        radial-gradient(120% 90% at 50% -10%, rgba(212, 169, 66, .14), transparent 55%),
        rgba(255, 250, 242, .82);
    border: 1px solid rgba(201, 153, 46, .16);
    box-shadow: 0 30px 80px rgba(7, 19, 35, .09);
}

.smart-search-disabled__icon {
    display: inline-grid;
    place-items: center;
    width: 78px;
    height: 78px;
    margin-bottom: 1.2rem;
    border-radius: 50%;
    background: linear-gradient(145deg, #0a1628, #132746);
    color: var(--gold, #d4a942);
    font-size: 1.9rem;
    box-shadow: 0 0 0 6px rgba(255, 250, 242, .6), 0 16px 34px rgba(7, 19, 35, .22);
}

.smart-search-disabled__title {
    margin: 0 0 .6rem;
    color: #081424;
    font-family: "Playfair Display", serif;
    font-size: clamp(1.5rem, 2.6vw, 2.05rem);
    font-weight: 700;
    line-height: 1.18;
}

.smart-search-disabled__text {
    margin: 0 auto 1.6rem;
    max-width: 30rem;
    color: #6f7786;
    font-size: 1rem;
    line-height: 1.6;
}

.smart-search-disabled .smart-search-btn-primary {
    padding: 0 1.6rem;
}

/* ── Reduced motion — disable decorative loops for users who ask for it ────── */
@media (prefers-reduced-motion: reduce) {
    .smart-search-orb__ring,
    .smart-search-orb__wave span,
    .smart-search-ai.is-analyzing .smart-search-orb__core,
    .smart-search-ai.is-result .smart-search-orb__core,
    .smart-search-step.is-active .smart-search-step__dots b,
    .smart-search-skel-card__img,
    .smart-search-skel-line {
        animation: none !important;
    }

    .smart-search-chip,
    .smart-search-room-card,
    .smart-search-btn-primary,
    .smart-search-show-more,
    .smart-search-step {
        transition: none !important;
    }
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 1199.98px) {
    .smart-search-hero {
        grid-template-columns: minmax(0, 1fr);
        gap: clamp(1.75rem, 4vw, 2.5rem);
    }

    /* stacked: no side-by-side halves to connect */
    .smart-search-ai::before {
        display: none;
    }

    .smart-search-ai {
        padding-top: 1.25rem;
        border-top: 1px solid rgba(201, 153, 46, .16);
    }

    .smart-search-results__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .smart-search-page {
        padding-top: 1.6rem;
    }

    .smart-search-hero {
        border-radius: 24px;
        padding: 1.25rem;
    }

    .smart-search-prefs-head {
        flex-direction: column;
    }

    .smart-search-count {
        align-self: flex-start;
    }

    .smart-search-section {
        grid-template-columns: 42px minmax(0, 1fr);
        gap: .75rem;
        padding: 1rem 0;
    }

    .smart-search-section__icon {
        width: 38px;
        height: 38px;
        border-radius: 13px;
    }

    .smart-search-price-grid,
    .smart-search-actions,
    .smart-search-room-card__actions {
        grid-template-columns: 1fr;
    }

    .smart-search-btn-reset {
        width: 100%;
    }

    .smart-search-results__grid {
        grid-template-columns: 1fr;
    }

    .smart-search-room-card__image {
        height: 190px;
    }
}

@media (max-width: 420px) {
    .smart-search-section {
        grid-template-columns: 1fr;
    }

    .smart-search-section__icon {
        margin-bottom: -.2rem;
    }

    .smart-search-chip {
        max-width: 100%;
    }
}
