﻿/* Container Layout */
.switch-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    padding: 20px;
}

/* Base Switch Label */
.switch-label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    position: relative;
    user-select: none;
}

/* Hide original HTML checkbox */
.switch-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Custom Slider Track */
.switch-slider {
    width: 36px;
    height: 20px;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 50rem;
    position: relative;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

    /* Custom Slider Knob */
    .switch-slider::before {
        content: "";
        position: absolute;
        width: 14px;
        height: 14px;
        border-radius: 50%;
        background-color: #adb5bd;
        top: 2px;
        left: 2px;
        transition: transform 0.15s ease-in-out, background-color 0.15s ease-in-out;
    }

/* Text Styling */
.switch-text {
    font-size: 16px;
    color: #212529;
}

/* --- STATE STYLES --- */

/* Checked Active State */
.switch-input:checked + .switch-slider {
    background-color: #0061f2;
    border-color: #0061f2;
}

    .switch-input:checked + .switch-slider::before {
        transform: translateX(16px);
        background-color: #fff;
    }

/* Disabled Default State */
.switch-label.disabled {
    cursor: default;
}

    .switch-label.disabled .switch-text {
        color: #adb5bd;
    }

.switch-input:disabled + .switch-slider {
    background-color: #f8f9fa;
    border-color: #e9ecef;
    opacity: 0.6;
}

    .switch-input:disabled + .switch-slider::before {
        background-color: #ced4da;
    }

/* Disabled Checked State Overlay */
.switch-input:disabled:checked + .switch-slider {
    background-color: #0061f2;
    border-color: #0061f2;
    opacity: 0.5; /* Gives the faded light-blue appearance */
}

    .switch-input:disabled:checked + .switch-slider::before {
        background-color: #fff;
    }
