/* player-detail.css
   The player hero, the grade picker, the grade history and the evaluation thread.

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

/* ── Hero ───────────────────────────────────────────────────────────── */
.phero {
  display: flex; align-items: center; gap: 18px; margin-bottom: 14px;
  background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--r-xl);
  padding: 22px 24px; box-shadow: var(--shadow-sm);
}
.phero-main { flex: 1; min-width: 0; }
.phero-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.phero-top h1 { font-size: 27px; font-weight: 790; letter-spacing: -0.03em; line-height: 1.05; }
.phero-num { font-size: 17px; font-weight: 700; color: var(--label-3); font-variant-numeric: tabular-nums; }
.phero-sub {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  margin-top: 7px; font-size: 13px; color: var(--label-2);
}
.phero-pos {
  font-size: 11px; font-weight: 750; letter-spacing: 0.03em;
  color: var(--accent-deep); background: var(--accent-light);
  padding: 2px 8px; border-radius: 6px;
}
:root[data-theme="dark"] .phero-pos { color: var(--accent); }
.phero-poslong { font-weight: 550; }
.phero-dot { color: var(--label-3); }
.phero-meta {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  margin-top: 4px; font-size: 12.5px; color: var(--label-3);
}
.phero-tail { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; flex-shrink: 0; }
.phero-badges { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.phero-moved {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em;
  color: var(--label-2); background: var(--surface-2);
  border: 1px solid var(--border-2); padding: 2px 9px; border-radius: var(--r-full);
}
.phero-moved svg { width: 12px; height: 12px; }

/* Row-level notes, above the panels — short context that isn't a full write-up. */
.pnotes {
  background: var(--surface-2); border: 1px solid var(--border-2);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-md); padding: 12px 15px; margin-bottom: 16px;
  font-size: 13px; color: var(--label-2); line-height: 1.55; white-space: pre-wrap;
}

/* ── Two-column layout ──────────────────────────────────────────────── */
/* Grading on the left, the written and numeric record on the right. The right
   column is wider: evaluations and projected stats need the room, the four grade
   buttons do not. */
.pgrid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; align-items: start; }
.pcol { min-width: 0; }

/* ── Grade picker ───────────────────────────────────────────────────── */
.grade-picker { display: flex; flex-direction: column; gap: 7px; }
.grade-opt {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 12px 14px; border-radius: var(--r-md); cursor: pointer;
  background: var(--surface-2); border: 1.5px solid transparent;
  font-size: 13.5px; font-weight: 620; color: var(--label); text-align: left;
  transition: background 0.14s, border-color 0.14s, transform 0.08s;
}
.grade-opt:hover { background: var(--bg-2); }
.grade-opt:active { transform: scale(0.99); }
.grade-opt span { flex: 1; }
.grade-opt:disabled { opacity: 0.55; pointer-events: none; }

/* The tier currently on the player, tinted to its own colour so the scale reads
   as a scale rather than four identical buttons. */
.grade-opt--green.is-current { background: var(--green-light); border-color: var(--green); }
.grade-opt--gold.is-current  { background: var(--gold-light);  border-color: var(--gold);  }
.grade-opt--slate.is-current { background: var(--slate-light); border-color: var(--slate); }
.grade-opt--red.is-current   { background: var(--red-light);   border-color: var(--red);   }

.grade-opt-check { display: inline-flex; flex-shrink: 0; }
.grade-opt-check svg { width: 15px; height: 15px; }
.grade-opt--green.is-current .grade-opt-check { color: var(--green); }
.grade-opt--gold.is-current  .grade-opt-check { color: var(--gold);  }
.grade-opt--slate.is-current .grade-opt-check { color: var(--slate); }
.grade-opt--red.is-current   .grade-opt-check { color: var(--red);   }

.grade-note-row { margin-top: 10px; }

/* ── Grade history ──────────────────────────────────────────────────── */
.hist { list-style: none; display: flex; flex-direction: column; }
.hist-item {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 11px 10px; border-radius: var(--r-md); position: relative;
  transition: background 0.13s;
}
.hist-item:hover { background: var(--surface-2); }
.hist-item + .hist-item { box-shadow: inset 0 1px 0 var(--border-2); }
/* The timeline rail, drawn between consecutive dots. */
.hist-item:not(:last-child)::before {
  content: ''; position: absolute; left: 15px; top: 27px; bottom: -3px;
  width: 1.5px; background: var(--border);
}
.hist-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; margin: 6px 0 0 3px; position: relative; z-index: 1; box-shadow: 0 0 0 3px var(--surface); }
.hist-item:hover .hist-dot { box-shadow: 0 0 0 3px var(--surface-2); }
.hist-main { flex: 1; min-width: 0; }
.hist-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.hist-now {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--accent-deep); background: var(--accent-light); padding: 1.5px 7px; border-radius: var(--r-full);
}
:root[data-theme="dark"] .hist-now { color: var(--accent); }
.hist-move { display: inline-flex; }
.hist-move svg { width: 14px; height: 14px; }
.hist-move--up   { color: var(--green); }
.hist-move--down { color: var(--red);   }
.hist-note { font-size: 12.5px; color: var(--label-2); line-height: 1.5; margin-top: 5px; white-space: pre-wrap; }
.hist-meta { font-size: 11.5px; color: var(--label-3); margin-top: 4px; }
.hist-sep { margin: 0 4px; }
.hist-del { opacity: 0; transition: opacity 0.14s; flex-shrink: 0; }
.hist-item:hover .hist-del { opacity: 1; }

/* ── Evaluations ────────────────────────────────────────────────────── */
.ev-compose {
  background: var(--surface-2); border: 1px solid var(--border-2);
  border-radius: var(--r-md); padding: 12px; margin-bottom: 14px;
}
.ev-input {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 11px 13px;
  font-size: 13.5px; line-height: 1.6; color: var(--label);
  outline: none; resize: none; overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
  white-space: pre-wrap; overflow-wrap: break-word; min-width: 0;
}
.ev-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.ev-compose-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.ev-hint { font-size: 11.5px; color: var(--label-3); }

.ev-list { list-style: none; display: flex; flex-direction: column; gap: 3px; }
.ev { padding: 12px 12px; border-radius: var(--r-md); transition: background 0.13s; }
.ev:hover { background: var(--surface-2); }
.ev + .ev { box-shadow: inset 0 1px 0 var(--border-2); }
.ev-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.ev-who { font-size: 12.5px; font-weight: 650; }
.ev-when { font-size: 11.5px; color: var(--label-3); flex: 1; }
.ev-actions { display: flex; gap: 1px; opacity: 0; transition: opacity 0.14s; flex-shrink: 0; }
.ev:hover .ev-actions { opacity: 1; }
.ev-body { font-size: 13.5px; line-height: 1.62; color: var(--label); white-space: pre-wrap; overflow-wrap: break-word; }
.ev-edit-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
