/* Quality Selector Slider CSS - Extracted from quality-selector.php */

/* Improved Amazing Slider CSS */
.blaz-simple-slider {
    --slider-value: 50;
    --color-minimal: #ec4899;  /* Minimal compression (pink) */
    --color-low: #8b5cf6;      /* Low compression (purple) */
    --color-balanced: #0ea5e9; /* Balanced compression (blue) */
    --color-high: #14b8a6;     /* Max compression (teal) */
    --gradient: linear-gradient(to right, var(--color-minimal), var(--color-low), var(--color-balanced), var(--color-high));
    
    position: relative;
    width: 100%;
    padding: 70px 0 0px;
    font-family: 'Maven Pro', Verdana, Geneva, Tahoma, sans-serif !important;
}

/* Hidden original input */
.blaz-simple-slider input[type="range"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
    margin: 0;
}

/* Track styling */
.blaz-track {
    position: relative;
    height: 8px;
    background-color: #e2e8f0;
    border-radius: 4px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Progress bar with gradient */
.blaz-progress {
    position: absolute;
    height: 100%;
    width: calc(var(--slider-value) * 1%);
    background: var(--gradient);
    border-radius: 4px;
    transition: width 0.2s ease;
}

/* Handle */
.blaz-handle {
    position: absolute;
    top: 50%;
    right: 0;
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    transform: translate(50%, -50%);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Amazing bubble with gradient background - ALWAYS VISIBLE */
.blaz-bubble {
    position: absolute;
    top: -54px;
    left: 50%;
    background: var(--gradient);
    border-radius: 12px;
    padding: 2px;
    transform: translateX(-50%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    pointer-events: none;
    z-index: 20;
}

.blaz-bubble::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 10px;
    height: 10px;
    background: var(--gradient);
    box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.03);
    margin-top: -5px;
    z-index: -1;
}

.blaz-value {
    display: block;
    background: white;
    border-radius: 10px;
    padding: 5px 10px;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    position: relative;
    z-index: 1;
    min-width: 40px;
    text-align: center;
}

.blaz-value::after {
    content: '%';
    font-size: 12px;
    font-weight: 400;
    opacity: 0.7;
    margin-left: 1px;
}

/* ENHANCED: Bubble always visible with floating animation */
.blaz-bubble-visible {
    opacity: 1;
    animation: float-subtle 3s ease-in-out infinite;
}

/* ENHANCED: Level displays with inline icons */
.blaz-level-display {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.blaz-level {
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    width: 24%; /* Changed from 32% to 24% for 4 levels */
}

.blaz-level-wrapper {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 50px;
    position: relative;
    transition: all 0.3s ease;
}

.blaz-level:hover .blaz-level-wrapper {
    transform: translateY(-2px);
}

/* ENHANCED: Amazing glow behind the labels */
.blaz-level-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50px;
    opacity: 0.08;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 0;
}

.blaz-level.minimal .blaz-level-glow {
    background: var(--color-minimal);
}

.blaz-level.low .blaz-level-glow {
    background: var(--color-low);
}

.blaz-level.balanced .blaz-level-glow {
    background: var(--color-balanced);
}

.blaz-level.high .blaz-level-glow {
    background: var(--color-high);
}

.blaz-level:hover .blaz-level-glow {
    opacity: 0.15;
}

.blaz-level.active .blaz-level-glow {
    opacity: 0.2;
}

.blaz-level-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 10px;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blaz-level-icon svg {
    width: 22px;
    height: 22px;
    transition: transform 0.3s ease;
}

.blaz-level.minimal .blaz-level-icon {
    color: var(--color-minimal);
    box-shadow: 0 0 0 2px rgba(236, 72, 153, 0.2);
}

.blaz-level.low .blaz-level-icon {
    color: var(--color-low);
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
}

.blaz-level.balanced .blaz-level-icon {
    color: var(--color-balanced);
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.2);
}

.blaz-level.high .blaz-level-icon {
    border-radius: 100px;
    color: var(--color-high);
    box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.2);
}

.blaz-level.minimal:hover .blaz-level-icon {
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.3);
}

.blaz-level.low:hover .blaz-level-icon {
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.3);
}

