/* portal-media.css — Videos / Photos / Messages destinations for the guardian
   (/my-athletes/*) and athlete (/my-portal/*) portals. Ported from the Claude Design
   handoff (media-pages.css). Loads AFTER member-portal.css + guardian-portal.css and
   reuses their .mp-root token aliases (--panel / --rule / --accent / --danger …), so it
   tracks the app [data-theme] + per-club accent automatically.

   Differences from the handoff: the in-app bottom-sheet "source" preview and the mock's
   own phone/desktop tab chrome are dropped — the app shell supplies navigation, and each
   "From {event}" link is a real <a href="/events/{id}">. The handoff's .gpm-desktop reflow
   rules are re-expressed as @media (min-width:900px) so the app's wide shell gets the wide
   layout without a wrapper class. All selectors stay .gpm- prefixed and resolve tokens from
   the enclosing .mp-root, so loading globally is safe. */

/* ── Token scope ────────────────────────────────────────────────────
   .pm-root aliases the handoff's token names onto the app's design-tokens.css (same mapping
   member-portal.css uses for .mp-root) but WITHOUT the .mp-root panel chrome (border / overflow /
   base font), so a full page doesn't get wrapped in a border or clipped. Descendant .gpm-/.gp-tag
   rules resolve their tokens from here. */
.pm-root {
  --panel: var(--surface);
  --panel-2: var(--surface-raised);
  --panel-hi: var(--surface-raised);
  --rule: var(--hairline);
  --rule-hi: var(--hairline-strong);
  --text: var(--fg);
  --muted: var(--fg-muted);
  --dim: var(--fg-dim);
  --accent-ink: var(--accent-fg);
  --danger: var(--semantic-danger);
  color: var(--text);
}
.pm-root, .pm-root * { box-sizing: border-box; }

/* Home-dashboard media module (PortalMediaTiles). */
.ma-media { margin-top: 18px; }
.ma-media__title { margin-bottom: 10px; }

/* ── Page shell ─────────────────────────────────────────────────── */
.pm-host { display: block; }
.gpm-page { padding: 18px 2px 28px; display: flex; flex-direction: column; gap: 20px; }

.gpm-head { display: flex; flex-direction: column; gap: 13px; }
.gpm-eyebrow {
  font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--dim);
}
.gpm-title {
  margin: 0; font-family: 'Anton', sans-serif; font-size: 38px; line-height: 1.04;
  text-transform: uppercase; letter-spacing: 0.01em;
}
.gpm-title .alt { color: var(--accent-text); }
.gpm-sub { font-size: 14px; color: var(--muted); line-height: 1.4; text-wrap: pretty; }

/* ── Filter chips (child) ───────────────────────────────────────── */
.gpm-filters {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px;
  scrollbar-width: none;
}
.gpm-filters::-webkit-scrollbar { display: none; }
.gpm-fchip {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  font-family: 'JetBrains Mono', monospace; font-size: 10.5px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
  padding: 7px 11px; border: 1px solid var(--rule); background: var(--panel);
  cursor: pointer; white-space: nowrap; font-weight: 500;
}
.gpm-fchip:hover { border-color: var(--rule-hi); color: var(--text); }
.gpm-fchip.active { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.gpm-fchip .fdot {
  width: 13px; height: 13px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Anton', sans-serif; font-size: 7px;
  background: var(--accent); color: var(--accent-ink);
}
.gpm-fchip.active .fdot { background: var(--accent-ink); color: var(--accent); }
.gpm-fchip .fdot.prospect { background: var(--panel-hi); color: var(--text); box-shadow: inset 0 0 0 1px var(--rule-hi); }

/* ── Home hub tiles (used by the portal home media module too) ──── */
.gpm-hub-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.gpm-hub-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 7px;
  padding: 13px 12px 12px; border: 1px solid var(--rule); background: var(--panel);
  cursor: pointer; position: relative; text-align: left; font: inherit; color: var(--text);
  text-decoration: none;
}
.gpm-hub-tile:hover { border-color: var(--accent); }
.gpm-hub-tile .ic { color: var(--accent-text); display: flex; }
.gpm-hub-tile .ic .material-icons { font-size: 24px; }
.gpm-hub-tile .lab {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 600; font-size: 14px;
  letter-spacing: 0.02em; text-transform: uppercase;
}
.gpm-hub-tile .n { font-family: 'Anton', sans-serif; font-size: 24px; line-height: 0.85; }
.gpm-hub-tile .badge {
  position: absolute; top: 9px; right: 9px;
  font-family: 'JetBrains Mono', monospace; font-size: 8px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: #fff; background: var(--danger); padding: 2px 5px; border-radius: 8px;
}

