/*
 * Aiden UI · switch — switch.module.css de Arc traducido a clases aui-switch-*.
 * El pulgar viaja con el muelle de Arc «glide» (visualDuration .3, sin rebote: 605 ms) y se estira con
 * «snappy» (.26, rebote .12: 509 ms), ambos como curvas linear() muestreadas del propio muelle.
 */
.aui-switch {
    --aui-switch-glide: linear(0, 0.0294, 0.0984, 0.1872, 0.2894, 0.3839, 0.4725, 0.553, 0.6243, 0.6865, 0.7399, 0.7854, 0.8259, 0.8576, 0.8838, 0.9055, 0.9234, 0.938, 0.95, 0.9597, 0.9681, 0.9744, 0.9795, 0.9836, 0.9869, 0.9895, 0.9916, 0.9933, 0.9948, 0.9958, 0.9967, 0.9974, 0.9979, 0.9983, 0.9987, 0.999, 0.9992, 0.9994, 0.9995, 0.9996, 1);
    --aui-switch-snappy: linear(0, 0.03, 0.0955, 0.1889, 0.2921, 0.3959, 0.487, 0.5775, 0.6575, 0.7267, 0.7811, 0.8304, 0.8708, 0.901, 0.9272, 0.9477, 0.9635, 0.9746, 0.9837, 0.9903, 0.995, 0.998, 1.0002, 1.0016, 1.0023, 1.0027, 1.0028, 1.0027, 1.0025, 1.0023, 1.002, 1.0017, 1.0014, 1.0012, 1.0009, 1.0008, 1.0006, 1.0005, 1.0004, 1.0003, 1);
    position: relative; display: inline-flex; min-height: var(--control-height-md); align-items: center; gap: var(--space-3);
    margin: 0; padding: 0; border: 0; color: var(--foreground); background: transparent; font-family: var(--font-body); font-size: var(--text-sm);
    letter-spacing: var(--tracking-body); cursor: pointer; -webkit-tap-highlight-color: transparent; vertical-align: middle;
}
@supports not (transition-timing-function: linear(0, 1)) {
    .aui-switch { --aui-switch-glide: cubic-bezier(.22, 1, .36, 1); --aui-switch-snappy: cubic-bezier(.22, 1, .36, 1); }
}
.aui-switch *, .aui-switch *::before, .aui-switch *::after { box-sizing: border-box; }
.aui-switch[data-disabled] { cursor: not-allowed; opacity: .5; }

/* El input nativo es el interruptor: transparente y encima de todo (pista y texto), como el botón de Radix.
   :not(#aui) suma la especificidad de un id, para ganar al CSS de panel con !important. */
.aui-switch .aui-switch-input:not(#aui) { position: absolute !important; inset: 0 !important; z-index: 1; width: 100% !important; height: 100% !important; min-width: 0 !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; opacity: 0 !important; cursor: inherit; -webkit-appearance: none !important; appearance: none !important; outline: none !important; }
.aui-switch .aui-switch-input:not(#aui)::before, .aui-switch .aui-switch-input:not(#aui)::after { display: none !important; content: none !important; }

/* Caja fija: el pulgar se mueve dentro con transformaciones y nada alrededor se desplaza. La pista funde entre sus dos rellenos. */
.aui-switch-track { position: relative; box-sizing: border-box; display: flex; flex: 0 0 auto; width: 42px; height: 24px; align-items: center; padding: 3px; border-radius: var(--radius-pill); background: var(--control-track); isolation: isolate; transition: background-color var(--duration-fast) var(--ease-standard); }
.aui-switch-track::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--control-on); opacity: 0; transition: opacity var(--duration-standard) var(--ease-standard); }
.aui-switch[data-state="checked"] .aui-switch-track::before { opacity: 1; }
.aui-switch-thumb { flex: 0 0 auto; width: 18px; height: 18px; border-radius: var(--radius-pill); background: var(--control-thumb); box-shadow: var(--control-thumb-shadow); will-change: transform; transition: background-color var(--duration-standard) var(--ease-standard), translate 605ms var(--aui-switch-glide), width 509ms var(--aui-switch-snappy); }
.aui-switch[data-state="checked"] .aui-switch-thumb { background: var(--control-thumb-on); }
@media (hover: hover) and (pointer: fine) { .aui-switch[data-state="unchecked"]:not([data-disabled]):hover .aui-switch-track { background: var(--control-track-hover); } }
.aui-switch .aui-switch-label { margin: 0; padding: 0; color: inherit; font: inherit; line-height: var(--leading-body); cursor: inherit; }

.aui-switch[data-instant] .aui-switch-track, .aui-switch[data-instant] .aui-switch-track::before, .aui-switch[data-instant] .aui-switch-thumb { transition: none !important; }
@media (prefers-reduced-motion: reduce) { .aui-switch-track, .aui-switch-track::before, .aui-switch-thumb { transition: none !important; } }
