/* welcome-theme.css — the Gold | Classic | Bloody Diamond | Natural Emerald
   themes on the welcome page (Hugo, 2026-10-18). Loaded ONLY by welcome.html;
   the login view inside index.html never loads it, so it stays gold.
   Gold = the :root defaults in welcome.html (body.gold-theme, applied by
   dashboard-theme-toggle.js), so there is no gold block here. Classic =
   body without a theme class, Bloody Diamond = body.bloody-theme, Natural
   Emerald = body.emerald-theme. Same body classes and same localStorage key
   as the dashboard, so the choice carries over between the two pages. */

/* ---- the four-sun quick switch in the welcome top bar ---- */
.theme-quick-switch { display: flex; align-items: center; gap: 8px; margin-inline-start: 4px; }
.theme-quick-btn { width: 16px; height: 16px; border: none; padding: 0; background: none; border-radius: 50%; position: relative; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s ease; }
.theme-quick-btn svg { display: block; width: 100%; height: 100%; }
.theme-quick-btn:hover { transform: translateY(-2px); }
.theme-quick-btn.active { transform: scale(1.15); }
.theme-quick-btn.active::after { content: ""; position: absolute; bottom: -5px; left: 50%; transform: translateX(-50%); width: 10px; height: 2px; background: currentColor; }
.theme-quick-btn[data-dashboard-theme="gold"] { color: #FFD700; }
.theme-quick-btn[data-dashboard-theme="classic"] { color: #2E5BFF; }
.theme-quick-btn[data-dashboard-theme="bloody"] { color: #A30000; }
.theme-quick-btn[data-dashboard-theme="emerald"] { color: #004400; }

/* guest pill in the nav-end group (just left of the Log In button), same
   look as the themed dashboard .role-badge (dashboard-theme.css ~170: gold
   border + gold text, follows --gold). The nav stretches its children
   (align-items: stretch), so the pill keeps its natural height and centers
   its own text. */
.guest-badge { background: transparent; border: 1px solid var(--gold); border-radius: 12px; font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; color: var(--gold); padding: 6px 12px; white-space: nowrap; display: inline-flex; align-items: center; align-self: center; line-height: 1.2; }
@media (max-width: 420px) { .guest-badge { font-size: 10px; padding: 4px 8px; letter-spacing: 0.3px; } }

/* ---- Classic (no theme class): electric blue #2E5BFF ---- */
body:not(.gold-theme):not(.bloody-theme):not(.emerald-theme) {
  --gold: #2E5BFF;
  --gold-2: #2E5BFF;
  --gold-3: #2E5BFF;
  --gold-soft: rgba(46, 91, 255, 0.14);
}
body:not(.gold-theme):not(.bloody-theme):not(.emerald-theme) #gGold stop { stop-color: #2E5BFF !important; }
body:not(.gold-theme):not(.bloody-theme):not(.emerald-theme) .gold-contour { border-color: rgba(46, 91, 255, 0.75); box-shadow: 0 0 6px rgba(46, 91, 255, 0.45), 0 0 16px rgba(46, 91, 255, 0.14), inset 0 0 12px rgba(46, 91, 255, 0.07); }
body:not(.gold-theme):not(.bloody-theme):not(.emerald-theme) .hero-logo { --gold-logo: #2E5BFF; box-shadow: 0 0 60px rgba(46, 91, 255, 0.18); }

/* ---- Bloody Diamond: deep blood red #A30000 ---- */
body.bloody-theme {
  --gold: #A30000;
  --gold-2: #A30000;
  --gold-3: #A30000;
  --gold-soft: rgba(163, 0, 0, 0.14);
}
body.bloody-theme #gGold stop { stop-color: #A30000 !important; }
body.bloody-theme .gold-contour { border-color: rgba(163, 0, 0, 0.75); box-shadow: 0 0 6px rgba(163, 0, 0, 0.45), 0 0 16px rgba(163, 0, 0, 0.14), inset 0 0 12px rgba(163, 0, 0, 0.07); }
body.bloody-theme .hero-logo { --gold-logo: #A30000; box-shadow: 0 0 60px rgba(163, 0, 0, 0.18); }

/* ---- Natural Emerald: the Matrix digit green #00E676 (welcome.js rain, Hugo 2026-10-19; the welcome page has no light mode) ---- */
body.emerald-theme {
  --gold: #00E676;
  --gold-2: #00E676;
  --gold-3: #00E676;
  --gold-soft: rgba(0, 230, 118, 0.14);
}
body.emerald-theme #gGold stop { stop-color: #00E676 !important; }
body.emerald-theme .gold-contour { border-color: rgba(0, 230, 118, 0.75); box-shadow: 0 0 6px rgba(0, 230, 118, 0.45), 0 0 16px rgba(0, 230, 118, 0.14), inset 0 0 12px rgba(0, 230, 118, 0.07); }
body.emerald-theme .hero-logo { --gold-logo: #00E676; box-shadow: 0 0 60px rgba(0, 230, 118, 0.18); }
body.emerald-theme .theme-quick-btn[data-dashboard-theme="emerald"] { color: #00E676; }

/* Phone pass (2026-10-18): the nav (lang + 4 suns + guest + 2 buttons) was 465px wide
   on a 375px phone. Wrap it into two rows, give the suns 44px tap targets. */
@media (max-width: 600px) {
  /* Hugo, 2026-10-20: grid, no DOM move. Row 1 FR over EN, sun/moon, Log In, Create account; row 2 the four suns; Guest badge hidden. nav-end is display:contents so its three children are grid items. */
  .nav { display: grid; grid-template-columns: auto auto 1fr auto auto; grid-template-rows: auto auto; align-items: center; row-gap: 0; padding-top: max(env(safe-area-inset-top, 0px), 4px); padding-bottom: 2px; min-height: 0; } /* 4px floor: in a Safari tab env() is 0 and FR sat flush on the top edge */
  .nav-end { display: contents; }
  .nav-end .btn { grid-row: 1; min-height: 38px; margin: 4px 0 2px; }
  .nav-end .btn:not(.btn-gold) { grid-column: 4; }
  .nav-end .btn-gold { grid-column: 5; }
  .nav-end .guest-badge { display: none; } /* Hugo, 2026-10-20: no Guest badge on phone */
  .nav .lang { grid-row: 1; grid-column: 1; }
  .nav .mode-switch { grid-row: 1; grid-column: 2; }
  .nav .theme-quick-switch { grid-row: 2; grid-column: 1 / 6; justify-self: center; }
  .theme-quick-switch { gap: 0; }
  .theme-quick-btn { box-sizing: border-box; width: 44px; height: 40px; padding: 11px 14px; }
  .theme-quick-btn.active::after { bottom: 3px; }
  .btn { min-width: 44px; }
  .nav .lang { flex-direction: column; gap: 2px; align-self: center; } /* Hugo, 2026-10-20: FR over EN, one vertical stack at the left of the row; switch + suns stay right */
  .nav .lang .btn { min-height: 0; height: 21px; padding: 0 10px; }
}
