/* ══════════════════════════════════════════════════════════════════
   FilterSidebar.razor.css  |  Antologa – Explore Filter Sidebar
   ══════════════════════════════════════════════════════════════════ */

/* ── Backdrop ────────────────────────────────────────────────────── */
.fs-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1299;
    animation: fsFadeIn 0.25s ease both;
}

@media (max-width: 959px) {
    .fs-backdrop {
        display: block;
    }
}

/* ── Sidebar wrapper ─────────────────────────────────────────────── */
.fs-sidebar {
    grid-column: span 2;
    top: 8.1rem;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    animation: fsFadeIn 0.5s 0.2s ease both;
    width: 100%;
    /* overflow visible so slider thumbs are never clipped */
    overflow: visible;
}

/* ── Inner card ──────────────────────────────────────────────────── */
.fs-inner {
    background: #ffffff;
    border: 1px solid #e6e6e3;
    border-radius: 1.44rem;
    padding: 1.4rem 1.2rem;
    display: flex;
    flex-direction: column;
    /* overflow visible — slider thumbs render outside track bounds */
    overflow: visible;
    width: 100%;
    min-width: 0;
}

/* ── Header ──────────────────────────────────────────────────────── */
.fs-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1.44rem;
    margin-bottom: 0;
    border-bottom: 1px solid #eeede9;
}

.fs-title {
    font-family: 'Inter', sans-serif !important;
    font-weight: 700 !important;
    font-size: 1.44rem !important;
    color: var(--antologa-dark) !important;
    letter-spacing: -0.02em;
}

/* Close button — native button replacing MudIconButton for reliable CSS control */
.fs-close-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 3.2rem;
    height: 3.2rem;
    border-radius: 50%;
    border: 1.5px solid #e0dfd9;
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
    padding: 0;
}

    .fs-close-btn:hover {
        background: #f4f5f3;
        border-color: var(--antologa-gray);
    }

.fs-close-icon {
    font-size: 1.6rem !important;
    color: var(--antologa-dark) !important;
}

/* ── Filter sections ─────────────────────────────────────────────── */
.fs-section {
    padding: 1rem 0;
    border-bottom: 1px solid #eeede9;
    animation: fsFadeUp 0.4s ease both;
    /* overflow visible so slider thumbs are not clipped */
    overflow: visible;
    min-width: 0;
    width: 100%;
}

    .fs-section:last-of-type {
        border-bottom: none;
        padding-bottom: 0;
    }

.fs-section--a1 {
    animation-delay: 0.30s;
}

.fs-section--a2 {
    animation-delay: 0.38s;
}

.fs-section--a3 {
    animation-delay: 0.46s;
}

.fs-section--a4 {
    animation-delay: 0.54s;
}

.fs-section--a5 {
    animation-delay: 0.60s;
}

.fs-section--a6 {
    animation-delay: 0.66s;
}

.fs-section--a7 {
    animation-delay: 0.72s;
}

.fs-section--a8 {
    animation-delay: 0.78s;
}

/* ── Labels ──────────────────────────────────────────────────────── */
.fs-label {
    display: block;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    color: #8a8a85 !important;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 0 0.8rem;
    text-decoration: none !important;
}

.fs-label--mt {
    margin-top: 1.2rem;
}

.fs-label--flush {
    margin-bottom: 0;
}

/* ── Category chips ──────────────────────────────────────────────── */
.fs-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    row-gap: 0.45rem;
}

.fs-chip {
    font-family: 'Nunito', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0.26em 0.7em;
    border-radius: 7.65rem;
    border: 1.5px solid #e0dfd9;
    background: transparent;
    color: #5a5a55;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

    .fs-chip:hover {
        border-color: var(--antologa-primary);
        color: var(--antologa-primary);
    }

.fs-chip--on {
    background: var(--antologa-primary);
    border-color: var(--antologa-primary);
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(7, 130, 130, 0.25);
}

/* ── Price range ─────────────────────────────────────────────────── */
.fs-label-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 0.6rem;
    gap: 0.5rem;
}

    .fs-label-row .fs-label {
        margin-bottom: 0;
    }

.fs-price-val {
    font-family: 'Inter', sans-serif !important;
    font-weight: 700 !important;
    font-size: 1.05rem !important;
    color: var(--antologa-primary) !important;
    margin: 0;
    white-space: nowrap;
}

