/* Shared app header — the ONE header definition (design 2026-07-27).
   Tokens are the seed of the future light/dark theme system: new header
   work references these, never hardcoded hexes.
   NOTE: base.css (injected via rounds.py BASE_CSS) and dashboard.py's BASE_CSS
   string literal cannot @import these vars — they carry the same navy as
   LITERAL hex values; this file is their source of truth. */
:root {
  --gg-navy: #1e293b;
  --gg-navy-border: #2b3a52;
  --gg-navy-deep: #14508f;
  --gg-gold: #FFD700;
}
.gg-header {
  /* flex-direction pinned: theme.css's mobile media query sets the bare
     `header` element to column, which would stack the logo above the title
     on narrow screens — the class must win at every viewport. */
  display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 14px;
  background: var(--gg-navy);
  border-bottom: 1px solid var(--gg-navy-border);
  color: #fff; padding: 14px 26px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.gg-logo {
  position: relative; width: 52px; height: 52px; flex-shrink: 0;
  /* margin-left:0 overrides theme.css's `header a { margin-left: 15px }`, which
     would otherwise indent the logo on base.html pages only. */
  margin-left: 0;
  border-radius: 50%; border: 2px solid var(--gg-gold);
  background: var(--gg-navy-deep); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.gg-logo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gg-header-text { min-width: 0; }
.gg-header-text h1 {
  margin: 0; font-family: Georgia, 'Times New Roman', serif;
  /* Viewport-aware clamp + single-line ellipsis: at large phone font sizes a
     long title (e.g. "📊 My stats" or a long club name) used to wrap to two
     lines. nowrap + ellipsis keeps it one line (long titles truncate); relies
     on .gg-header-text's min-width:0 so the flex child can actually shrink. */
  font-size: clamp(1.1rem, 5vw, 1.6rem); letter-spacing: 1px; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gg-header nav { margin-top: 4px; font-size: 0.95rem; }
.gg-header nav a { color: var(--gg-gold); text-decoration: none; }
.gg-header nav a:hover { color: #fff; }
/* Identity-only header mode (gg_header_mode 'minimal', e.g. my_stats_entry): a
   plain "You: <name>" line in place of the nav. */
.gg-you { margin-top: 4px; font-size: 0.95rem; color: var(--gg-gold); }
/* Optional right-aligned link in minimal mode (e.g. my_stats_entry's "Back to
   round"). margin-left:auto pushes it to the far right of the flex header and
   also beats theme.css's `header a { margin-left: 15px }`. */
.gg-right {
  margin-left: auto; align-self: center; white-space: nowrap;
  color: var(--gg-gold); text-decoration: none; font-weight: 600; font-size: 0.95rem;
}
.gg-right:hover { color: #fff; }
