/* admin-shared.css — common styles for /basketball/admin/* pages.
   Loaded after /include/theme.css and /basketball/basketball.css, so the
   font stack, color tokens, and scrollbar-gutter all come from there.
   This file only adds admin-specific overrides. */

.callback-msg { padding: 2rem; text-align: center; }

/* Every <summary> in the admin app is a clickable disclosure trigger.
   Without this, browsers may show the text I-beam on hover instead of
   the pointer cursor. Applies to all <details>/<summary> pairs across
   admin pages (e.g., "Add new session", "Show full URL"). */
details > summary { cursor: pointer; }

/* Dark-theme overrides for the few elements that aren't already styled
   by theme.css's token-driven rules (form fields, monospace token boxes,
   table borders, details summary). */
:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea {
  background: var(--surface-2, #2a313c);
  color: var(--text);
  border-color: var(--border);
}
:root[data-theme="dark"] table th,
:root[data-theme="dark"] table td { border-color: var(--border); }
:root[data-theme="dark"] .token-box { background: var(--bg); color: var(--text); }
:root[data-theme="dark"] details > summary { color: var(--text); }

/* Anchor-button text must always render white. theme.css applies a colored
   text rule to `.card a` (and a different one for dark theme), which would
   otherwise make `<a class="btn">` text invisible against the button's blue
   background. Force white in both themes for any anchor-as-button. */
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 keeps the contrast-passing #005c80 text in light
   mode, and the brighter dark-mode --primary in dark mode. */
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; }

/* ===== Buttons (shared across all /basketball/admin/* pages) =====
   Previously every page (admin-page.css, run-page.css, session-page.css,
   master-page.css) repeated identical .btn / .btn-secondary / .btn-danger
   declarations with the bright #0096cc primary — which fails WCAG AA
   contrast on outline buttons. Centralizing here so a future color tweak
   only needs to change one place, and all admin pages match the public
   /basketball/ page's button styling. */
.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  /* Solid button uses the darker shade so white text passes 4.5:1 (#005c80
     gives ~7:1; #0096cc was only 3.36:1). */
  background: #005c80;
  color: white;
  border-radius: 6px;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  font-size: 0.95rem;
  margin: 0.25rem;
  font-family: inherit;
  /* Force centered text so <a class="btn"> and <button class="btn"> render
     identically. Browsers default <button> to text-align:center but <a>
     inherits from its parent (often left), which made the Master Dashboard
     anchor render left-aligned and the Create button render centered. */
  text-align: center;
}
.btn:hover { background: #004563; }
/* Dark-theme solid button: keep #005c80 background + white text. The
   light-blue dark-mode --primary (#4dbff0) is too light against white
   text (only 2:1). #005c80 still gives ~7:1 against white and stays in
   the brand-blue family. */
[data-theme="dark"] .btn { background: #005c80; color: #fff; }
[data-theme="dark"] .btn:hover { background: #007099; }

.btn-secondary {
  background: transparent;
  border: 1px solid #005c80;
  color: #005c80;
}
.btn-secondary:hover { background: rgba(0, 92, 128, 0.06); }
/* .btn-secondary is also a .btn, so the `[data-theme="dark"] .btn`
   rule above sets its background to #005c80. Re-assert transparent so
   the outline style stays an outline. */
[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); }

.btn-danger { background: #b91c2c; color: #fff; border: 0; }
.btn-danger:hover { background: #921622; }

/* Tight variant of .token-box used inline next to a Copy button. */
.token-box-tight { margin-bottom: 0.25rem; }

/* History panel — date headings inside the per-week <details>. */
.history-day { margin: 0.75rem 0 0.25rem; }

/* Smaller-than-default muted text used as a tertiary-tip beneath
   the main metadata line on the session page. */
.muted-small { font-size: 0.82rem; }

/* "← Admin home" back link at the top of subpages. Uses #005c80 for
   contrast (~7:1 vs the body bg) instead of the bright --primary
   (#0096cc, only 3.14:1). */
.back-link {
  color: #005c80;
  text-decoration: none;
  font-size: 0.9rem;
  display: inline-block;
  margin-bottom: 0.5rem;
}
.back-link:hover { text-decoration: underline; }
[data-theme="dark"] .back-link { color: #89d1ef; }
