/* =====================================================
   FILTER SIDEBAR - DESKTOP
   Desktop filter sidebar styles only
   Mobile filters are in filter-mobile.css
   ===================================================== */

/* === SIDEBAR CONTAINER === */
:root {
    /* Adjust if your header is taller/shorter on desktop. */
    --mtc-sticky-top: 110px;
}

/* Logged-in users get the WP admin bar (32px on desktop). */
body.admin-bar {
    --mtc-sticky-top: 142px;
}

#mtc-filters {
    width: 280px;
    padding: 20px;
    background-color: #fff;
    border-right: 1px solid var(--border-color);
    /* Keep filters visible while scrolling the listing. */
    position: sticky;
    top: var(--mtc-sticky-top);
    align-self: flex-start; /* Needed when inside a flex layout */
    max-height: calc(100vh - var(--mtc-sticky-top) - 20px);
    overflow-y: auto;
    overscroll-behavior: contain;
    z-index: 20;
    flex-shrink: 0;
    margin-bottom: 20px;
}

/* Placeholder used by JS "fixed" fallback to avoid layout shift. */
.mtc-filters-placeholder {
    flex-shrink: 0;
}

/* === SIDEBAR HEADER === */
#mtc-filters h3 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    color: var(--primary-dark);
    font-size: 1.5rem;
    text-transform: uppercase;
    border-bottom: 2px solid var(--primary-orange);
    padding-bottom: 0.5rem;
    font-family: inherit;
}

/* === FILTER SECTIONS === */
.mtc-filter {
    margin-bottom: 1.5rem;
}

.mtc-filter label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 0.9rem;
}

/* === FORM INPUTS === */
#mtc-filters select,
#mtc-filters input[type="number"],
#mtc-filters input[type="text"] {
    width: 100%;
    border-radius: 4px;
    font-size: 0.9rem;
    background-color: var(--primary-light);
    font-family: inherit;
}

#mtc-filters select[multiple] {
    height: 120px;
}

/* Remove number input spinners */
#mtc-filters input[type="number"] {
    -moz-appearance: textfield;
}

#mtc-filters input::-webkit-outer-spin-button,
#mtc-filters input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* === PRICE RANGE === */
.mtc-filter-price-range {
    display: flex;
    gap: 10px;
}

.mtc-filter-price-range > div {
    flex: 1;
}

/* === RESET BUTTON === */
#mtc-filters .mtc-reset-button,
button.mtc-reset-button,
button#mtc-reset-filters {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--primary-orange);
    color: var(--text-white);
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    white-space: nowrap;
    user-select: none;
    display: block;
}

#mtc-filters .mtc-reset-button:hover,
button.mtc-reset-button:hover,
button#mtc-reset-filters:hover {
    background-color: var(--primary-dark);
    color: var(--text-white);
    border: none;
}

#mtc-filters .mtc-reset-button:active,
button.mtc-reset-button:active,
button#mtc-reset-filters:active {
    background-color: var(--primary-dark);
    color: var(--text-white);
    border: none;
    transform: translateY(0);
}

/* === RESPONSIVE - HIDE DESKTOP SIDEBAR ON MOBILE === */
@media (max-width: 960px) {
    .mtc-travel-wrapper #mtc-filters {
        display: none;
        width: 100%;
        border-right: none;
        border-bottom: none;
        padding: 0;
        margin-bottom: 0;
        background-color: transparent;
    }
}
