/* Themes, the "Tema" button (src/tema.html, src/tema.js) and the language link beside it, on every page
   including the legal ones.
   Açık is the default: its colours are the :root tokens in site.css (and in yasal.html for the legal
   pages); each other theme only gives those tokens other values here. A colour that must stay the same
   in every theme (the light text on a coffee coloured button, the badge's red, the dark footer) uses the
   constant tokens in site.css (--light, --dark, --brand-red) or a token of its own (--foot, --btn). */
:root[data-tema="gri"]{
  --paper:#DCD9D4; --paper-2:#D0CDC7; --ink:#151112; --muted:#575052; --line:rgba(21,17,18,.17);
  --field:#F4F2EF; --blinds:rgba(60,45,40,.1);
}
:root[data-tema="alacakaranlik"]{
  --paper:#2D2728; --paper-2:#383132; --ink:#F2F0EC; --muted:#C4BBBD; --line:rgba(242,240,236,.18); --red:#FF7A8A;
  --field:#3B3436; --card:#353031; --foot:#171314; --btn:#151112; --blinds:rgba(255,240,225,.035);
  color-scheme:dark;
}
:root[data-tema="koyu"]{
  --paper:#151112; --paper-2:#1F1A1C; --ink:#F2F0EC; --muted:#AAA1A4; --line:rgba(242,240,236,.15); --red:#FF6B7D;
  --field:#211C1E; --card:#1D181A; --foot:#0C0A0B; --btn:#4A4245; --blinds:rgba(255,240,225,.03);
  color-scheme:dark;
}
/* On a dark page the coffee colours are too dark to read as text or thin lines: the brew section uses
   their light partners (the label cards keep their own colours). */
:root[data-tema="alacakaranlik"] .brew,:root[data-tema="koyu"] .brew{--erik:var(--erik-ink);--okra:var(--okra-ink);--orman:var(--orman-ink)}

/* A picture made in two versions, one for a light page and one for a dark page (the payment logos on the
   checkout and legal pages): the one that suits the theme shows, the other is never downloaded. */
.zemin-koyu{display:none}
:root[data-tema="alacakaranlik"] .zemin-acik,:root[data-tema="koyu"] .zemin-acik{display:none}
:root[data-tema="alacakaranlik"] .zemin-koyu,:root[data-tema="koyu"] .zemin-koyu{display:block}

/* ---------- the "Tema" button: the current theme's icon, a menu of the four ---------- */
.tema{position:relative;flex:none}
.tema-btn{appearance:none;display:inline-flex;align-items:center;gap:8px;height:36px;padding:0 12px;border:1px solid var(--line);border-radius:4px;background:transparent;color:var(--muted);font:inherit;font-size:11px;letter-spacing:.24em;text-transform:uppercase;cursor:pointer;transition:color .2s,border-color .2s}
.tema-btn:hover,.tema-btn[aria-expanded="true"]{color:var(--ink);border-color:color-mix(in srgb,var(--ink) 45%,transparent)}
.tema svg{width:16px;height:16px;flex:none;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linecap:round;stroke-linejoin:round}
.tema-btn [data-i]{display:none}
:root:not([data-tema]) .tema-btn [data-i="acik"],:root[data-tema="gri"] .tema-btn [data-i="gri"],
:root[data-tema="alacakaranlik"] .tema-btn [data-i="alacakaranlik"],:root[data-tema="koyu"] .tema-btn [data-i="koyu"]{display:block}
.tema-menu{position:absolute;right:0;top:calc(100% + 6px);z-index:40;min-width:208px;padding:6px;background:var(--paper);color:var(--ink);border:1px solid var(--line);border-radius:6px;box-shadow:0 22px 44px -20px rgba(21,17,18,.5)}
.tema-bas{display:flex;align-items:center;gap:8px;margin:0;padding:8px 10px 6px;font-size:11px;letter-spacing:.2em;text-transform:uppercase;color:var(--muted)}
.tema-bas svg{width:14px;height:14px}
.tema-bas .nk{fill:currentColor;stroke:none}
.tema-menu button{appearance:none;display:flex;align-items:center;gap:10px;width:100%;min-height:40px;padding:8px 10px;border:0;border-radius:4px;background:none;color:inherit;font:inherit;font-size:13px;letter-spacing:.04em;text-align:left;cursor:pointer}
.tema-menu button:hover,.tema-menu button:focus-visible{background:color-mix(in srgb,var(--ink) 8%,transparent)}
.tema-menu button:focus-visible{outline:2px solid var(--red);outline-offset:-2px}
.tema-menu .ok{margin-left:auto;opacity:0}
.tema-menu [aria-checked="true"] .ok{opacity:.75}
@media (max-width:1080px){.tema-btn .t{display:none}.tema-btn{padding:0 9px}}

/* ---------- the language link: the same page in the other language (build.js, dilLinki) ---------- */
.dil{display:inline-flex;align-items:center;justify-content:center;flex:none;height:36px;min-width:36px;padding:0 9px 0 11px;border:1px solid var(--line);border-radius:4px;color:var(--muted);font-size:11px;letter-spacing:.2em;text-decoration:none;transition:color .2s,border-color .2s}
.dil:hover{color:var(--ink);border-color:color-mix(in srgb,var(--ink) 45%,transparent)}
