/* ==========================================================================
   CROWN Scout Girls — Player Profile layout
   Ported from design_handoff_w25_recruiting_platform/screens/CROWN Player Profile.html.
   All rules scoped under .csg-player so they never leak into other templates.

   Data constraints (README, enforced here + in single-crw-player-crown.php):
   - No dates rendered on Recent News, Video Library, ScoutReport, or the
     hero "Updated N" line. Related CSS classes for date stamps were
     intentionally not carried across from the design source.
   - Performances list keeps game descriptions ("vs Crestwood · OSBA QF")
     but drops the leading date column.
   ========================================================================== */

.csg-player { background: #fff; color: #2A2A2A; }
.csg-player .csg-wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* --- Hero -------------------------------------------------------------- */
.csg-player .hero {
  background: linear-gradient(180deg, #FAFAFA 0%, #fff 100%);
  border-bottom: 1px solid #E4E4E4;
}
.csg-player .hero-in {
  display: grid; grid-template-columns: 280px 1fr auto; gap: 36px;
  padding: 40px 0 34px; align-items: flex-end;
}
.csg-player .shot {
  width: 280px; height: 344px; position: relative;
  overflow: hidden; border-radius: var(--radius-sm);
  box-shadow: 0 0 0 1px #E4E4E4; background: #F2F2F2;
}
.csg-player .shot::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 4px; background: var(--csg-red);
}
.csg-player .shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.csg-player .shot .imgslot__ph { object-fit: contain; padding: 18%; opacity: 0.55; }

.csg-player .overline {
  font-family: var(--font-ui); font-weight: 700; font-size: 12px;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--csg-red);
  margin-bottom: 10px;
}
.csg-player .pname {
  font-family: var(--font-display); font-weight: 700; font-size: 76px;
  line-height: 0.92; letter-spacing: 0.01em; text-transform: uppercase;
  color: #111; margin: 0;
}
.csg-player .pmeta { font-family: var(--font-body); font-size: 19px; color: #333; margin-top: 12px; }
.csg-player .rule { width: 60px; height: 3px; background: var(--csg-red); margin: 18px 0; }

.csg-player .chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.csg-player .chip {
  font-family: var(--font-ui); font-weight: 600; font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 6px 11px; border: 1px solid #DADADA; color: #444;
  border-radius: var(--radius-sm); background: #F6F6F6; display: inline-block;
}
.csg-player .chip--red { background: var(--csg-red); border-color: var(--csg-red); color: #fff; }
.csg-player .stars {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 5px 10px; border: 1px solid #DADADA;
  border-radius: 999px; font-size: 12px; color: #999;
}
.csg-player .stars .f { color: var(--csg-red); }

.csg-player .actions { display: flex; flex-direction: column; gap: 10px; width: 230px; }

/* --- Tabs (in-page anchor jump) ---------------------------------------- */
/* Sticky offsets — bound to the actual CROWN nav height so the tab bar
   pins immediately below the nav with no bleed-through gap. Nav heights
   were measured at 121 / 105 / 89 px at desktop / tablet / mobile
   breakpoints (see crown-chrome.css .csg-nav__in and its responsive
   overrides). Also stamped on anchored sections as scroll-margin-top so
   tab clicks land under the sticky stack, not behind it. */
.csg-player {
  --csg-nav-h: 121px;
  --csg-tab-h: 52px;
}
.csg-player #overview,
.csg-player #report,
.csg-player #video,
.csg-player #news,
.csg-player #recruiting {
  scroll-margin-top: calc(var(--csg-nav-h) + var(--csg-tab-h));
}
.csg-player .tabs {
  border-bottom: 1px solid #E4E4E4; background: #fff;
  /* -1px pulls the tab bar over the nav's 1px border-bottom so sub-pixel
     rounding can't leave a hairline gap where scrolled content shows
     through. Tab bar has its own border-bottom for visual separation. */
  position: sticky; top: calc(var(--csg-nav-h) - 1px); z-index: 30;
  /* Safari sticky fix: give the sticky bar its own stacking context so
     scroll content below can't render through it. Chrome/Firefox don't
     need this — Safari's compositor sometimes drops the background
     during scroll without an isolated context. */
  isolation: isolate;
}
.csg-player .tabs-in {
  display: flex; gap: 4px; overflow-x: auto;
  background: #fff; /* opaque flex row so no gap ever lets content through */
}
.csg-player .tab {
  font-family: var(--font-display); font-weight: 600; font-size: 13px;
  letter-spacing: 0.1em; text-transform: uppercase; color: #777;
  padding: 16px 18px; cursor: pointer;
  border-bottom: 3px solid transparent;
  display: inline-flex; align-items: center; gap: 7px;
  text-decoration: none; white-space: nowrap;
}
.csg-player .tab:hover { color: #000; }
.csg-player .tab.on { color: #000; border-bottom-color: var(--csg-red); }
.csg-player .tab .lk { font-size: 11px; color: var(--csg-red); display: inline-flex; }

/* --- Body grid --------------------------------------------------------- */
.csg-player .pbody {
  display: grid; grid-template-columns: 1fr 348px; gap: 40px;
  padding: 36px 0 80px;
}
.csg-player .sec { margin-bottom: 34px; }
.csg-player .sec-hd {
  display: flex; align-items: center; gap: 12px;
  border-bottom: 2px solid #E4E4E4; padding-bottom: 10px; margin-bottom: 18px;
}
.csg-player .sec-hd .dot { width: 9px; height: 9px; background: var(--csg-red); flex: none; }
.csg-player .sec-hd h3 {
  font-family: var(--font-display); font-weight: 700; font-size: 16px;
  letter-spacing: 0.12em; text-transform: uppercase; color: #111; margin: 0;
}
.csg-player .sec-hd .r { margin-left: auto; font-family: var(--font-ui); font-size: 12px; color: #4A4A4A; letter-spacing: 0.04em; }
.csg-player .sec-hd .r a { color: var(--csg-red); text-decoration: none; }

.csg-player .lede { font-family: var(--font-body); font-size: 17px; line-height: 1.75; color: #111; }
.csg-player .lede p { color: #111; margin: 0 0 14px; }
/* Skills Bio when sourced from Analysis csg_eval_overview — bullet list */
.csg-player .lede--bullets ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.csg-player .lede--bullets > ul > li { position: relative; padding-left: 18px; color: #111; }
.csg-player .lede--bullets > ul > li::before {
  content: ""; position: absolute; left: 0; top: 12px;
  width: 6px; height: 6px; background: var(--csg-red);
}
.csg-player .lede--bullets ul ul {
  list-style: disc; margin: 6px 0 4px 22px; padding: 0;
  font-size: 15px; color: #3A3A3A; gap: 4px;
}
.csg-player .lede--bullets ul ul li { padding-left: 0; }
.csg-player .lede--bullets ul ul li::before { content: none; }

/* --- Performances ------------------------------------------------------ */
.csg-player .perf { border: 1px solid #E4E4E4; border-radius: var(--radius-md); overflow: hidden; }
.csg-player .perf-row {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 18px; border-bottom: 1px solid #E9E9E9;
}
.csg-player .perf-row:last-child { border-bottom: 0; }
.csg-player .perf-row .g { font-family: var(--font-body); font-size: 16px; color: #111; flex: 1; min-width: 0; }
.csg-player .perf-row .st { display: flex; gap: 7px; flex-wrap: wrap; }
.csg-player .sstat {
  font-family: var(--font-ui); font-size: 11px; letter-spacing: 0.04em; color: #3A3A3A;
  border: 1px solid #DADADA; border-radius: var(--radius-sm);
  padding: 4px 9px; display: inline-flex; gap: 5px; align-items: baseline;
}
.csg-player .sstat b { color: var(--csg-red); font-weight: 700; font-size: 13px; }
.csg-player .note { font-family: var(--font-ui); font-size: 12px; color: var(--csg-grey-dark); font-style: italic; margin-top: 10px; }

/* --- Video ------------------------------------------------------------- */
.csg-player .films { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.csg-player .vid {
  position: relative; border: 1px solid #E4E4E4; border-radius: var(--radius-md);
  overflow: hidden; aspect-ratio: 16 / 10; background: #F2F2F2;
}
.csg-player .vid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.csg-player .vid .imgslot__ph { object-fit: contain; padding: 20%; opacity: 0.55; }
.csg-player .vid .play { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.csg-player .vid .play span {
  width: 54px; height: 54px; border-radius: 50%;
  background: rgba(0,0,0,.55); border: 2px solid #fff;
  display: grid; place-items: center;
}
.csg-player .vid .play span::after {
  content: ""; border-left: 16px solid #fff;
  border-top: 10px solid transparent; border-bottom: 10px solid transparent;
  margin-left: 4px;
}
.csg-player .vid .badge {
  position: absolute; left: 10px; bottom: 10px;
  font-family: var(--font-ui); font-weight: 600; font-size: 10px;
  letter-spacing: 0.08em; text-transform: uppercase;
  background: rgba(0,0,0,.7); color: #fff;
  padding: 4px 8px; border-radius: var(--radius-sm);
}
.csg-player .vid .badge.free { background: var(--csg-red); }
.csg-player .vcap {
  font-family: var(--font-ui); font-weight: 600; font-size: 11px;
  letter-spacing: 0.06em; text-transform: uppercase; color: #333; margin-top: 8px;
}
.csg-player .vcap small {
  display: block; font-weight: 400; letter-spacing: 0;
  text-transform: none; color: #555; margin-top: 2px;
}

/* --- Lock veil --------------------------------------------------------- */
.csg-player .veil {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(-45deg,
    rgba(255,255,255,.94) 0 9px, rgba(214,214,214,.94) 9px 19px);
  backdrop-filter: blur(2px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 9px; text-align: center; padding: 14px;
}
.csg-player .veil .lk {
  width: 38px; height: 38px; border: 2px solid var(--csg-red);
  border-radius: 50%; display: grid; place-items: center; background: #fff;
}
.csg-player .veil .lk svg { width: 17px; height: 17px; fill: var(--csg-red); }
.csg-player .veil .t {
  font-family: var(--font-ui); font-weight: 700; font-size: 12px;
  letter-spacing: 0.06em; color: #1A1A1A; text-shadow: 0 1px 2px rgba(255,255,255,.6);
}

/* --- Scouting report --------------------------------------------------- */
.csg-player .report {
  border: 1px solid #E4E4E4; border-radius: var(--radius-md);
  background: #FAFAFA; padding: 24px; position: relative;
}
.csg-player .rcols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.csg-player .rcol h4 {
  font-family: var(--font-ui); font-weight: 700; font-size: 12px;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--csg-red); margin: 0 0 10px;
}
.csg-player .rcol ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; }
.csg-player .rcol li {
  font-family: var(--font-body); font-size: 15px; line-height: 1.5; color: #3A3A3A;
  padding-left: 16px; position: relative;
}
.csg-player .rcol li::before {
  content: ""; position: absolute; left: 0; top: 9px;
  width: 6px; height: 6px; background: var(--csg-red);
}
/* Sub-bullets inside report columns (Analysis-sourced) */
.csg-player .rcol ul.subs {
  list-style: disc; margin: 6px 0 0 4px; padding-left: 18px;
  gap: 4px; font-size: 14px; color: #555;
}
.csg-player .rcol ul.subs li { padding-left: 0; }
.csg-player .rcol ul.subs li::before { content: none; }
.csg-player .grades {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px;
  margin-top: 24px; padding-top: 22px; border-top: 1px solid #E4E4E4;
}
.csg-player .grade {
  text-align: center; border: 1px solid #E4E4E4;
  border-radius: var(--radius-md); padding: 14px 8px; background: #fff;
}
.csg-player .grade .v { font-family: var(--font-display); font-weight: 700; font-size: 30px; color: var(--csg-red); line-height: 1; }
.csg-player .grade .k {
  font-family: var(--font-ui); font-weight: 600; font-size: 10px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--csg-grey); margin-top: 6px;
}
.csg-player .report .csg-blur { filter: blur(6px); opacity: 0.5; pointer-events: none; user-select: none; }

/* --- Connected news ---------------------------------------------------- */
.csg-player .cnews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.csg-player .cnews .card {
  border: 1px solid #E4E4E4; border-radius: var(--radius-md);
  overflow: hidden; background: #fff; display: block;
  text-decoration: none; color: inherit;
}
.csg-player .cnews .card .im {
  aspect-ratio: 16 / 10; position: relative; background: #F2F2F2;
}
.csg-player .cnews .card .im img { width: 100%; height: 100%; object-fit: cover; display: block; }
.csg-player .cnews .card .im .imgslot__ph { object-fit: contain; padding: 20%; opacity: 0.55; }
.csg-player .cnews .card .bd { padding: 14px; }
.csg-player .cnews .card h4 {
  font-family: var(--font-display); font-weight: 700; font-size: 17px;
  line-height: 1.15; text-transform: uppercase; color: #111; margin: 10px 0 6px;
}
.csg-player .cnews .card p {
  font-family: var(--font-body); font-size: 13px; color: #3A3A3A;
  margin: 0 0 10px; line-height: 1.5;
}

/* --- Sidebar ----------------------------------------------------------- */
.csg-player .side { display: flex; flex-direction: column; gap: 22px; }
.csg-player .panel {
  border: 1px solid #E4E4E4; border-radius: var(--radius-md);
  background: #FAFAFA; padding: 18px;
}
.csg-player .panel.acc { border-color: var(--csg-red); }
.csg-player .panel .ph {
  display: flex; align-items: center; gap: 10px;
  border-bottom: 2px solid var(--csg-red); padding-bottom: 9px; margin-bottom: 14px;
}
.csg-player .panel .ph h3 {
  font-family: var(--font-display); font-weight: 700; font-size: 14px;
  letter-spacing: 0.1em; text-transform: uppercase; color: #111; margin: 0;
}
.csg-player .panel .ph .r { margin-left: auto; font-family: var(--font-ui); font-size: 11px; color: var(--csg-grey-dark); }

.csg-player .kv {
  display: flex; justify-content: space-between; gap: 14px;
  padding: 9px 0; border-bottom: 1px solid #E9E9E9;
  font-family: var(--font-ui); font-size: 13px;
}
.csg-player .kv:last-child { border-bottom: 0; }
.csg-player .kv .k { color: #4A4A4A; letter-spacing: 0.03em; }
.csg-player .kv .v { color: #111; text-align: right; font-weight: 500; }

.csg-player .contact .cn { font-family: var(--font-ui); font-weight: 600; font-size: 14px; color: #111; }
.csg-player .contact .ci { font-family: var(--font-ui); font-size: 13px; color: #3A3A3A; margin-top: 2px; }
.csg-player .contact .grp { padding: 11px 0; border-bottom: 1px solid #E9E9E9; }
.csg-player .contact .grp:last-of-type { border-bottom: 0; }
.csg-player .contact .role {
  font-family: var(--font-ui); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--csg-red); margin-bottom: 5px;
}
.csg-player .contact.csg-blur { filter: blur(6px); opacity: 0.45; pointer-events: none; }
.csg-player .contact-wrap { position: relative; min-height: 150px; }

.csg-player .newsrow { display: flex; gap: 11px; padding: 11px 0; border-bottom: 1px solid #E9E9E9; align-items: stretch; text-decoration: none; color: inherit; }
.csg-player .newsrow:last-child { border-bottom: 0; }
.csg-player .newsrow .im {
  width: 74px; flex: none; align-self: stretch; position: relative;
  border-radius: var(--radius-sm); overflow: hidden; background: #F2F2F2;
}
.csg-player .newsrow .im img { width: 100%; height: 100%; object-fit: cover; display: block; }
.csg-player .newsrow .tx { display: flex; flex-direction: column; justify-content: flex-start; }
.csg-player .newsrow .tx h5 {
  font-family: var(--font-display); font-weight: 600; font-size: 14px;
  line-height: 1.2; text-transform: uppercase; color: #111; margin: 5px 0 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.csg-player .spmeta { font-family: var(--font-ui); font-size: 11px; color: #4A4A4A; margin-top: 3px; }
.csg-player .newsrow .tag { font-family: var(--font-ui); font-weight: 700; font-size: 9px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--csg-red); }

.csg-player .upsell {
  border: 1px solid var(--csg-red); border-radius: var(--radius-md);
  background: linear-gradient(160deg, rgba(237,0,0,.08), rgba(255,255,255,0));
  padding: 20px;
}
.csg-player .upsell h3 { font-family: var(--font-display); font-weight: 700; font-size: 20px; text-transform: uppercase; color: #111; margin: 0 0 8px; }
.csg-player .upsell p  { font-family: var(--font-body); font-size: 14px; color: #444; margin: 0 0 16px; line-height: 1.55; }

/* --- Empty states ------------------------------------------------------ */
.csg-player .empty {
  border: 1px dashed #D8D8D8; border-radius: var(--radius-md);
  padding: 26px; text-align: center; font-family: var(--font-ui);
  font-size: 13px; color: #5A5A5A;
}
.csg-player .empty b {
  display: block; font-family: var(--font-display); font-weight: 600; font-size: 14px;
  letter-spacing: 0.08em; text-transform: uppercase; color: #555; margin-bottom: 5px;
}

/* --- Responsive -------------------------------------------------------- */
@media (max-width: 1080px) {
  .csg-player { --csg-nav-h: 105px; }
  .csg-player .pbody { grid-template-columns: 1fr; }
  .csg-player .hero-in { grid-template-columns: 1fr; gap: 22px; }
  .csg-player .shot { width: 200px; height: 246px; }
  .csg-player .actions { flex-direction: row; flex-wrap: wrap; width: auto; }
  .csg-player .pname { font-size: 56px; }
}
@media (max-width: 720px) {
  .csg-player { --csg-nav-h: 89px; }
  .csg-player .csg-wrap { padding: 0 16px; }
  .csg-player .tab { padding: 14px 12px; font-size: 12px; }
  .csg-player .films,
  .csg-player .cnews,
  .csg-player .rcols { grid-template-columns: 1fr; }
  .csg-player .grades { grid-template-columns: repeat(3, 1fr); }
  .csg-player .pname { font-size: 44px; }
}
