/* Light / dark switch for the pay, admin, docs and legal pages (see theme.js). Self-contained: it carries its own
   colours so every page can use it whatever its own variables are called. */
.ts { flex: 0 0 auto; display: inline-flex; align-items: center; margin: 0; padding: 0; border: 0; border-radius: 999px; background: transparent; cursor: pointer; font: inherit; -webkit-tap-highlight-color: transparent; }
.ts:focus-visible { outline: 2px solid #18181b; outline-offset: 2px; }
.ts-track { position: relative; display: grid; grid-template-columns: 1fr 1fr; align-items: center; justify-items: center; width: 56px; height: 30px; border: 1px solid #e4e4e7; border-radius: 999px; background: #f4f4f5; transition: border-color 160ms ease; }
.ts:hover .ts-track { border-color: #a1a1aa; }
.ts-knob { position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%; background: #18181b; transition: transform 180ms cubic-bezier(.4, 0, .2, 1); }
.ts[data-dark="true"] .ts-knob { transform: translateX(26px); }
.ts .ts-icon { position: relative; z-index: 1; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ts .ts-sun { color: #fff; }
.ts .ts-moon { color: #a1a1aa; }
.ts[data-dark="true"] .ts-sun { color: #808080; }
.ts[data-dark="true"] .ts-moon { color: #0f0f0f; }
:root[data-theme="dark"] .ts:focus-visible { outline-color: #fafafa; }
:root[data-theme="dark"] .ts-track { border-color: #282828; background: #171717; }
:root[data-theme="dark"] .ts:hover .ts-track { border-color: #525252; }
:root[data-theme="dark"] .ts-knob { background: #fff; }
@media (max-width: 480px) {
  .ts-track { display: flex; justify-content: center; width: 32px; height: 32px; border: 0; border-radius: 6px; background: transparent; }
  .ts-knob, .ts[data-dark="true"] .ts-sun, .ts[data-dark="false"] .ts-moon { display: none; }
  .ts[data-dark] .ts-icon { width: 17px; height: 17px; color: #18181b; }
  :root[data-theme="dark"] .ts[data-dark] .ts-icon { color: #fafafa; }
}
@media (prefers-reduced-motion: reduce) { .ts-knob, .ts-track { transition: none; } }