/* Slider wrap: horizontal padding so thumb never bleeds past the card edge */
.fs-slider-wrap {
    padding: 0 0.6rem;
    overflow: visible;
}

.fs-slider {
    margin-bottom: 0.36rem;
    width: 100%;
}

    .fs-slider .mud-slider-thumb {
        background-color: var(--antologa-primary) !important;
    }

    .fs-slider .mud-slider-track {
        background-color: var(--antologa-primary) !important;
    }

/* ── Checkbox list (Property Type & Amenities) ───────────────────── */
.fs-checklist {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.fs-check-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    padding: 0.2rem 0;
    min-width: 0;
}

.fs-check-row--dim {
    opacity: 0.4;
    cursor: default;
}

.fs-check-label {
    font-family: 'Nunito', sans-serif !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    color: var(--antologa-dark) !important;
    flex: 1;
    min-width: 0;
    line-height: 1.3;
}

.fs-check-count {
    font-family: 'Nunito', sans-serif !important;
    font-size: 0.83rem !important;
    color: #9a9a95 !important;
    flex-shrink: 0;
    white-space: nowrap;
}

/* ── Times grid ──────────────────────────────────────────────────── */
.fs-times {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    min-width: 0;
    overflow: hidden;
}

.fs-times-field {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-width: 0;
    overflow: hidden;
}

.fs-times-sub {
    font-family: 'Inter', sans-serif !important;
    font-size: 0.855rem !important;
    font-weight: 600 !important;
    color: #9a9a95 !important;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.fs-select {
    font-size: 0.9rem !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* ── Guest Rating radio list ─────────────────────────────────────── */
.fs-rating-list {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.fs-rating-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    padding: 0.2rem 0;
}

.fs-radio {
    flex-shrink: 0;
}

.fs-rating-label {
    font-family: 'Nunito', sans-serif !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    color: var(--antologa-dark) !important;
    flex: 1;
}

/* ── Favourites toggle ───────────────────────────────────────────── */
.fs-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.72rem;
}

.fs-toggle {
    margin: 0 !important;
    flex-shrink: 0;
}

/* ── Review score ────────────────────────────────────────────────── */
.fs-stars {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    overflow: hidden;
}

.fs-star-row {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    cursor: pointer;
    min-width: 0;
    overflow: hidden;
    height: 2.4rem;
}

.fs-cb {
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0;
    align-self: center;
}

.fs-star-rating {
    pointer-events: none;
    transform: scale(0.72);
    transform-origin: left center;
    flex-shrink: 0;
    margin-right: -1.8rem;
}

.fs-star-count {
    font-size: 0.99rem !important;
    color: #9a9a95 !important;
    font-family: 'Nunito', sans-serif !important;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Reset button ────────────────────────────────────────────────── */
.fs-reset {
    margin-top: 1.8rem;
    width: 100%;
    font-family: 'Nunito', sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    color: #8a8a85;
    background: transparent;
    border: 1.5px solid #e0dfd9;
    border-radius: 0.72rem;
    padding: 0.7em 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .fs-reset:hover {
        border-color: var(--antologa-terciary);
        color: var(--antologa-terciary);
    }

/* ══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════════ */

@media (max-width: 1279px) {
    .fs-sidebar {
        grid-column: 1 / 4;
        top: 7rem;
    }
}

@media (max-width: 959px) {
    .fs-sidebar {
        grid-column: unset !important;
        display: block;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        bottom: 0 !important;
        right: auto !important;
        width: 82vw;
        max-width: 32rem;
        height: 100dvh;
        z-index: 1300;
        border-radius: 0 1.6rem 1.6rem 0;
        overflow-y: auto;
        overflow-x: hidden;
        transform: translateX(-105%);
        transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
        box-shadow: 8px 0 48px rgba(0, 0, 0, 0.18);
        background: #ffffff;
    }

    .fs-sidebar--open {
        transform: translateX(0) !important;
    }

    .fs-inner {
        border-radius: 0 !important;
        border: none !important;
        box-shadow: none !important;
        min-height: 100%;
        padding: 3rem 2.2rem 4rem;
        overflow-y: visible;
    }

    .fs-close-btn {
        display: flex !important;
    }
}

/* ── Keyframes ───────────────────────────────────────────────────── */
@keyframes fsFadeUp {
    from {
        opacity: 0;
        transform: translateY(1.53rem);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fsFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}
