/**
 * Price Slider with Histogram Overlay
 *
 * Displays laptop price distribution as a gradient background on the slider track.
 * Denser regions appear darker, helping users visualize where most laptops are priced.
 */

/* Container for price slider with histogram */
#price-slider-container {
    position: relative;
}

/* Apply histogram gradient to slider track */
.price-slider-with-histogram .rc-slider-track {
    /* Histogram gradient applied via inline style --histogram-gradient variable */
    background: var(--histogram-gradient, transparent) !important;
}

/* Ensure slider rail (background) is visible beneath histogram */
.price-slider-with-histogram .rc-slider-rail {
    background-color: #e9ecef !important;
    height: 8px !important;
    border-radius: 4px !important;
}

/* Slider track (selected range) should overlay histogram */
.price-slider-with-histogram .rc-slider-track {
    height: 8px !important;
    border-radius: 4px !important;
    /* Blend histogram with selection color */
    background-blend-mode: multiply;
}

/* Make slider handles more prominent */
.price-slider-with-histogram .rc-slider-handle {
    width: 18px !important;
    height: 18px !important;
    margin-top: -5px !important;
    border: 3px solid #0d6efd !important;
    background-color: white !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
    cursor: grab !important;
}

.price-slider-with-histogram .rc-slider-handle:active {
    cursor: grabbing !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

.price-slider-with-histogram .rc-slider-handle:hover {
    border-color: #0a58ca !important;
}

/* Tooltip styling */
.price-slider-with-histogram .rc-slider-tooltip {
    pointer-events: none;
}

/* Mark labels styling */
.price-slider-with-histogram .rc-slider-mark-text {
    font-size: 11px !important;
    color: #6c757d !important;
    white-space: nowrap !important;
}

/* Active mark (within selected range) */
.price-slider-with-histogram .rc-slider-mark-text-active {
    color: #0d6efd !important;
    font-weight: 500 !important;
}

/* Increase slider track height for better histogram visibility */
.price-slider-with-histogram .rc-slider {
    height: 20px !important;
    padding: 6px 0 !important;
}

/* Legend for histogram (optional - can be added to UI) */
.histogram-legend {
    font-size: 11px;
    color: #6c757d;
    text-align: center;
    margin-top: 8px;
    font-style: italic;
}

.histogram-legend::before {
    content: "💡 ";
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .price-slider-with-histogram .rc-slider-handle {
        width: 20px !important;
        height: 20px !important;
        margin-top: -6px !important;
    }

    .price-slider-with-histogram .rc-slider-mark-text {
        font-size: 10px !important;
    }
}
