/**
 * Range Sliders Styling for Romb.bg
 * Customized noUiSlider theme matching Romb.bg design system
 */

/* Slider container */
.range-slider-wrapper {
    margin: 1.5rem 0;
}

.range-slider-label {
    font-size: var(--text-sm, 0.875rem);
    font-weight: var(--font-semibold, 600);
    color: var(--romb-dark-gray, #484848);
    margin-bottom: 0.75rem;
    display: block;
}

.range-slider {
    margin: 2rem 0.5rem 1rem 0.5rem;
    height: 8px !important;
}

/* Range inputs below slider */
.range-inputs {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    align-items: center;
}

.range-input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.range-input-label {
    font-size: var(--text-xs, 0.75rem);
    color: var(--romb-gray, #767676);
    font-weight: var(--font-medium, 500);
}

.range-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--romb-light-gray, #DDDDDD);
    border-radius: var(--radius-md, 12px);
    font-size: var(--text-sm, 0.875rem);
    color: var(--romb-black, #222222);
    background: var(--romb-white, #FFFFFF);
    transition: all 0.2s;
}

.range-input:focus {
    outline: none;
    border-color: var(--romb-primary, #FF385C);
    box-shadow: 0 0 0 3px rgba(255, 56, 92, 0.1);
}

.range-inputs-separator {
    padding-top: 1.5rem;
    color: var(--romb-gray, #767676);
    font-weight: var(--font-medium, 500);
}

/* ============================================
   noUiSlider Customization
   ============================================ */

/* Base slider */
.noUi-target {
    background: var(--romb-bg-gray, #F7F7F7);
    border-radius: 8px;
    border: none;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

/* Connect bar (selected range) */
.noUi-connect {
    background: var(--romb-primary, #FF385C);
    background: linear-gradient(90deg,
        var(--romb-primary, #FF385C) 0%,
        var(--romb-primary-hover, #E31C5F) 100%);
}

/* Handles (draggable circles) */
.noUi-handle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--romb-white, #FFFFFF);
    border: 3px solid var(--romb-primary, #FF385C);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    cursor: grab;
    transition: all 0.2s;
}

.noUi-handle:before,
.noUi-handle:after {
    display: none; /* Remove default handle lines */
}

.noUi-handle:hover {
    box-shadow: 0 4px 12px rgba(255, 56, 92, 0.3);
    transform: scale(1.1);
}

.noUi-handle:active {
    cursor: grabbing;
    transform: scale(1.15);
    box-shadow: 0 4px 16px rgba(255, 56, 92, 0.4);
}

.noUi-handle:focus {
    outline: none;
    border-color: var(--romb-primary-hover, #E31C5F);
}

/* Tooltips */
.noUi-tooltip {
    background: var(--romb-black, #222222);
    color: var(--romb-white, #FFFFFF);
    border: none;
    border-radius: 6px;
    padding: 0.375rem 0.625rem;
    font-size: 0.75rem;
    font-weight: var(--font-semibold, 600);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Horizontal slider specific */
.noUi-horizontal {
    height: 8px;
}

.noUi-horizontal .noUi-handle {
    top: -8px;
    right: -12px;
}

/* Touch-friendly on mobile */
@media (max-width: 767px) {
    .noUi-handle {
        width: 28px;
        height: 28px;
    }

    .noUi-horizontal .noUi-handle {
        top: -10px;
        right: -14px;
    }

    .range-slider {
        margin: 2.5rem 0.5rem 1.5rem 0.5rem;
    }

    .range-inputs {
        flex-direction: column;
        gap: 0.75rem;
    }

    .range-input-group {
        width: 100%;
    }

    .range-inputs-separator {
        display: none;
    }
}

/* Active/dragging state */
.noUi-active {
    box-shadow: 0 4px 16px rgba(255, 56, 92, 0.5);
}

/* Disabled state */
.noUi-target[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

.noUi-target[disabled] .noUi-handle {
    cursor: not-allowed;
}

/* ============================================
   Filter Section Styling
   ============================================ */

.filter-section {
    padding: 1.5rem;
    background: var(--romb-white, #FFFFFF);
    border-radius: var(--radius-lg, 16px);
    border: 1px solid var(--romb-light-gray, #DDDDDD);
    margin-bottom: 1rem;
}

.filter-section-title {
    font-size: var(--text-base, 1rem);
    font-weight: var(--font-bold, 700);
    color: var(--romb-black, #222222);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--romb-light-gray, #DDDDDD);
}

.filter-section-collapsible {
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-section-collapsible::after {
    content: '▼';
    font-size: 0.75rem;
    color: var(--romb-gray, #767676);
    transition: transform 0.2s;
}

.filter-section-collapsible.collapsed::after {
    transform: rotate(-90deg);
}

.filter-section-content {
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.filter-section-content.collapsed {
    max-height: 0;
}

/* Mobile filter sidebar */
@media (max-width: 767px) {
    .filter-section {
        padding: 1rem;
        margin-bottom: 0.75rem;
    }

    .filter-section-title {
        font-size: var(--text-sm, 0.875rem);
    }
}

/* ============================================
   Specific Slider Variants
   ============================================ */

/* Price slider - gradient */
.price-slider .noUi-connect {
    background: linear-gradient(90deg,
        var(--romb-secondary, #00A699) 0%,
        var(--romb-primary, #FF385C) 100%);
}

/* Year slider - different color */
.year-slider .noUi-connect {
    background: linear-gradient(90deg,
        #667eea 0%,
        #764ba2 100%);
}

.year-slider .noUi-handle {
    border-color: #667eea;
}

/* Mileage slider */
.mileage-slider .noUi-tooltip {
    background: var(--romb-secondary, #00A699);
}

/* Area slider (for properties) */
.area-slider .noUi-connect {
    background: var(--romb-secondary, #00A699);
}

.area-slider .noUi-handle {
    border-color: var(--romb-secondary, #00A699);
}

/* Floor slider (for properties) */
.floor-slider .noUi-connect {
    background: linear-gradient(90deg,
        #FC642D 0%,
        #FF8F59 100%);
}

.floor-slider .noUi-handle {
    border-color: #FC642D;
}
