/* ==========================================================================
   RDDL Property Filter — Filter UI Stylesheet
   Version: 1.0.8
   Affects: ONLY plugin-owned classes (rddl-*)
   Does NOT touch: Elementor Loop Grid, Loop Item cards, or any theme styles
   ========================================================================== */

/* --------------------------------------------------
   Container
-------------------------------------------------- */
.rddl-filter-container {
    position: relative;
    margin-bottom: 30px;
    font-family: inherit;
}

/* --------------------------------------------------
   Trigger Button
-------------------------------------------------- */
.rddl-filter-trigger-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #0C4137;
    color: #F7F9F7;
    border: none;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.25s ease, transform 0.1s ease;
    text-transform: uppercase;
}

.rddl-filter-trigger-btn:hover {
    background-color: #13362C;
}

.rddl-filter-trigger-btn:active {
    transform: scale(0.98);
}

.rddl-filter-trigger-btn svg {
    stroke: currentColor;
    flex-shrink: 0;
}

/* --------------------------------------------------
   Modal Overlay
-------------------------------------------------- */
.rddl-filter-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.rddl-filter-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(12, 65, 55, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

/* --------------------------------------------------
   Modal Content Panel
-------------------------------------------------- */
.rddl-filter-modal-content {
    position: relative;
    background: #F7F9F7;
    width: 100%;
    max-width: 580px;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(12, 65, 55, 0.18);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow: hidden;
    margin: 16px;
}

/* --------------------------------------------------
   Modal Header
-------------------------------------------------- */
.rddl-filter-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(12, 65, 55, 0.12);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    background: #F7F9F7;
}

.rddl-filter-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #0C4137;
    letter-spacing: 0.01em;
}

/* --------------------------------------------------
   Close Button
-------------------------------------------------- */
.rddl-close-btn {
    background: none;
    border: 1px solid transparent;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #666666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    padding: 0;
}

.rddl-close-btn:hover {
    background: rgba(12, 65, 55, 0.08);
    color: #0C4137;
    border-color: rgba(12, 65, 55, 0.15);
}

/* --------------------------------------------------
   Modal Body (Scrollable)
-------------------------------------------------- */
.rddl-filter-body {
    padding: 24px;
    overflow-y: auto;
    flex-grow: 1;
}

/* --------------------------------------------------
   Filter Groups
-------------------------------------------------- */
.rddl-filter-group {
    margin-bottom: 28px;
}

.rddl-filter-group:last-child {
    margin-bottom: 0;
}

.rddl-filter-group > label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #0C4137;
    margin-bottom: 14px;
}

/* --------------------------------------------------
   noUiSlider Overrides (Budget & SqFt)
-------------------------------------------------- */
.rddl-slider-ui {
    margin: 6px 4px;
}

.rddl-slider-ui.noUi-target {
    background: #dde8e5;
    border: none;
    box-shadow: none;
    height: 5px;
    border-radius: 3px;
}

.rddl-slider-ui .noUi-connect {
    background: #0C4137;
    border-radius: 3px;
}

.rddl-slider-ui .noUi-handle {
    border: 2.5px solid #0C4137;
    border-radius: 50%;
    background: #F7F9F7;
    box-shadow: 0 2px 8px rgba(12, 65, 55, 0.2);
    width: 22px !important;
    height: 22px !important;
    right: -11px !important;
    top: -9px !important;
    cursor: grab;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.rddl-slider-ui .noUi-handle:active {
    cursor: grabbing;
    transform: scale(1.15);
    box-shadow: 0 4px 14px rgba(12, 65, 55, 0.3);
}

.rddl-slider-ui .noUi-handle:before,
.rddl-slider-ui .noUi-handle:after {
    display: none;
}

/* Slider value labels */
.rddl-slider-values {
    display: flex;
    justify-content: space-between;
    margin-top: 14px;
    font-size: 13px;
    color: #13362C;
    font-weight: 600;
}

/* --------------------------------------------------
   Bedroom Pills
-------------------------------------------------- */
.rddl-pills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.rddl-pill-btn {
    background: #fff;
    border: 1.5px solid #c9d9d6;
    color: #666666;
    padding: 8px 18px;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
}

.rddl-pill-btn:hover {
    border-color: #0C4137;
    color: #0C4137;
    background: #D9F8CE20;
}

.rddl-pill-btn.active {
    background: #0C4137;
    border-color: #0C4137;
    color: #F7F9F7;
    box-shadow: 0 2px 8px rgba(12, 65, 55, 0.25);
}

/* --------------------------------------------------
   Location Select
-------------------------------------------------- */
.rddl-location-select {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #c9d9d6;
    border-radius: 6px;
    color: #333;
    font-size: 14px;
    background: #fff;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%230C4137' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.rddl-location-select:focus {
    outline: none;
    border-color: #0C4137;
    box-shadow: 0 0 0 3px rgba(12, 65, 55, 0.1);
}

/* --------------------------------------------------
   Modal Footer
-------------------------------------------------- */
.rddl-filter-footer {
    padding: 18px 24px;
    border-top: 1px solid rgba(12, 65, 55, 0.12);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    background: #F7F9F7;
}

/* Reset Button */
.rddl-reset-btn {
    background: none;
    border: none;
    color: #666666;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 4px;
    border-bottom: 1px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.rddl-reset-btn:hover {
    color: #0C4137;
    border-color: #0C4137;
}

/* Apply Button */
.rddl-apply-btn {
    background: #0C4137;
    color: #F7F9F7;
    border: none;
    padding: 11px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.25s ease, transform 0.1s ease;
    letter-spacing: 0.02em;
}

.rddl-apply-btn:hover {
    background: #13362C;
}

.rddl-apply-btn:active {
    transform: scale(0.98);
}

/* --------------------------------------------------
   Loader / Spinner
-------------------------------------------------- */
.rddl-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(247, 249, 247, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99998;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.rddl-spinner {
    border: 4px solid rgba(12, 65, 55, 0.1);
    border-top: 4px solid #0C4137;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    animation: rddl-spin 0.8s linear infinite;
}

@keyframes rddl-spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --------------------------------------------------
   Responsive — Mobile
-------------------------------------------------- */
@media (max-width: 768px) {
    .rddl-filter-modal-content {
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        margin: 0;
    }

    .rddl-filter-modal {
        align-items: flex-end;
    }
}