/* "see all" link in section heads */
.gpm-see {
  display: inline-flex; align-items: center; gap: 4px; flex: none;
  font-family: 'JetBrains Mono', monospace; font-size: 9.5px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--accent-text); background: transparent; border: 0;
  cursor: pointer; padding: 0; text-decoration: none;
}
.gpm-see:hover { text-decoration: underline; text-underline-offset: 3px; }
.gpm-see .material-icons { font-size: 14px; }

/* ── Section heading ────────────────────────────────────────────── */
.gpm-shead {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin-bottom: -4px;
}
.gpm-shead h3 {
  margin: 0; font-family: 'Anton', sans-serif; font-size: 18px; letter-spacing: 0.04em;
  text-transform: uppercase;
}
.gpm-shead .meta {
  font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.08em;
  color: var(--dim); text-transform: uppercase;
}

/* ── Striped media placeholder (honest stand-in for an external link) ── */
.gpm-ph {
  position: relative; overflow: hidden; flex: none;
  background-color: var(--panel-2);
  background-image: repeating-linear-gradient(
    135deg,
    color-mix(in oklab, var(--text) 5%, transparent) 0 1px,
    transparent 1px 11px
  );
  display: flex; align-items: center; justify-content: center;
}
.gpm-ph.v16 { aspect-ratio: 16 / 9; width: 100%; }
.gpm-ph.sq { aspect-ratio: 1 / 1; width: 100%; }
.gpm-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gpm-ph-cap {
  font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--dim); text-align: center; padding: 0 8px;
}
/* play button */
.gpm-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}
.gpm-play.sm { width: 34px; height: 34px; }
.gpm-play .material-icons { margin-left: 2px; font-size: 24px; }
.gpm-play.sm .material-icons { font-size: 18px; }
/* corner chips on a placeholder */
.gpm-ph-dur, .gpm-ph-count {
  position: absolute; bottom: 7px; right: 7px;
  font-family: 'JetBrains Mono', monospace; font-size: 10px; font-weight: 600;
  color: #fff; background: rgba(0, 0, 0, 0.66); padding: 2px 6px; letter-spacing: 0.02em;
}
.gpm-ph-count { display: inline-flex; align-items: center; gap: 5px; }
.gpm-ph-count .material-icons { font-size: 13px; }
.gpm-ph-kind {
  position: absolute; top: 7px; left: 7px;
  font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: 0.12em;
  text-transform: uppercase; color: #fff; background: rgba(0, 0, 0, 0.55); padding: 2px 6px;
}
.gpm-new {
  position: absolute; top: 7px; right: 7px;
  font-family: 'JetBrains Mono', monospace; font-size: 9px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent-ink); background: var(--accent); padding: 2px 6px;
}

