.hotel-search-filters {
    --hsf-accent: var(--brand, #0A58CA);
    --hsf-field-height: 62px;
}

.home-search-shell .hotel-search-filters--home {
    --hsf-accent: var(--mode-color, #0A58CA);
}

/* ── Home layout ── */
.home-search-form .hotel-search-filters--home {
    display: flex;
    flex: 1 1 0;
    gap: 10px;
    min-width: 0;
    align-items: stretch;
}

.home-search-form .hotel-search-filters--home > .hsf-field {
    flex: 1 1 0;
    min-width: 100px;
}

/* ── Listing layout ── */
.hotel-search-filters--listing {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-items: stretch;
}

@media (min-width: 768px) {
    .hotel-search-filters--listing {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 992px) {
    .hotel-search-filters--listing {
        grid-template-columns:
            minmax(0, 1fr)
            minmax(0, 1fr)
            minmax(0, 0.85fr)
            minmax(130px, 0.95fr)
            auto;
    }
}

.hotel-search-filters--listing > .hsf-submit {
    grid-column: 1 / -1;
}

@media (min-width: 992px) {
    .hotel-search-filters--listing > .hsf-submit {
        grid-column: auto;
    }
}

/* ── Shared fields ── */
.hotel-search-filters .smart-field,
.hotel-search-filters .smart-guests-trigger {
    min-height: var(--hsf-field-height);
    height: 100%;
    background: #F8FAFC;
    border: 1px solid #E6EAF0;
    border-radius: 18px;
    padding: 10px 12px;
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 8px;
    align-items: center;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.hotel-search-filters .smart-field:focus-within,
.hotel-search-filters .smart-guests.active .smart-guests-trigger {
    border-color: var(--hsf-accent);
    background: #fff;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--hsf-accent) 14%, transparent);
}

.hotel-search-filters .smart-field i,
.hotel-search-filters .smart-guests-trigger > i:first-child {
    color: var(--hsf-accent);
    font-size: 1.15rem;
    grid-row: span 2;
    align-self: center;
}

.hotel-search-filters .smart-field label,
.hotel-search-filters .smart-guests-trigger small {
    display: block;
    color: #64748B;
    font-size: 0.68rem;
    font-weight: 800;
    margin-bottom: 2px;
    line-height: 1.2;
}

.hotel-search-filters .smart-field input,
.hotel-search-filters .smart-field select,
.hotel-search-filters .hsf-nights-button {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    font: inherit;
    font-size: 0.86rem;
    color: #1E293B;
    min-width: 0;
}

.hotel-search-filters .hsf-nights-button {
    font-weight: 700;
    text-align: right;
    padding: 0;
    min-height: 24px;
    cursor: pointer;
    white-space: nowrap;
}

.hotel-search-filters--listing .smart-field input,
.hotel-search-filters--listing .smart-field select,
.hotel-search-filters--listing .hsf-nights-button {
    font-size: 0.82rem;
}

/* ── Guests ── */
.hotel-search-filters .smart-guests {
    position: relative;
    display: flex;
    min-height: var(--hsf-field-height);
}

.hotel-search-filters .smart-guests-trigger {
    width: 100%;
    border: 1px solid #E6EAF0;
    cursor: pointer;
    grid-template-columns: auto 1fr auto;
    text-align: right;
}

.hotel-search-filters .smart-guests-trigger strong {
    font-size: 0.86rem;
    color: #1E293B;
    display: block;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hotel-search-filters .smart-guests-trigger > i:last-child {
    color: #64748B;
    font-size: 1rem;
    grid-row: span 2;
    align-self: center;
}

.hotel-search-filters .smart-guests-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 310px;
    background: #fff;
    border: 1px solid #E6EAF0;
    border-radius: 18px;
    box-shadow: 0 24px 45px rgba(15, 23, 42, 0.18);
    padding: 12px;
    display: none;
    z-index: 1081;
}

.hotel-search-filters .smart-guests.active .smart-guests-menu {
    display: block;
    animation: hsfMenuIn 0.18s ease;
}

@keyframes hsfMenuIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.hotel-search-filters .guest-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #EEF2F7;
}

.hotel-search-filters .guest-row:last-child {
    border-bottom: 0;
}

.hotel-search-filters .guest-row span small {
    display: block;
    color: #64748B;
    font-size: 0.68rem;
    margin-top: 2px;
}

.hotel-search-filters .stepper {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.hotel-search-filters .stepper button {
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: #EEF2F7;
    color: #1E293B;
    font-weight: 900;
    line-height: 1;
}

.hotel-search-filters .stepper button:hover {
    background: var(--hsf-accent);
    color: #fff;
}

.hsf-guests-footer {
    padding-top: 10px;
    margin-top: 4px;
    border-top: 1px solid #EEF2F7;
}

/* ── Submit ── */
.hotel-search-filters .hsf-submit {
    min-height: var(--hsf-field-height);
    height: 100%;
    border: 0;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--hsf-accent) 0%, color-mix(in srgb, var(--hsf-accent) 80%, #000) 100%);
    color: #fff;
    font-weight: 800;
    padding: 0 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.hotel-search-filters .hsf-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px color-mix(in srgb, var(--hsf-accent) 28%, transparent);
    color: #fff;
}

/* ── Nights modal ── */
.hsf-nights-modal .modal-content {
    background: #fff;
}

.hsf-nights-modal .hsf-nights-input {
    font-weight: 800;
    font-size: 1.35rem;
}

.filter-card .card-body:has(.hotel-search-filters--listing) {
    padding: 18px !important;
}

@media (max-width: 575.98px) {
    .home-search-form .hotel-search-filters--home {
        flex-wrap: wrap;
    }

    .home-search-form .hotel-search-filters--home > .hsf-field {
        flex: 1 1 calc(50% - 5px);
        min-width: calc(50% - 5px);
    }
}