.blaz-level.balanced:hover .blaz-level-icon {
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.3);
}

.blaz-level.high:hover .blaz-level-icon {
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.3);
}

.blaz-level span {
    font-size: 14px;
    font-weight: 500;
    color: #212529;
    transition: color 0.3s ease, transform 0.3s ease;
    position: relative;
    z-index: 1;
}

/* Active states */
.blaz-level.active span {
    color: #0f172a;
    font-weight: 600;
}

.blaz-level.active .blaz-level-icon {
    transform: scale(1.1);
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.4);
}

.blaz-level.balanced.active .blaz-level-icon {
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.4);
}

.blaz-level.low.active .blaz-level-icon {
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.4);
}

.blaz-level.minimal.active .blaz-level-icon {
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.4);
}

.blaz-level.active .blaz-level-icon svg {
    transform: scale(1.1);
}

/* Interactive handle */
.blaz-simple-slider input:hover ~ .blaz-track .blaz-handle,
.blaz-simple-slider input:focus ~ .blaz-track .blaz-handle,
.blaz-simple-slider input:active ~ .blaz-track .blaz-handle {
    transform: translate(50%, -50%) scale(1.2);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
}

/* The main innovative feature: Color-sensitive ring that appears around handle */
.blaz-handle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: -1;
}

.blaz-simple-slider input:hover ~ .blaz-track .blaz-handle::before,
.blaz-simple-slider input:focus ~ .blaz-track .blaz-handle::before,
.blaz-simple-slider input:active ~ .blaz-track .blaz-handle::before {
    width: 36px;
    height: 36px;
    opacity: 0.15;
}

/* Handle ring color based on value */
.blaz-simple-slider[data-level="high"] .blaz-handle::before {
    background-color: var(--color-minimal);
}

.blaz-simple-slider[data-level="balanced"] .blaz-handle::before {
    background-color: var(--color-low);
}

.blaz-simple-slider[data-level="low"] .blaz-handle::before {
    background-color: var(--color-balanced);
}

.blaz-simple-slider[data-level="minimal"] .blaz-handle::before {
    background-color: var(--color-high);
}

/* ENHANCED: Pulse effect for active icon */
@keyframes pulse-icon-minimal {
    0% { box-shadow: 0 0 0 0 rgba(236, 72, 153, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(236, 72, 153, 0); }
    100% { box-shadow: 0 0 0 0 rgba(236, 72, 153, 0); }
}

@keyframes pulse-icon-low {
    0% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(139, 92, 246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0); }
}

@keyframes pulse-icon-balanced {
    0% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(14, 165, 233, 0); }
    100% { box-shadow: 0 0 0 0 rgba(14, 165, 233, 0); }
}

@keyframes pulse-icon-high {
    0% { box-shadow: 0 0 0 0 rgba(20, 184, 166, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(20, 184, 166, 0); }
    100% { box-shadow: 0 0 0 0 rgba(20, 184, 166, 0); }
}

.blaz-level.minimal.active .blaz-level-icon {
    animation: pulse-icon-minimal 2s infinite;
}

.blaz-level.low.active .blaz-level-icon {
    animation: pulse-icon-low 2s infinite;
}

.blaz-level.balanced.active .blaz-level-icon {
    animation: pulse-icon-balanced 2s infinite;
}

.blaz-level.high.active .blaz-level-icon {
    animation: pulse-icon-high 2s infinite;
}

/* Floating animation for bubble */
@keyframes float-subtle {
    0% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-3px); }
    100% { transform: translateX(-50%) translateY(0); }
}

/* Responsive */
@media (max-width: 576px) {
    .blaz-level-display {
        margin-top: 25px;
    }
    
    .blaz-level-wrapper {
        padding: 8px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        height: auto;
    }
    
    .blaz-level-icon {
        width: 36px;
        height: 36px;
        margin-right: 0;
        margin-bottom: 4px;
    }
    
    .blaz-level-icon svg {
        width: 22px;
        height: 22px;
    }
    
    /* Hide text on mobile */
    .level-text {
        display: none;
    }
    
    .blaz-level {
        width: 22%;
    }
    
    .blaz-level-glow {
        border-radius: 12px;
    }
}