/* =============================================
   Listings Filter – Shared Base
   ============================================= */
:root {
    --lf-primary: #010101;
    --lf-accent: #002349;
    --lf-accent-hover: #b8953f;
    --lf-bg: #00000012;
    --lf-border: #BCBCBC80;
    --lf-font: "Open Sans", sans-serif;
    --lf-radius: 0px;
}

/* =============================================
   Dropdown selects (shared)
   ============================================= */
.listings-filter .filter-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.listings-filter .filter-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--lf-primary);
    font-family: var(--lf-font);
    line-height: 1.6em;
}

.listings-filter--horizontal .filter-label {
    color: #002349;
}

.listings-filter .filter-select-wrap {
    position: relative;
    display: flex;
    width: 100%;
}

.listings-filter .filter-select {
    width: 100%;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 12px 40px 12px 14px;
    font-size: 16px;
    font-weight: 600;
    font-family: var(--lf-font);
    color: var(--lf-primary);
    background: transparent;
    border: 1px solid var(--lf-border);
    border-radius: var(--lf-radius);
    cursor: pointer;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    line-height: 1.4;
}

.listings-filter .filter-select:hover {
    border-color: var(--lf-primary);
}

.listings-filter .filter-select:focus {
    border-color: var(--lf-primary);
    box-shadow: 0 0 0 2px rgba(200, 168, 110, 0.2);
}

.listings-filter--horizontal .filter-select {
    background: #00000012;
}

.listings-filter .filter-select-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    pointer-events: none;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.listings-filter .filter-select-arrow svg {
    width: 100%;
    height: 100%;
}

/* =============================================
   Buttons
   ============================================= */

.listings-filter .filter-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-size: 16px;
    font-weight: 600;
    font-family: var(--lf-font);
    letter-spacing: 0.06em;
    color: #fff;
    background: #010101;
    border: 2px solid #010101;
    border-radius: var(--lf-radius);
    cursor: pointer;
    transition: background 0.3s ease, transform 0.15s ease;
    white-space: nowrap;
}

.listings-filter .filter-submit-btn:hover {
    background: transparent;
    border: 2px solid #010101;
    color: #010101;
    transform: translateY(-1px);
}

.listings-filter--horizontal .filter-submit-btn {
    color: #fff;
    background: #002349;
    border: 2px solid #002349;
    width: 272px;
    padding: 10px 27px;
}

.listings-filter--horizontal .filter-submit-btn:hover {
    background: transparent;
    border: 2px solid #002349;
    color: #002349;
}

.listings-filter--horizontal .filter-submit-btn:focus {
    background: transparent;
    border: 2px solid #002349;
    color: #002349;
}

.listings-filter .filter-submit-btn:focus {
    background: transparent;
    border: 2px solid #010101;
    color: #010101;
    transform: translateY(-1px);
}

.listings-filter .filter-submit-btn:active {
    transform: translateY(0);
}

.listings-filter-popup-close {
    color: #010101 !important;
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
}


/* =============================================
   HORIZONTAL layout
   ============================================= */
.listings-filter--horizontal {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
    padding: 20px 0;
}

.listings-filter--horizontal .filter-field {
    flex: 1 1 180px;
    min-width: 160px;
}

.listings-filter--horizontal .filter-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* =============================================
   REDIRECT variant (Home page – glass / white)
   ============================================= */
.listings-filter--redirect .filter-label {
    color: #010101;
}

.listings-filter-desktop .filter-label {
    color: #fff;
}

.listings-filter-desktop .filter-select {
    color: #fff !important;
}

.listings-filter-mobile .filter-select {
    color: #010101;
    background: rgba(1, 1, 1, 0.1) !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
}

.listings-filter-desktop .filter-select {
    color: #fff !important;
    background: rgba(1, 1, 1, 0.1) !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
}

.listings-filter--redirect .filter-select {
    color: #010101;
    background: #fff;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid #0101011A;
}

.listings-filter--redirect .filter-select option {
    color: var(--lf-primary);
    background: #fff;
}

.listings-filter--redirect .filter-select:hover {
    border-color: rgba(255, 255, 255, 0.8);
}

.listings-filter--redirect .filter-select:focus {
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.15);
}

.listings-filter--redirect .filter-select-arrow {
    color: rgba(255, 255, 255, 0.7);
}

