/* basketball.css — shared layout for the basketball signups app.
   Loaded after /include/theme.css, so we inherit the same color tokens,
   font stack, scrollbar-gutter, and font-smoothing as the index page.
   Only the nav and a few app-specific layout primitives are overridden. */

/* Legacy alias: this app pre-dates the unified token names in theme.css.
   --muted was the old name; --text-muted is the canonical one. Map the
   old name to the new one so existing rules continue to work in both
   themes without per-file edits. */
:root { --muted: var(--text-muted); }

* { box-sizing: border-box; }
.wrap { max-width: 800px; margin: 0 auto; padding: 1rem; }
h1 { margin: 0.5rem 0 0.75rem; font-size: 1.6rem; letter-spacing: -0.01em; }
p { line-height: 1.5; }

/* Run/session cards — match theme.css `.card`: same radius, same shadow */
.runs { display: grid; gap: 1.25rem; }
.run-card {
  background: var(--surface, #fff);
  padding: 1.25rem;
  border-radius: var(--radius, 12px);
  border: 1px solid var(--border, #e4e7ec);
  box-shadow: var(--shadow, 0 1px 3px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.06));
  transition: transform .15s ease, box-shadow .15s ease;
}
.run-card:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(15, 23, 42, 0.08), 0 16px 32px rgba(15, 23, 42, 0.1); }
.run-card a {
  /* #005c80 instead of var(--primary) for WCAG AA contrast: ~7:1 against
     white where #0096cc was only 3.36:1 (failed lighthouse a11y).
     Same color theme.css uses for body links in light mode. */
  color: #005c80;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  min-height: 44px;
}
[data-theme="dark"] .run-card a { color: #89d1ef; }
.run-card a:hover { text-decoration: underline; }

/* Actions row */
.actions { margin-top: 1.5rem; text-align: center; }
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  /* Solid button uses #005c80 (~7:1 vs white) for WCAG AA. Was
     var(--primary, #0096cc) which gave 3.36:1 and failed Lighthouse. */
  background: #005c80;
  color: white;
  border-radius: 8px;
  text-decoration: none;
  margin: 0.25rem;
  min-height: 44px;
  font-weight: 500;
  /* Center-align text so <a class="btn"> and <button class="btn"> render
     identically. <button>'s default is center, but <a> inherits from
     parent (left), so without this anchors look left-aligned. */
  text-align: center;
}
.btn:hover { background: #004563; }
/* Dark-theme solid button: keep the same #005c80 white-on-blue contrast
   that light-mode uses. The dark-mode --primary (#4dbff0) is too light
   for white text (~2:1). */
[data-theme="dark"] .btn { background: #005c80; color: #fff; }
[data-theme="dark"] .btn:hover { background: #007099; }
.btn-secondary {
  background: transparent;
  /* #005c80 text + border for AA contrast (~7:1 vs white surface). */
  border: 1px solid #005c80;
  color: #005c80;
}
.btn-secondary:hover { background: rgba(0, 92, 128, 0.06); }
[data-theme="dark"] .btn-secondary {
  background: transparent;
  border-color: #89d1ef;
  color: #89d1ef;
}
[data-theme="dark"] .btn-secondary:hover { background: rgba(137, 209, 239, 0.08); }
/* theme.css forces a primary-colored text on `.card a` and a different shade
   on dark-theme `.card a`. That makes `<a class="btn">` text invisible inside
   any card (the button's own white text rule is less specific). Force white
   for solid anchor buttons; primary color for outline ones. */
a.btn, .card a.btn,
[data-theme="dark"] a.btn, [data-theme="dark"] .card a.btn { color: #fff !important; }
a.btn:hover, .card a.btn:hover,
[data-theme="dark"] a.btn:hover, [data-theme="dark"] .card a.btn:hover { color: #fff !important; text-decoration: none; }
/* Outline anchor-button text: use #005c80 (contrast-passing) in light
   mode and the brighter dark-mode primary in dark mode. !important is
   needed because theme.css's `.card a` rule is more specific. */
a.btn-secondary, .card a.btn-secondary { color: #005c80 !important; }
[data-theme="dark"] a.btn-secondary,
[data-theme="dark"] .card a.btn-secondary { color: #89d1ef !important; }

.empty { color: var(--muted, #596575); font-style: italic; }

@media (min-width: 640px) {
  .wrap { padding: 2rem 1rem; }
  h1 { font-size: 2rem; }
  .run-card { padding: 1.25rem; }
}

/* Basketball app nav. Visually mirrors the main site's nav.site-nav
   (white surface, dark text, sticky, light bottom shadow) so visitors
   feel like they're inside one cohesive site, but it's a self-contained
   nav: the brand link points to /basketball/ and there's no link back
   to the main portfolio (the basketball app is its own product surface).

   The first <a> in the nav is treated as the brand. Subsequent <a>s are
   muted nav links. The nav has an explicit height so layout doesn't
   shift when the theme-toggle glyph swaps between ☾ and ☀ — those two
   characters render at slightly different intrinsic heights. */
#basketball-nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border, #e4e7ec);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  position: sticky; top: 0; z-index: 1000;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0 1.25rem;
  height: 3.25rem;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  color: var(--text);
}
/* First <a> = brand. Subsequent <a>s are nav links. */
#basketball-nav a {
  text-decoration: none;
  line-height: 1;
}
#basketball-nav a:first-of-type {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
#basketball-nav a:first-of-type:hover { color: var(--primary, #0096cc); }
#basketball-nav a:not(:first-of-type) {
  color: var(--text-muted, #4a5463);
  font-size: .95rem;
  font-weight: 500;
}
#basketball-nav a:not(:first-of-type):hover { color: var(--primary, #0096cc); }
#bball-theme-btn {
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--border, #e4e7ec);
  color: var(--text-muted, #4a5463);
  border-radius: 999px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: color .12s, border-color .12s;
}
#bball-theme-btn:hover { color: var(--primary, #0096cc); border-color: var(--primary, #0096cc); }

/* App-specific surfaces that aren't covered by theme.css's .card rules.
   Color tokens (--bg, --surface, --text, --border, --primary, etc.) come
   from theme.css and switch automatically when [data-theme="dark"] is set
   on :root, so there's no need to redefine them here. */
:root[data-theme="dark"] .session,
:root[data-theme="dark"] .session-choice {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text);
}
:root[data-theme="dark"] .cap-bar { background: var(--surface-2, #2a313c); }
:root[data-theme="dark"] .session-choice:hover { background: var(--surface-2, #24323d); }
:root[data-theme="dark"] .session-choice.full { color: var(--text-muted, #9aa5b1); }
