/* Component: Toggle Switch
 * Description: Styles for a custom toggle switch component, including base appearance,
 *              interactive states (focus, hover, disabled), and the animated toggle knob.
 *              The active state changes the background color and moves the knob to indicate toggled status.
 */

.smd-component_toggle {
    width: 52px;
    height: 26px;
    background: var(--color-background-lighter);
    border-radius: 16px;
    position: relative;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.2, 0.0, 0, 1.0);
    border: 2px solid #79747E;
    outline: none;
    display: inline-block;
    user-select: none;
}

.smd-component_toggle:focus {
    box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.12);
}

.smd-component_toggle:hover {
    opacity: 0.8;
}

.smd-component_toggle:hover::before {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    background: rgba(28, 27, 31, 0.08);
    pointer-events: none;
}

.smd-component_toggle:disabled {
    opacity: 0.38;
    cursor: not-allowed;
    border-color: #1C1B1F;
}

.smd-component_toggle::after {
    content: '';
    width: 14px;
    height: 14px;
    background: #79747E;
    border-radius: 50%;
    position: absolute;
    top: 6px;
    left: 6px;
    transition: all 0.2s cubic-bezier(0.2, 0.0, 0, 1.0);
    box-shadow: 0 1px 3px 1px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.3);
}

.smd-component_toggle--active {
    background: var(--color-branding-primary);
    border-color: var(--color-branding-primary);
}

.smd-component_toggle--active::after {
    left: 24px;
    background: white;
    width: 22px;
    height: 22px;
    top: 2px;
}