/**
 * ============================================
 * PROGRESS BARS & SLIDERS
 * ============================================
 * 
 * Progress bars, toggles, and slider styles
 */

/* ============================================
   TOGGLE SWITCH
   ============================================ */

.switch {
    position: relative;
    display: inline-block;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: var(--transition-normal);
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: var(--text-light);
    transition: var(--transition-normal);
}

input:checked + .slider {
    background-color: var(--color-primary);
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--color-info);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Rounded slider */
.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Small switch variant */
.switch.small-switch {
    width: 12px;
    height: 20px;
}

.small-switch .slider:before {
    height: 20px;
    width: 20px;
    left: -6px;
    bottom: -2px;
    background-color: var(--text-muted);
    background-image: url('../images/open-lock.svg');
    background-repeat: no-repeat;
    background-position: center;
}

.small-switch input:checked + .slider {
    background-color: var(--text-light);
}

.small-switch input:checked + .slider:before {
    transform: translateX(32px);
    background: var(--gradient-primary);
    background-image: url('../images/closed-lock.svg');
}

/* ============================================
   PROGRESS BAR
   ============================================ */

.custom-progress {
    width: 100%;
    height: 4px;
    background: rgba(128, 128, 128, 0.3);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.custom-progress-bar {
    background: var(--gradient-primary);
    height: 4px;
    width: 0px;
    transition: width var(--transition-normal);
}

.progress-orange {
    background: var(--color-warning-orange);
}

.progress-blue {
    background: var(--color-info);
}

/* ============================================
   VIDEO PROGRESS
   ============================================ */

.video-progress {
    position: relative;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
}

.video-progress-bar {
    height: 100%;
    background: var(--color-primary);
    position: relative;
}

.video-progress-bar::after {
    content: '';
    position: absolute;
    right: -6px;
    top: -3px;
    width: 10px;
    height: 10px;
    background: var(--text-light);
    border-radius: 50%;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.video-progress:hover .video-progress-bar::after {
    opacity: 1;
}

/* ============================================
   BUFFERED PROGRESS
   ============================================ */

.video-progress-buffered {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.3);
    z-index: 1;
}
