/* analytics.css
   Portal probability, the meter, and the projected stat grid.

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

.an-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.an-head-main { flex: 1; min-width: 0; }
.an-title { font-size: 13.5px; font-weight: 680; letter-spacing: -0.01em; }
.an-sub { font-size: 12px; color: var(--label-2); margin-top: 2px; line-height: 1.45; }

/* Where a number came from. A model-written row says so — the whole point of the
   `source` field is that a coach can tell his own estimate from a projection. */
.an-source {
  display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0;
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em;
  color: var(--label-3); background: var(--surface-2);
  border: 1px solid var(--border-2); padding: 3px 9px; border-radius: var(--r-full);
}
.an-source svg { width: 12px; height: 12px; }
.an-source--model { color: var(--accent-deep); background: var(--accent-light); border-color: transparent; }
:root[data-theme="dark"] .an-source--model { color: var(--accent); }

/* ── Probability ────────────────────────────────────────────────────── */
.an-prob { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 18px; align-items: center; }

.meter { min-width: 0; }
.meter-val {
  font-size: 34px; font-weight: 800; letter-spacing: -0.03em; line-height: 1;
  font-variant-numeric: tabular-nums; color: var(--label);
}
.meter-pct { font-size: 18px; font-weight: 700; color: var(--label-3); margin-left: 1px; }
.meter-bar {
  height: 8px; background: var(--surface-2); border-radius: 5px;
  overflow: hidden; margin-top: 11px; border: 1px solid var(--border-2);
}
.meter-fill { height: 100%; border-radius: 5px; transition: width 0.3s cubic-bezier(0.16,1,0.3,1), background 0.3s; }
.meter-lbl { font-size: 11.5px; color: var(--label-2); margin-top: 6px; font-weight: 500; }

/* Three bands: unlikely, live, likely. An unset value is grey and shows an em
   dash — "nobody has estimated this" must never look like "we think he's
   staying". */
.meter--low   .meter-fill { background: var(--slate); }
.meter--mid   .meter-fill { background: var(--gold);  }
.meter--high  .meter-fill { background: linear-gradient(90deg, #ff8a80, var(--accent)); }
.meter--empty .meter-fill { background: transparent; }
.meter--empty .meter-val  { color: var(--label-3); }
.meter--low  .meter-val { color: var(--label); }
.meter--high .meter-val { color: var(--accent-deep); }
:root[data-theme="dark"] .meter--high .meter-val { color: var(--accent); }

.an-prob-edit { min-width: 0; }
.an-prob-row { display: flex; align-items: center; gap: 8px; }
.an-prob-row .field-input { flex: 1; min-width: 0; }
.an-pct-sign { font-size: 15px; font-weight: 700; color: var(--label-3); flex-shrink: 0; }

.an-sep { height: 1px; background: var(--border-2); margin: 20px 0 18px; }

/* ── Projected stats ────────────────────────────────────────────────── */
/* Built from the player's position (see STAT_SETS in panels/analytics.js), so a
   quarterback and a punter get different fields rather than one union of both. */
.an-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 10px; }
.an-stat { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.an-stat-lbl {
  font-size: 10.5px; font-weight: 650; color: var(--label-2);
  text-transform: uppercase; letter-spacing: 0.05em;
}
.an-stat-in {
  width: 100%; padding: 9px 11px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: var(--r-sm);
  font-size: 15px; font-weight: 650; color: var(--label);
  font-variant-numeric: tabular-nums; outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.an-stat-in:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); background: var(--surface); }
/* Spinners steal width from a field that is already narrow, and nobody nudges a
   projected yardage total one at a time. */
.an-stat-in::-webkit-outer-spin-button,
.an-stat-in::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.an-stat-in[type=number] { -moz-appearance: textfield; }

.an-foot { display: flex; justify-content: flex-end; margin-top: 14px; min-height: 16px; }
