/* =====================================================================
   switches.css — Switch iOS azul reutilizable
   ===================================================================== */

.switch-row {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    font-size: 13px;
    color: var(--text-color);
    margin: 6px 0;
}

.switch-row input[type="checkbox"].switch-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.switch-track {
    position: relative;
    display: inline-block;
    flex: 0 0 auto;
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: rgba(120, 120, 128, 0.32);
    transition: background-color 0.2s ease;
}
[data-theme="light"] .switch-track { background: rgba(120, 120, 128, 0.28); }

.switch-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease;
}

.switch-row input[type="checkbox"].switch-input:checked ~ .switch-track {
    background: var(--accent);
}
.switch-row input[type="checkbox"].switch-input:checked ~ .switch-track .switch-thumb {
    transform: translateX(18px);
}
.switch-row input[type="checkbox"].switch-input:focus-visible ~ .switch-track {
    box-shadow: 0 0 0 3px rgba(95, 123, 202, 0.35);
}
.switch-row input[type="checkbox"].switch-input:disabled ~ .switch-track {
    opacity: 0.5;
    cursor: not-allowed;
}

.switch-label { line-height: 1.3; }

.switch-row.switch-row--compact { font-size: 12px; margin: 4px 0; padding: 3px 0; }
.switch-row.switch-row--compact .switch-track { width: 36px; height: 20px; }
.switch-row.switch-row--compact .switch-thumb { width: 16px; height: 16px; }
.switch-row.switch-row--compact input[type="checkbox"].switch-input:checked ~ .switch-track .switch-thumb {
    transform: translateX(16px);
}