/* ============================================================
   AUC THEME TOGGLE — Instant Sun/Moon Pill Switch
   High-performance, GPU-accelerated. No heavy animations.
   ============================================================ */

/* Hidden native checkbox */
.auc-theme-checkbox {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* The toggle pill wrapper */
.auc-theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* The pill track */
.auc-toggle-track {
  position: relative;
  width: 56px;
  height: 28px;
  border-radius: 99px;
  background: linear-gradient(135deg, #1a2e4a 0%, #0d1f36 100%);
  border: 1.5px solid rgba(0, 229, 255, 0.3);
  box-shadow:
    inset 0 2px 6px rgba(0,0,0,0.4),
    0 0 12px rgba(0, 229, 255, 0.12);
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  flex-shrink: 0;
}

/* The pill thumb */
.auc-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  line-height: 1;
  will-change: transform;
  transform: translateX(0);
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
              background 0.22s ease,
              box-shadow 0.22s ease;
  background: linear-gradient(135deg, #1e3a5f, #2a4d7f);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 0 6px rgba(0, 229, 255, 0.3);
}

/* Moon emoji visible in dark mode */
.auc-toggle-moon { display: block; }
.auc-toggle-sun  { display: none; }

/* Label hints */
.auc-toggle-label-dark,
.auc-toggle-label-light {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.55;
  transition: opacity 0.2s ease, color 0.2s ease;
  line-height: 1;
}
.auc-toggle-label-dark  { color: #00E5FF; }
.auc-toggle-label-light { color: #FFB800; }

/* ── Light Mode Active State ── */
body.light-mode .auc-toggle-track {
  background: linear-gradient(135deg, #e8f4fd 0%, #dbeafe 100%);
  border-color: rgba(255, 184, 0, 0.5);
  box-shadow:
    inset 0 2px 6px rgba(0,0,0,0.08),
    0 0 14px rgba(255, 184, 0, 0.2);
}

body.light-mode .auc-toggle-thumb {
  transform: translateX(28px);
  background: linear-gradient(135deg, #FFB800, #FF8A00);
  box-shadow: 0 2px 10px rgba(255, 140, 0, 0.55), 0 0 8px rgba(255, 184, 0, 0.4);
}

body.light-mode .auc-toggle-moon { display: none; }
body.light-mode .auc-toggle-sun  { display: block; }

body.light-mode .auc-toggle-label-dark  { opacity: 0.35; }
body.light-mode .auc-toggle-label-light { opacity: 0.9; }

/* ── Hover / Focus ── */
.auc-theme-toggle:hover .auc-toggle-track {
  border-color: rgba(0, 229, 255, 0.6);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.2);
}
body.light-mode .auc-theme-toggle:hover .auc-toggle-track {
  border-color: rgba(255, 184, 0, 0.7);
  box-shadow: 0 0 20px rgba(255, 184, 0, 0.25);
}

.auc-theme-checkbox:focus-visible ~ .auc-toggle-track {
  outline: 2px solid var(--neon-cyan, #00E5FF);
  outline-offset: 3px;
}