/*
 * Cookie bar of the voucher sites (wiklik.ai: home + students.html), on top of /m360m/home.css; colours from the
 * site's theme file. Markup: sites/scripts/site_tpl/wk_cookie.html; behaviour: /m360m/os-consent.js.
 * Mobile-first: one row of actions that scrolls sideways, never wrapped; touch targets >= 40 px.
 */
.cookie {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 400;
  max-width: 620px; max-height: calc(100vh - 24px); overflow-y: auto; margin: 0 auto; padding: 16px 18px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 18px 50px color-mix(in srgb, var(--ink) 18%, transparent);
}
.cookie[hidden] { display: none; }
.cookie p { font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.cookie p a { color: var(--ink); }
.cookie-actions { display: flex; gap: 8px; overflow-x: auto; margin-top: 12px; scrollbar-width: none; }
.cookie-actions::-webkit-scrollbar { display: none; }
.cookie-actions .btn { flex: 1 0 auto; }
.cookie-panel { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 6px; }
.cookie-panel[hidden] { display: none; }
.cookie-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; min-height: 44px; cursor: pointer; }
.cookie-row[hidden] { display: none; }
.cookie-lbl { display: grid; gap: 2px; font-size: 14px; color: var(--ink); }
.cookie-lbl small { color: var(--ink-2); font-size: 13px; line-height: 1.4; }
.cookie-on { font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.cookie-sw {
  appearance: none; -webkit-appearance: none; flex: 0 0 auto; width: 44px; height: 26px; margin: 0; border-radius: 999px;
  background: var(--line); position: relative; cursor: pointer; transition: background .2s;
}
.cookie-sw::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--bg);
  box-shadow: 0 1px 3px color-mix(in srgb, var(--ink) 25%, transparent); transition: transform .2s;
}
.cookie-sw:checked { background: var(--accent); }
.cookie-sw:checked::after { transform: translateX(18px); }
[dir="rtl"] .cookie-sw::after { left: auto; right: 3px; }
[dir="rtl"] .cookie-sw:checked::after { transform: translateX(-18px); }
@media (prefers-reduced-motion: reduce) { .cookie-sw, .cookie-sw::after { transition: none; } }
/* footer button that reopens the choices */
.foot-prefs { background: none; border: 0; padding: 0; min-height: 32px; font: inherit; color: inherit; cursor: pointer; text-align: start; }
.foot-prefs:hover { color: var(--ink); text-decoration: underline; }