/* ── Source bar — the "where it was posted" link (the core of the brief) ── */
.gpm-source {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 8px 10px; background: var(--panel-2);
  border: 1px solid var(--rule); border-left: 2px solid var(--accent);
  color: var(--text); cursor: pointer; text-align: left; font: inherit; text-decoration: none;
}
.gpm-source:hover { border-color: var(--rule-hi); border-left-color: var(--accent); background: var(--panel-hi); }
.gpm-source .lab {
  font-family: 'JetBrains Mono', monospace; font-size: 8.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent-text); flex: none;
}
.gpm-source .ev { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.gpm-source .ev .nm {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 600; font-size: 14px;
  letter-spacing: 0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.05;
}
.gpm-source .ev .mt {
  font-family: 'JetBrains Mono', monospace; font-size: 9.5px; letter-spacing: 0.04em;
  color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gpm-source .chev { flex: none; color: var(--dim); display: flex; }
.gpm-source .chev .material-icons { font-size: 18px; }
.gpm-source:hover .chev { color: var(--accent-text); }

/* compact inline source (used on list cards) */
.gpm-src-mini {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  padding: 4px 7px; background: transparent; border: 1px solid var(--rule);
  color: var(--muted); cursor: pointer; font: inherit; text-align: left; text-decoration: none;
}
.gpm-src-mini:hover { border-color: var(--accent); color: var(--text); }
.gpm-src-mini .mk { color: var(--accent-text); flex: none; display: flex; }
.gpm-src-mini .mk .material-icons { font-size: 14px; }
.gpm-src-mini .tx {
  font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ── Featured (video hero / album hero) ─────────────────────────── */
.gpm-feature { display: flex; flex-direction: column; gap: 12px; }
.gpm-feat-meta { display: flex; flex-direction: column; gap: 10px; }
.gpm-feat-ttl {
  font-family: 'Anton', sans-serif; font-size: 22px; line-height: 1.08;
  letter-spacing: 0.01em; text-transform: uppercase;
}
.gpm-feat-by {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-family: 'JetBrains Mono', monospace; font-size: 10.5px; color: var(--muted);
  letter-spacing: 0.02em;
}
.gpm-feat-by .sep { color: var(--dim); }
.gpm-byav {
  width: 20px; height: 20px; flex: none; border-radius: 50%;
  background: var(--panel-2); border: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace; font-size: 8.5px; color: var(--muted);
}

/* ── Video list card (horizontal thumb + body) ──────────────────── */
.gpm-list { display: flex; flex-direction: column; gap: 11px; }
.gpm-vcard {
  display: grid; grid-template-columns: 132px 1fr; gap: 12px;
  border: 1px solid var(--rule); background: var(--panel); padding: 9px; cursor: pointer;
  text-decoration: none; color: var(--text);
}
.gpm-vcard:hover { border-color: var(--rule-hi); }
.gpm-vcard .gpm-ph { align-self: stretch; }
.gpm-vbody { display: flex; flex-direction: column; gap: 7px; min-width: 0; padding: 1px 0; }
.gpm-vbody .nm { font-size: 15px; font-weight: 500; line-height: 1.18; }
.gpm-vbody .by {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-family: 'JetBrains Mono', monospace; font-size: 9.5px; color: var(--muted); letter-spacing: 0.02em;
}
.gpm-vbody .by .sep { color: var(--dim); }
.gpm-vcard .gpm-src-mini { margin-top: auto; }

/* ── Photo album row ────────────────────────────────────────────── */
.gpm-acard {
  display: grid; grid-template-columns: 92px 1fr; gap: 13px; align-items: stretch;
  border: 1px solid var(--rule); background: var(--panel); padding: 10px; cursor: pointer;
  text-decoration: none; color: var(--text);
}
.gpm-acard:hover { border-color: var(--rule-hi); }
.gpm-abody { display: flex; flex-direction: column; gap: 6px; min-width: 0; justify-content: center; }
.gpm-abody .nm { font-family: 'Anton', sans-serif; font-size: 18px; letter-spacing: 0.02em; text-transform: uppercase; line-height: 1; }
.gpm-abody .by {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-family: 'JetBrains Mono', monospace; font-size: 9.5px; color: var(--muted); letter-spacing: 0.02em;
}
.gpm-abody .by .sep { color: var(--dim); }

/* ── Photo grid (album detail) ──────────────────────────────────── */
.gpm-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.gpm-photo { cursor: pointer; text-decoration: none; }
.gpm-photo:hover .gpm-ph-cap { color: var(--muted); }

/* ── Messages feed ──────────────────────────────────────────────── */
.gpm-feed { display: flex; flex-direction: column; gap: 11px; }
.gpm-mcard {
  border: 1px solid var(--rule); background: var(--panel);
  display: flex; flex-direction: column;
}
.gpm-mcard.pinned { border-left: 3px solid var(--accent); }
.gpm-mcard-main { padding: 14px 15px 12px; display: flex; flex-direction: column; gap: 9px; }
.gpm-mhd { display: flex; align-items: center; gap: 10px; }
.gpm-mav {
  width: 32px; height: 32px; flex: none; border-radius: 50%;
  background: var(--panel-2); border: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--muted);
}
.gpm-mwho { display: flex; flex-direction: column; line-height: 1.18; min-width: 0; }
.gpm-mwho b { font-size: 14px; font-weight: 600; }
.gpm-mwho span {
  font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--dim);
}
.gpm-mt {
  margin-left: auto; align-self: flex-start; display: flex; align-items: center; gap: 6px;
  font-family: 'JetBrains Mono', monospace; font-size: 10px; color: var(--dim); flex: none;
}
.gpm-mtitle { font-size: 16px; font-weight: 500; line-height: 1.2; }
.gpm-mtext { font-size: 13.5px; color: var(--muted); line-height: 1.5; white-space: pre-line; }
.gpm-mtags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* card action footer — comment / open */
.gpm-mfoot {
  display: flex; align-items: center; gap: 16px;
  padding: 9px 15px; border-top: 1px solid var(--rule);
}
.gpm-maction {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'JetBrains Mono', monospace; font-size: 10px; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted); background: transparent; border: 0;
  cursor: pointer; padding: 0; text-decoration: none;
}
.gpm-maction:hover { color: var(--accent-text); }
.gpm-maction .material-icons { font-size: 14px; }
.gpm-maction.go { margin-left: auto; color: var(--accent-text); }

