/* Eden colour themes, shared by edenafk.com, alliance.edenafk.com and event-rankings.edenafk.com.
   Keep the three copies (EdenAlliance/public, EdenAlliance/home/public, Eden/public) identical.
   The chosen theme is set as <html data-accent="..."> by the inline script in each page's head,
   and the picker (theme.js) saves it in a cookie shared by every edenafk.com site.
   Each theme sets the accent; the background, raised surfaces, lines and header take a tint of it. */

:root[data-accent="gold"]     { --accent: #b4801a; --accent-ink: #855a06; }
:root[data-accent="sky"]      { --accent: #2a6fd6; --accent-ink: #1d55a8; }
:root[data-accent="emerald"]  { --accent: #1f8a5b; --accent-ink: #136b45; }
:root[data-accent="teal"]     { --accent: #12808a; --accent-ink: #0c636b; }
:root[data-accent="amethyst"] { --accent: #7a4fd6; --accent-ink: #5c37b0; }
:root[data-accent="rose"]     { --accent: #c2367a; --accent-ink: #9c2560; }
:root[data-accent="crimson"]  { --accent: #c0392b; --accent-ink: #9a2a1f; }

:root[data-accent] {
  --bg: color-mix(in srgb, var(--accent) 7%, #f2f4f8);
  --raised: color-mix(in srgb, var(--accent) 6%, #f7f8fb);
  --line: color-mix(in srgb, var(--accent) 16%, #dce1ea);
  --head: color-mix(in srgb, var(--accent) 11%, #ffffff);
  --glow: color-mix(in srgb, var(--accent) 16%, transparent);
}

@media (prefers-color-scheme: dark) {
  :root[data-accent="gold"]     { --accent: #e0b04a; --accent-ink: #f0c869; }
  :root[data-accent="sky"]      { --accent: #7db4ff; --accent-ink: #a8ccff; }
  :root[data-accent="emerald"]  { --accent: #5fd49a; --accent-ink: #8be6b8; }
  :root[data-accent="teal"]     { --accent: #4fd1d9; --accent-ink: #86e3e8; }
  :root[data-accent="amethyst"] { --accent: #b69cff; --accent-ink: #cdbcff; }
  :root[data-accent="rose"]     { --accent: #ff7ab8; --accent-ink: #ffa3cd; }
  :root[data-accent="crimson"]  { --accent: #ff7a6b; --accent-ink: #ff9d91; }

  :root[data-accent] {
    --bg: color-mix(in srgb, var(--accent) 6%, #0d1220);
    --raised: color-mix(in srgb, var(--accent) 7%, #1a2238);
    --line: color-mix(in srgb, var(--accent) 20%, #27314a);
    --head: color-mix(in srgb, var(--accent) 13%, #151c2f);
    --glow: color-mix(in srgb, var(--accent) 20%, transparent);
  }
}

/* Tinted header with a thin line of the accent under it. */
:root[data-accent] .site-head { background: var(--head); border-bottom: 2px solid var(--accent); }

/* The picker: a round button that opens a list of themes. */
.theme-pick { position: relative; flex: none; }
.theme-btn {
  display: inline-grid; place-items: center; width: 2.1rem; height: 2.1rem; padding: 0;
  border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink); cursor: pointer;
}
.theme-btn:hover, .theme-btn[aria-expanded="true"] { border-color: var(--accent); }
.theme-btn .dot-now { width: 1rem; height: 1rem; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--accent); }
.theme-menu {
  position: absolute; right: 0; top: calc(100% + .45rem); z-index: 20; width: 13.5rem; padding: .5rem;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 14px 40px rgb(0 0 0 / .22); font: 14px/1.4 var(--font-body, 'Inter', system-ui, sans-serif);
}
.theme-menu[hidden] { display: none; }
.theme-menu .tm-title { padding: .3rem .55rem .45rem; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.theme-menu button {
  display: flex; align-items: center; gap: .6rem; width: 100%; padding: .45rem .55rem; border: 0; border-radius: 8px;
  background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.theme-menu button:hover, .theme-menu button:focus-visible { background: var(--raised); }
.theme-menu button[aria-checked="true"] { font-weight: 600; }
.theme-menu .sw { width: 1.1rem; height: 1.1rem; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .15); }
.theme-menu .tick { margin-left: auto; color: var(--accent-ink); visibility: hidden; }
.theme-menu button[aria-checked="true"] .tick { visibility: visible; }
.theme-menu .tm-note { padding: .45rem .55rem .2rem; font-size: .75rem; color: var(--muted); }