.listings-filter--redirect .filter-submit-btn-mob {
    color: #fff !important;
    background: #010101 !important;
    border: 1px solid #010101 !important;
    font-size: 16px;
    font-weight: 600;
    text-transform: none;
    padding: 11px 28px;
}

.listings-filter--redirect .filter-submit-btn-mob:hover {
    background: #fff !important;
    color: #010101 !important;
    transition: all 0.3s ease;
    border: 1px solid #010101 !important;
}

.listings-filter--redirect .filter-submit-btn {
    color: #010101;
    background: #fff;
    border: 1px solid #fff;
    font-size: 16px;
    font-weight: 600;
    text-transform: none;
    padding: 11px 28px;
}

.listings-filter--redirect .filter-submit-btn:hover {
    background: rgba(1, 1, 1, 0.1);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #fff;
    transition: all 0.3s ease;
    border: 1px solid #fff;
}



/* =============================================
   VERTICAL / POPUP layout
   ============================================= */

/* --- Trigger button --- */
.listings-filter-popup-trigger {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.listings-filter-popup-trigger:hover svg path {
    fill: #EEA73E;
}

.listings-filter-popup-trigger svg {
    width: 48px;
    height: 48px;
}

/* --- Overlay --- */
.listings-filter-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 35, 73, 0.55);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.listings-filter-popup-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

/* --- Popup panel --- */
.listings-filter-popup-panel {
    width: 380px;
    max-width: 90vw;
    height: 100vh;
    background: #fff;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.18);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    z-index: 9999;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.listings-filter-popup-overlay.is-open .listings-filter-popup-panel {
    transform: translateX(0);
}

/* Header */
.listings-filter-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px;
    border-bottom: 1px solid #eee;
}

.listings-filter-popup-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    font-family: var(--lf-font);
    color: var(--lf-primary);
}

.listings-filter-popup-close {
    background: none;
    border: none;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    transition: color 0.2s ease;
    padding: 0;
}

.listings-filter-popup-close:hover {
    color: var(--lf-primary);
}

.listings-filter-popup-close svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

/* Body – vertical form */
.listings-filter-popup-body {
    flex: 1;
    overflow-y: auto;
    padding: 28px;
}

.listings-filter--vertical {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.listings-filter--vertical .filter-field {
    width: 100%;
}

.listings-filter--vertical .filter-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 8px;
}

.listings-filter--vertical .filter-submit-btn {
    width: 100%;
    text-align: center;
}

.listings-filter--vertical .filter-select-arrow svg path {
    stroke: #010101;
}

/* =============================================
   No Results message
   ============================================= */
.listings-filter-no-results {
    padding: 60px 20px;
    text-align: center;
    font-family: var(--lf-font);
    color: #666;
}

.listings-filter-no-results p {
    font-size: 16px;
    margin: 0;
}

/* =============================================
   Loading Overlay
   ============================================= */
.listings-filter-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.6);
    z-index: 10;
    border-radius: 8px;
}

.filter-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #ddd;
    border-top-color: var(--lf-accent);
    border-radius: 50%;
    animation: filter-spin 0.7s linear infinite;
}

@keyframes filter-spin {
    to {
        transform: rotate(360deg);
    }
}

/* =============================================
   Prevent body scroll when popup open
   ============================================= */
body.listings-filter-popup-open {
    overflow: hidden;
}

/* =============================================
   Responsive
   ============================================= */
.listings-filter-mobile {
    display: none !important;
}

@media (max-width: 768px) {
    .listings-filter-desktop {
        display: none !important;
    }

    .listings-filter-mobile {
        display: flex !important;
        flex-direction: column;
    }

    .listings-filter--horizontal {
        flex-direction: column;
        align-items: stretch;
    }

    .listings-filter--horizontal .filter-field {
        flex: 1 1 100%;
        min-width: 0;
    }

    .listings-filter--horizontal .filter-actions {
        flex-direction: column;
    }

    .listings-filter--horizontal .filter-submit-btn {
        width: 100%;
    }

    .listings-filter-popup-panel {
        width: 80%;
        max-width: 100vw;
        height: 100vh;
    }

    .listings-filter-popup-trigger svg {
        width: 45px;
        height: 45px;
    }

    .listings-filter-mobile.listings-filter .filter-select {
        font-size: 14px;
        color: #fff !important;
    }

    .listings-filter-mobile .listings-filter-popup-trigger svg {
        width: 24px;
        height: 24px;
    }

    .listings-filter-mobile.listings-filter .filter-select {
        padding: 10px !important;
    }

}