/* ── Empty / filtered state ─────────────────────────────────────── */
.gpm-empty {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 40px 20px; text-align: center; border: 1px dashed var(--rule-hi); background: var(--panel);
}
.gpm-empty .ic { color: var(--dim); }
.gpm-empty .ic .material-icons { font-size: 30px; }
.gpm-empty .t1 { font-family: 'Anton', sans-serif; font-size: 17px; letter-spacing: 0.03em; text-transform: uppercase; }
.gpm-empty .t2 { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--muted); line-height: 1.5; }

/* ── Album-detail header (back + title) ─────────────────────────── */
.gpm-detail-hd { display: flex; align-items: center; gap: 11px; }
.gpm-back {
  width: 38px; height: 38px; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--panel); border: 1px solid var(--rule); color: var(--muted); cursor: pointer;
  text-decoration: none;
}
.gpm-back:hover { border-color: var(--rule-hi); color: var(--text); }
.gpm-detail-hd .gpm-title { font-size: 28px; }

/* ════════════════════════════════════════════════════════════════
   WIDE LAYOUT — the app's desktop shell. Re-expresses the handoff's
   .gpm-desktop reflow as a width media query (no wrapper class needed).
   ════════════════════════════════════════════════════════════════ */
@media (min-width: 900px) {
  .gpm-page { max-width: 1080px; margin: 0 auto; padding: 8px 4px 64px; gap: 28px; }
  .gpm-head { gap: 14px; }
  .gpm-title { font-size: 60px; }
  .gpm-sub { font-size: 16px; max-width: 640px; }
  .gpm-filters { overflow: visible; flex-wrap: wrap; }
  .gpm-shead h3 { font-size: 22px; }

  /* videos — cinematic hero + 2-col card grid */
  .gpm-feature .gpm-ph.v16 { aspect-ratio: auto; height: 380px; }
  .gpm-feature .gpm-play { width: 60px; height: 60px; }
  .gpm-feat-ttl { font-size: 30px; }
  .gpm-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; align-items: start; }
  .gpm-vcard { grid-template-columns: 200px 1fr; }

  /* photos — bigger covers + wider grid */
  .gpm-acard { grid-template-columns: 130px 1fr; }
  .gpm-grid3 { grid-template-columns: repeat(5, 1fr); gap: 6px; }
  .gpm-detail-hd .gpm-title { font-size: 44px; }

  /* messages — 2-col masonry */
  .gpm-feed { display: block; column-count: 2; column-gap: 16px; }
  .gpm-mcard { break-inside: avoid; margin-bottom: 16px; }

  /* home hub */
  .gpm-hub-tiles { gap: 14px; }
  .gpm-hub-tile .n { font-size: 30px; }
}
