/* cards.css
   Dashboard card internals: rows, schedule, to-dos, season, roster.

   Part of the dashboard stylesheet, split by concern. index.html links these
   in source order; keep that order, the cascade depends on it. */

/* ── Row primitive ──────────────────────────────────────────────────── */
.row {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 10px 10px; border-radius: var(--r-md); position: relative;
  transition: background 0.13s;
}
.row:hover { background: var(--surface-2); }
.row-actions { display: flex; gap: 1px; opacity: 0; transition: opacity 0.14s; flex-shrink: 0; }
.row:hover .row-actions { opacity: 1; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-size: 13.5px; font-weight: 550; display: flex; align-items: center; gap: 6px; }
.row-sub { font-size: 12px; color: var(--label-2); margin-top: 2px; }

/* Per-player notes — a quiet count pill next to the name (only once notes
   exist) plus a row-actions icon-btn (see .icon-btn) to open or start the
   thread. Same dated/timestamped `cnote` popover as every other notes list
   on the site, just scoped to one player. */
.row-note-dot {
  display: inline-flex; align-items: center; gap: 3px; flex-shrink: 0;
  border: none; cursor: pointer; background: var(--accent-light); color: var(--accent);
  border-radius: var(--r-full); padding: 1px 6px 1px 5px; font-size: 10.5px; font-weight: 750;
  line-height: 1.5; font-variant-numeric: tabular-nums; transition: background 0.14s;
}
.row-note-dot svg { width: 10px; height: 10px; }
.row-note-dot:hover { background: var(--surface-2); }

/* ── Schedule ───────────────────────────────────────────────────────── */
.day-nav { display: flex; align-items: center; gap: 6px; }
.day-label { font-size: 13px; font-weight: 600; min-width: 118px; text-align: center; }
.day-today-pill {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--accent); background: var(--accent-light); padding: 1px 6px; border-radius: var(--r-full); margin-left: 6px;
}
.event { padding-left: 12px; }
.event-time { font-size: 12px; font-weight: 650; color: var(--label); font-variant-numeric: tabular-nums; min-width: 66px; flex-shrink: 0; padding-top: 1px; }
.event-time .end { display: block; font-size: 11px; color: var(--label-3); font-weight: 500; }
.event-bar { width: 3px; border-radius: 3px; align-self: stretch; flex-shrink: 0; }

/* ── Google Calendar sync (daily Schedule widget) — see GCAL block in JS ── */
.gcal-head-btn { position: relative; }
.gcal-head-btn svg { width: 17px; height: 17px; }
.gcal-head-btn::after {
  content: ''; position: absolute; top: 4px; right: 4px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--label-3); border: 1.5px solid var(--surface);
}
.gcal-head-btn.is-on::after { background: var(--green); }
.event--gcal { cursor: pointer; }
.event--gcal .event-bar { background: #4285F4; }
.gcal-pill {
  display: inline-flex; align-items: center; gap: 4px; align-self: center;
  font-size: 10px; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase;
  color: #4285F4; background: rgba(66,133,244,0.12);
  padding: 2px 7px 2px 5px; border-radius: var(--r-full); white-space: nowrap; flex-shrink: 0;
}
.gcal-pill svg { width: 11px; height: 11px; }
.gcal-note {
  display: flex; align-items: center; gap: 8px; justify-content: center;
  padding: 12px 10px 6px; margin: 6px 6px 0;
  font-size: 12px; color: var(--label-2); text-align: center;
  border-top: 1px dashed var(--border);
}
.gcal-note .mini-spin {
  width: 13px; height: 13px; border-radius: 50%; flex-shrink: 0;
  border: 2px solid var(--border); border-top-color: #4285F4;
  animation: spin 0.7s linear infinite;
}
.gcal-note button { background: none; border: none; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; padding: 0; }
.gcal-note button:hover { text-decoration: underline; }
.gcal-head-btn.is-off { opacity: 0.45; }
.gcal-head-btn.is-off:hover { opacity: 1; }
/* GCAL manage modal */
.gcal-help { font-size: 13px; color: var(--label-2); line-height: 1.5; margin: 2px 0 12px; }
.gcal-steps { margin: 0 0 14px; padding-left: 18px; font-size: 12.5px; color: var(--label-2); line-height: 1.7; }
.gcal-steps code { background: var(--surface-2); border-radius: 4px; padding: 1px 5px; font-size: 11.5px; }
.gcal-modal-err { color: var(--red); font-size: 12.5px; font-weight: 600; min-height: 16px; margin-top: 8px; }

/* ── Todos ──────────────────────────────────────────────────────────── */
.todo-add { display: flex; gap: 8px; padding: 4px 8px 10px; }
.todo-add input {
  flex: 1; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--r-sm);
  background: var(--surface-2); color: var(--label); font-size: 13.5px; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.todo-add input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); background: var(--surface); }
