/* ==========================================================
   UNIVERSAL RANGE CONTROL — PERFECT ALIGNMENT (ALL DEVICES)
   ========================================================== */

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 34px;
    background: transparent;
    cursor: pointer;
    margin: 0;
    padding: 0;
    overflow: visible !important;
}

/* -------------------------------------
   CUSTOM TRACK & FILL
-------------------------------------- */

.slider-wrapper {
    position: relative;
    width: 100%;
    height: 26px;
}

/* Gray background track */
.slider-track {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 100%;
    height: 8px;
    background: #d0d0d8;
    border-radius: 4px;
    z-index: 1;
    pointer-events: none;
    opacity: 1 !important;
}

/* Blue fill track */
.slider-fill {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 8px;
    width: 0%;
    background: #0d6efd;
    border-radius: 4px;
    z-index: 2;
    pointer-events: none;
}

/* Hide default tracks */
input[type="range"]::-webkit-slider-runnable-track {
    background: transparent !important;
    height: 8px;
}
input[type="range"]::-moz-range-track {
    background: transparent !important;
    height: 8px;
}

/* -------------------------------------
   THUMB (BLUE CIRCLE) - PERFECTLY CENTERED
-------------------------------------- */

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 26px;
    height: 26px;
    background: #0d6efd;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    position: relative;
    z-index: 5;
    cursor: grab;
    margin-top: -13px !important;
}

input[type="range"]::-webkit-slider-thumb:active {
    cursor: grabbing;
    transform: scale(1.05);
}

input[type="range"]::-moz-range-thumb {
    width: 26px;
    height: 26px;
    background: #0d6efd;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    cursor: grab;
}

input[type="range"]::-moz-range-thumb:active {
    cursor: grabbing;
}

/* Remove Safari defaults */
.form-range::before {
    content: none !important;
}

/* -------------------------------------
   MOBILE FIXES - iOS LAYERING FIX
-------------------------------------- */

@media (max-width: 768px) {
    .slider-wrapper {
        height: 34px;
        position: relative;
    }

    input[type="range"] {
        height: 44px;
        position: relative;
        z-index: 5;
    }

    /* Force both tracks to same exact position with translate3d for GPU acceleration */
    .slider-track {
        position: absolute;
        top: 50%;
        left: 0;
        transform: translate3d(0, -50%, 0) !important;
        -webkit-transform: translate3d(0, -50%, 0) !important;
        width: 100%;
        height: 8px !important;
        z-index: 1 !important;
        background: #d0d0d8 !important;
    }

    .slider-fill {
        position: absolute;
        top: 50%;
        left: 0;
        transform: translate3d(0, -50%, 0) !important;
        -webkit-transform: translate3d(0, -50%, 0) !important;
        height: 8px !important;
        width: 0%;
        z-index: 10 !important; /* Much higher z-index */
        background: #0d6efd !important;
        will-change: width;
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
        transform-style: preserve-3d;
        -webkit-transform-style: preserve-3d;
    }

    input[type="range"]::-webkit-slider-thumb {
        width: 30px;
        height: 30px;
        margin-top: -15px !important;
        z-index: 20 !important;
    }
}

/* ==========================================================
   GLASSMORPHISM PANEL
   ========================================================== */

.atf-banner-area {
    position: relative;
    background-image: url('/resources/images/birds-beach-horizon.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.atf-banner-area::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.15);
}

.consultation-form {
    position: relative;
    z-index: 5;
    background: rgba(255, 255, 255, 0.28) !important;
    backdrop-filter: blur(22px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(22px) saturate(160%) !important;
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 20px;
    box-shadow:
            inset 0 1px 2px rgba(255,255,255,0.4),
            0 10px 30px rgba(0,0,0,0.25);
}

.consultation-form::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 20px;
    pointer-events: none;
    background: linear-gradient(
            145deg,
            rgba(255,255,255,0.55),
            rgba(255,255,255,0.08)
    );
    mix-blend-mode: overlay;
}

/* ==========================================================
   BUTTONS + LABELS
   ========================================================== */

.btn.btn-primary {
    background: linear-gradient(145deg, rgba(13,110,253,0.9), rgba(0,85,204,0.7));
    border-radius: 12px;
    color: white;
    font-weight: 600;
}

.d-flex small.text-muted {
    color: #1a1a1a !important;
}

@media (max-width: 768px) {
    .d-flex small.text-muted {
        font-size: 1rem !important;
    }
}