﻿/* ===== Card esterna ===== */
.ss-slider {
    position: relative;
}

/* ===== Header ===== */
.ss-slider-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #667085;
    text-transform: uppercase;
    letter-spacing: .6px;
    margin-bottom: 22px;
}

    .ss-slider-title .ss-ico {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        border-radius: 8px;
        font-size: 14px;
        color: #2563eb;
        background: #eff4ff;
        border: 1px solid #dbe6ff;
    }

/* ===== Wrapper letto dal JS ===== */
.custom-slider {
    display: flex;
    align-items: center;
    gap: 18px;
    width: 100%;
}

    .custom-slider input[type="range"] {
        -webkit-appearance: none;
        appearance: none;
        flex: 1;
        height: 6px;
        border-radius: 999px;
        cursor: pointer;
        outline: none;
        --pct: calc((var(--val) - var(--min)) / (var(--max) - var(--min)) * 100%);
        background: linear-gradient(90deg, #2563eb 0%, #2563eb var(--pct), #eceef2 var(--pct), #eceef2 100%);
        transition: none;
    }
        /*
        barretta style

        .custom-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 6px;
    height: 20px;
    margin-top: -7px;
    border-radius: 3px;
    background: #1d4ed8;
    box-shadow: 0 1px 4px rgba(29,78,216,.4);
    cursor: grab;
    transition: box-shadow .15s ease, height .12s ease;
}
    */

        /* Thumb WebKit */
        .custom-slider input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 16px;
            height: 16px;
            margin-top: -5px; /* (6 − 16) / 2 */
            border-radius: 50%;
            background: #ffffff;
            border: 2px solid #2563eb;
            box-shadow: 0 1px 2px rgba(16,24,40,.2);
            cursor: grab;
            transition: box-shadow .15s ease;
        }

            .custom-slider input[type="range"]::-webkit-slider-thumb:hover {
                box-shadow: 0 0 0 4px rgba(37,99,235,.12);
            }

        .custom-slider input[type="range"]:active::-webkit-slider-thumb {
            cursor: grabbing;
            box-shadow: 0 0 0 6px rgba(37,99,235,.16); /* box-shadow: 0 0 0 5px rgba(37,99,235,.14); barretta */
        }

        .custom-slider input[type="range"]::-webkit-slider-runnable-track {
            height: 6px;
            border-radius: 999px;
        }

        /* Thumb Firefox */
        .custom-slider input[type="range"]::-moz-range-thumb {
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: #ffffff;
            border: 2px solid #2563eb;
            box-shadow: 0 1px 2px rgba(16,24,40,.2);
            cursor: grab;
        }
        /*
            barretta style 

            .custom-slider input[type="range"]::-moz-range-thumb {
                width: 6px;
                height: 20px;
                border-radius: 3px;
                background: #1d4ed8;
                box-shadow: 0 1px 4px rgba(29,78,216,.4);
                cursor: grab;
            }
        */

        .custom-slider input[type="range"]::-moz-range-track {
            height: 6px;
            border-radius: 999px;
            background: transparent;
        }

        .custom-slider input[type="range"]:focus-visible {
            box-shadow: 0 0 0 4px rgba(37,99,235,.2);
        }

/* ===== Badge valore ===== */
.slider-label {
    position: relative;
    min-width: 64px;
    padding: 8px 14px;
    text-align: center;
    font-weight: 700;
    font-size: 15px;
    color: #1d4ed8;
    background: #eff4ff;
    border: 1px solid #dbe6ff;
    border-radius: 10px;
    font-variant-numeric: tabular-nums;
    letter-spacing: .3px;
    transition: none;
}

.custom-slider input[type="range"]:active ~ .slider-label,
.custom-slider input[type="range"]:focus ~ .slider-label {
    transform: scale(1.05);
    background: #e0eaff;
}