.check {
  width: 19px; height: 19px; border-radius: 6px; border: 1.8px solid var(--border);
  flex-shrink: 0; cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: #fff; transition: background 0.14s, border-color 0.14s; margin-top: 1px;
}
.check:hover { border-color: var(--accent); }
.check.done { background: var(--green); border-color: var(--green); }
.check svg { width: 12px; height: 12px; opacity: 0; }
.check.done svg { opacity: 1; }
.todo-done .row-title { text-decoration: line-through; color: var(--label-3); }

/* ── Badges ─────────────────────────────────────────────────────────── */
.badge {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase;
  padding: 2px 8px; border-radius: var(--r-full); white-space: nowrap; flex-shrink: 0;
}
.b-red    { background: var(--red-light);    color: var(--red);   }
.b-amber  { background: var(--amber-light);  color: var(--amber); }
.b-green  { background: var(--green-light);  color: var(--green); }
.b-slate  { background: var(--slate-light);  color: var(--slate); }
.b-gold   { background: var(--gold-light);   color: var(--gold);  }

/* ── Season schedule ────────────────────────────────────────────────── */
.game { align-items: center; }
.game-date { text-align: center; min-width: 42px; flex-shrink: 0; }
.game-mon { font-size: 10.5px; font-weight: 700; text-transform: uppercase; color: var(--accent); letter-spacing: 0.03em; }
.game-day { font-size: 17px; font-weight: 750; line-height: 1; }
.game-opp { font-size: 14px; font-weight: 650; letter-spacing: -0.01em; line-height: 1.15; }
.game-loc { font-size: 12px; color: var(--label-2); margin-top: 2px; }
.game-logo { width: 28px; height: 28px; object-fit: contain; flex-shrink: 0; }
.game-result { font-size: 13px; font-weight: 750; font-variant-numeric: tabular-nums; }
.res-w { color: var(--green); }
.res-l { color: var(--red); }

/* Elegant "full schedule" trigger in the Season card head */
.season-all-btn, .full-btn {
  display: inline-flex; align-items: center; gap: 5px;
  height: 26px; padding: 0 11px 0 9px;
  font-size: 12px; font-weight: 600; letter-spacing: -0.01em;
  color: var(--label-2); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--r-full);
  cursor: pointer; white-space: nowrap;
  transition: color 0.15s, background 0.15s, border-color 0.15s, transform 0.1s;
}
.season-all-btn:hover, .full-btn:hover { color: var(--accent); background: var(--accent-light); border-color: transparent; }
.season-all-btn:active, .full-btn:active { transform: scale(0.96); }
.season-all-btn svg, .full-btn svg { width: 13px; height: 13px; }

/* Full-detail popovers (season schedule + the per-card "Full …" buttons) */
.schedule-modal, .detail-modal { max-width: 640px; }
.sched-body, .detail-body { padding-top: 8px; padding-bottom: 14px; }
.sched-body .game { cursor: pointer; }
.sched-body .game.past { opacity: 0.6; }
.sched-body .game.is-next { background: var(--accent-light); }
.sched-body .game.is-next:hover { background: var(--accent-light); }
.detail-body .row[data-edit-injury], .detail-body .row[data-edit-recruit],
.detail-body .row[data-edit-portal], .detail-body .row[data-edit-event] { cursor: pointer; }
/* Section label between groups inside a detail popover (e.g. Commits / Targets) */
.detail-section { font-size: 11px; font-weight: 650; color: var(--label-3); text-transform: uppercase; letter-spacing: 0.05em; padding: 14px 10px 4px; }
.detail-section:first-child { padding-top: 4px; }

