/* ═══════════════════════════════════════════════
   Ákotí Checkbox, Radio & Switch — Pure CSS

   Checkbox:
     <label class="akoti-check">
       <input type="checkbox">
       <span class="akoti-check-mark"></span>
       Agree to terms
     </label>

   Radio:
     <label class="akoti-radio">
       <input type="radio" name="choice">
       <span class="akoti-radio-mark"></span>
       Option A
     </label>

   Switch:
     <label class="akoti-switch">
       <input type="checkbox">
       <span class="akoti-switch-track"></span>
       Dark Mode
     </label>
   ═══════════════════════════════════════════════ */

/* ── Checkbox ──────────────────────────────────────── */

.akoti-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 14px;
  color: #1e1e24;
  cursor: pointer;
  user-select: none;
}

.akoti-check input { display: none; }

.akoti-check-mark {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(26, 47, 94, 0.25);
  border-radius: 6px 2px 6px 2px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.04);
}

.akoti-check-mark::after {
  content: '';
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.2s;
  margin-top: -2px;
}

.akoti-check input:checked + .akoti-check-mark {
  background: #1a2f5e;
  border-color: #1a2f5e;
  border-radius: 2px 6px 2px 6px;
}

.akoti-check input:checked + .akoti-check-mark::after {
  transform: rotate(45deg) scale(1);
}

.akoti-check:hover .akoti-check-mark { border-color: #1a2f5e; }

.akoti-check input:disabled + .akoti-check-mark {
  opacity: 0.4;
  cursor: not-allowed;
}
.akoti-check:has(input:disabled) { cursor: not-allowed; opacity: 0.6; }

/* ── Radio ─────────────────────────────────────────── */

.akoti-radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 14px;
  color: #1e1e24;
  cursor: pointer;
  user-select: none;
}

.akoti-radio input { display: none; }

.akoti-radio-mark {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(26, 47, 94, 0.25);
  border-radius: 50%;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.04);
}

.akoti-radio-mark::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1a2f5e;
  transform: scale(0);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.akoti-radio input:checked + .akoti-radio-mark {
  border-color: #1a2f5e;
}

.akoti-radio input:checked + .akoti-radio-mark::after {
  transform: scale(1);
}

.akoti-radio:hover .akoti-radio-mark { border-color: #1a2f5e; }

/* ── Switch / Toggle ───────────────────────────────── */

.akoti-switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Outfit', system-ui, sans-serif;
  font-size: 14px;
  color: #1e1e24;
  cursor: pointer;
  user-select: none;
}

.akoti-switch input { display: none; }

.akoti-switch-track {
  width: 44px;
  height: 24px;
  border-radius: 12px;
  background: #d0d0d8;
  position: relative;
  transition: background 0.25s;
  flex-shrink: 0;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.akoti-switch-track::after {
  content: '';
  width: 20px;
  height: 20px;
  border-radius: 10px;
  background: white;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.akoti-switch input:checked + .akoti-switch-track {
  background: #1a2f5e;
}

.akoti-switch input:checked + .akoti-switch-track::after {
  transform: translateX(20px);
}

.akoti-switch:hover .akoti-switch-track { opacity: 0.9; }

/* Small switch */
.akoti-switch.sm .akoti-switch-track { width: 34px; height: 18px; border-radius: 9px; }
.akoti-switch.sm .akoti-switch-track::after { width: 14px; height: 14px; border-radius: 7px; }
.akoti-switch.sm input:checked + .akoti-switch-track::after { transform: translateX(16px); }

/* ── Checkbox / Radio groups ───────────────────────── */

.akoti-check-group,
.akoti-radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.akoti-check-group.horizontal,
.akoti-radio-group.horizontal {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 16px;
}

/* ── Dark mode ─────────────────────────────────────── */

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .akoti-check, .akoti-radio, .akoti-switch { color: #e0e0e4; }
  :root:not([data-theme="light"]) .akoti-check-mark, .akoti-radio-mark { background: #2a2a32; border-color: rgba(255,255,255,0.15); }
  :root:not([data-theme="light"]) .akoti-check input:checked + .akoti-check-mark { background: #a8c8e8; border-color: #a8c8e8; }
  :root:not([data-theme="light"]) .akoti-check input:checked + .akoti-check-mark::after { border-color: #0f1b3d; }
  :root:not([data-theme="light"]) .akoti-radio input:checked + .akoti-radio-mark { border-color: #a8c8e8; }
  :root:not([data-theme="light"]) .akoti-radio-mark::after { background: #a8c8e8; }
  :root:not([data-theme="light"]) .akoti-switch-track { background: #3a3a44; }
  :root:not([data-theme="light"]) .akoti-switch input:checked + .akoti-switch-track { background: #a8c8e8; }
}