/* ── Recruiting ─────────────────────────────────────────────────────── */
.tabs { display: inline-flex; background: var(--surface-2); border-radius: var(--r-sm); padding: 3px; gap: 2px; }
.tab { padding: 5px 12px; font-size: 12.5px; font-weight: 600; border: none; background: none; color: var(--label-2); border-radius: 6px; cursor: pointer; transition: all 0.14s; }
.tab.active { background: var(--surface); color: var(--label); box-shadow: var(--shadow-sm); }
.tab-count { font-size: 11px; opacity: 0.7; margin-left: 3px; }
.stars { color: var(--gold-bright); font-size: 12px; letter-spacing: -1px; }
.avatar-sm { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; background: var(--accent-light); color: var(--accent); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* ── Notes ──────────────────────────────────────────────────────────── */
/* Before any notes exist, show the "No notes yet" message above the compose box. */
.nt--compose-top.nt--empty .nt-list { order: -1; }
.save-hint { font-size: 11.5px; color: var(--label-3); font-weight: 500; display: inline-flex; align-items: center; gap: 5px; }
.save-hint.saved { color: var(--green); }
.save-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ── Roster Management ──────────────────────────────────────────────── */
.rm-hero { text-align: center; padding: 8px 0 14px; }
.rm-total { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.rm-total-lbl { font-size: 12px; color: var(--label-2); margin-top: 5px; font-weight: 500; }
.rm-years { display: flex; flex-direction: column; gap: 8px; padding: 0 10px; }
.rm-year { display: flex; align-items: center; gap: 10px; }
.rm-year-lbl { font-size: 12.5px; color: var(--label-2); width: 82px; flex-shrink: 0; }
.rm-year-bar { flex: 1; height: 7px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.rm-year-bar > div { height: 100%; background: var(--accent); border-radius: 4px; transition: width 0.3s; }
.rm-year-ct { font-size: 13px; font-weight: 650; width: 22px; text-align: right; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.rm-divider { height: 1px; background: var(--border-2); margin: 14px 10px; }
.rm-nil { padding: 0 10px 4px; }
.rm-nil-row { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; font-size: 13px; }
.rm-nil-row span { color: var(--label-2); }
.rm-nil-row strong { font-weight: 700; font-variant-numeric: tabular-nums; }
.rm-nil-row.muted strong { color: var(--label-2); font-weight: 600; }
.rm-bar { height: 8px; background: var(--surface-2); border-radius: 5px; overflow: hidden; margin: 7px 0 9px; }
.rm-bar-fill { height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--gold), var(--accent)); transition: width 0.3s; }
.rm-bar-fill.over { background: var(--red); }

/* ── Player Info ────────────────────────────────────────────────────────
   Search the roster, click a name, get that player's season (js/dashboard/
   player.js). The card is two fixed pieces — the head and the search field —
   over one scrolling list, so the field never scrolls out from under what
   the coach is typing. */
.pl-searchbar {
  display: flex; align-items: center; gap: 8px; flex-shrink: 0;
  margin: 11px 12px 2px; padding: 0 5px 0 11px; height: 36px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-full);
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.pl-searchbar:focus-within { background: var(--surface); border-color: var(--indigo); box-shadow: 0 0 0 3px var(--indigo-light); }
.pl-search-ic { display: flex; flex-shrink: 0; color: var(--label-3); transition: color 0.15s; }
.pl-searchbar:focus-within .pl-search-ic { color: var(--indigo); }
.pl-search-ic svg { width: 15px; height: 15px; }
.pl-search-input {
  flex: 1; min-width: 0; border: none; background: none; outline: none;
  font: inherit; font-size: 13.5px; font-weight: 500; color: var(--label);
}
.pl-search-input::placeholder { color: var(--label-3); font-weight: 450; }
.pl-search-clear {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 24px; height: 24px; border: none; border-radius: 50%;
  background: none; color: var(--label-3); cursor: pointer; transition: background 0.13s, color 0.13s;
}
.pl-search-clear:hover { background: var(--surface-2); color: var(--label); }
.pl-search-clear svg { width: 12px; height: 12px; }

.pl-results { padding-top: 4px; }
.pl-group { padding: 11px 10px 3px; }
.pl-group:first-child { padding-top: 2px; }
.pl-hit {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 7px 8px; border: none; border-radius: var(--r-md);
  background: none; font: inherit; color: inherit; cursor: pointer;
  transition: background 0.13s;
}
.pl-hit:hover, .pl-hit.is-active { background: var(--surface-2); }
.pl-hit.is-active { box-shadow: inset 0 0 0 1px var(--border); }
.pl-num {
  width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--indigo-light); color: var(--indigo);
  font-size: 12px; font-weight: 750; font-variant-numeric: tabular-nums;
}
.pl-hit-main { flex: 1; min-width: 0; }
.pl-hit-name { display: block; font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-hit-sub { display: block; font-size: 11.5px; color: var(--label-2); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-hit-chev { display: flex; flex-shrink: 0; color: var(--label-3); opacity: 0; transition: opacity 0.13s; }
.pl-hit-chev svg { width: 14px; height: 14px; }
.pl-hit:hover .pl-hit-chev, .pl-hit.is-active .pl-hit-chev { opacity: 1; }
.pl-mark { background: var(--gold-light); color: inherit; border-radius: 3px; padding: 0 1px; font-weight: 800; }
