/* ============================================================
   The Prospect Porch — Shared Player Page Styles
   pp-player.css
   ============================================================ */

/* ── Grade Bars — Compact Professional ─────────────────────── */
.pp-grade-bars-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 20px;
  width: 100%;
  margin-top: 8px;
}

.pp-gbar {
  padding: 8px 0 9px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.pp-gbar-header {
  display: flex;
  align-items: baseline;
  margin-bottom: 6px;
  gap: 6px;
}

.pp-gbar-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.45);
  flex: 1;
  line-height: 1;
}

.pp-gbar-name {
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.30);
  line-height: 1;
}

.pp-gbar-val {
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--gc, #7c95e8);
  min-width: 22px;
  text-align: right;
  opacity: 0.85;
}

.pp-gbar-track {
  height: 3px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: visible;
}

/* Average (50) reference tick */
.pp-gbar-track::before {
  content: '';
  position: absolute;
  left: 50%;
  top: -2px;
  bottom: -2px;
  width: 1px;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.pp-gbar-fill {
  height: 100%;
  border-radius: 4px;
  width: 0;
  position: relative;
  transition: width 0.95s cubic-bezier(0.22, 1, 0.36, 1);
  min-width: 3px;
  opacity: 0.80;
}

/* End-cap dot */
.pp-gbar-dot {
  position: absolute;
  right: -3px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gc, #7c95e8);
  opacity: 0.75;
  display: block;
}

/* ── Scouting Report Section ─────────────────────────────── */
.pp-scout-section h2 {
  letter-spacing: 0.18em;
  color: rgba(148, 163, 184, 0.45) !important;
  font-size: 9.5px !important;
  font-weight: 700 !important;
  margin-bottom: 16px !important;
}
.pp-scout-section p {
  font-size: 14px;
  line-height: 1.75;
  color: rgba(226, 232, 240, 0.78) !important;
  padding-left: 14px;
  border-left: 2px solid rgba(148, 163, 184, 0.10);
  margin-bottom: 16px;
}
.pp-scout-section p:last-of-type {
  margin-bottom: 0;
}

/* ── Pitch Grade Bars (pitchers) ─────────────────────────── */
.pp-pitch-bars-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 16px;
  margin-top: 6px;
  width: 100%;
}

/* ── Social Share Bar ────────────────────────────────────── */
.pp-share-section {
  margin: 28px 0 0 0;
  padding: 18px 20px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.pp-share-label {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.65);
  margin-bottom: 12px;
}
.pp-share-btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.pp-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: transform 0.15s ease, opacity 0.15s ease;
  line-height: 1;
  font-family: inherit;
}
.pp-share-btn:hover { transform: translateY(-1px); opacity: 0.9; }
.pp-share-btn:active { transform: translateY(0); }
.pp-share-btn svg { flex-shrink: 0; }

.pp-share-btn--x {
  background: #000;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.15);
}
.pp-share-btn--fb {
  background: #1877f2;
  color: #fff;
}
.pp-share-btn--copy {
  background: rgba(255,255,255,0.07);
  color: rgba(233, 238, 255, 0.85);
  border: 1px solid rgba(255,255,255,0.12);
}
.pp-copy-success {
  font-size: 12px;
  color: #34d399;
  margin-left: 6px;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.pp-copy-success.visible { opacity: 1; }

/* ── Email Capture ───────────────────────────────────────── */
.pp-email-section {
  margin: 28px 0 0 0;
  padding: 26px 24px 22px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.pp-email-top { margin-bottom: 18px; }
.pp-email-heading {
  font-size: 16px;
  font-weight: 700;
  color: #e9eeff;
  margin: 0 0 5px 0;
  letter-spacing: -0.01em;
}
.pp-email-sub {
  font-size: 13px;
  color: rgba(148, 163, 184, 0.55);
  margin: 0;
  line-height: 1.5;
}
.pp-email-perks {
  display: none;
}
.pp-email-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pp-email-input {
  flex: 1;
  min-width: 190px;
  padding: 10px 14px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(7, 12, 24, 0.6);
  color: #e9eeff;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.pp-email-input:focus {
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.10);
}
.pp-email-input::placeholder { color: rgba(148, 163, 184, 0.38); }
.pp-email-submit {
  padding: 10px 20px;
  border-radius: 9px;
  background: #3b82f6;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.pp-email-submit:hover { background: #2563eb; transform: translateY(-1px); }
.pp-email-note {
  font-size: 11px;
  color: rgba(148, 163, 184, 0.35);
  margin: 10px 0 0 0;
}
@media (max-width: 480px) {
  .pp-email-perks { grid-template-columns: 1fr; }
}

/* ── YouTube video embed ─────────────────────────────────── */
.pp-yt-embed-section {
  margin: 0 0 24px 0;
  padding: 22px;
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(255,0,0,.07), rgba(15,23,42,.85));
  border: 1px solid rgba(255,0,0,.18);
}
.pp-yt-embed-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: rgba(255,120,120,.9);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.pp-yt-embed-label::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 13px;
  background: #ff0000;
  border-radius: 3px;
}
.pp-yt-embed-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  border-radius: 10px;
  overflow: hidden;
  background: #050d18;
}
.pp-yt-embed-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ── Site Footer ─────────────────────────────────────────── */
.pp-site-footer {
  margin-top: 48px;
  padding: 24px 24px 20px;
  background: rgba(7, 10, 18, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.pp-site-footer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pp-footer-social-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pp-footer-social-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(233, 238, 255, 0.8);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  letter-spacing: 0.02em;
}
.pp-footer-social-link:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}
.pp-footer-social-link--yt:hover {
  background: rgba(255, 0, 0, 0.12);
  border-color: rgba(255, 0, 0, 0.30);
  color: #ff8080;
}
.pp-footer-copy {
  font-size: 11px;
  color: rgba(148, 163, 184, 0.35);
}

@media (max-width: 600px) {
  .pp-email-row { flex-direction: column; }
  .pp-email-input { min-width: unset; }
}

/* ============================================================
   Live College Stats Section
   ============================================================ */

/* ── Loading state ─────────────────────────────────────────── */
.pp-stats-loading {
  padding: 20px 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(148, 163, 184, 0.35);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.pp-stats-spinner {
  flex-shrink: 0;
  width: 13px;
  height: 13px;
  border: 2px solid rgba(148, 163, 184, 0.12);
  border-top-color: rgba(148, 163, 184, 0.45);
  border-radius: 50%;
  animation: ppSpin 0.75s linear infinite;
}
@keyframes ppSpin { to { transform: rotate(360deg); } }

/* ── Main wrapper ──────────────────────────────────────────── */
.pp-stats-section {
  padding: 22px 32px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

/* ── Tab switcher ──────────────────────────────────────────── */
.pp-stats-tabs {
  display: inline-flex;
  gap: 2px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  padding: 3px;
}
.pp-stats-tab {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(148,163,184,0.50);
  background: transparent;
  border: none;
  border-radius: 5px;
  padding: 4px 10px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.pp-stats-tab:hover { color: rgba(203,213,225,0.80); }
.pp-stats-tab.pp-stats-tab-active {
  background: rgba(59,130,246,0.18);
  color: #93c5fd;
}

/* ── Section heading + live badge row ─────────────────────── */
.pp-stats-toprow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}
.pp-stats-heading {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.55);
}
.pp-stats-badges {
  display: flex;
  align-items: center;
  gap: 7px;
}
.pp-stats-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(74, 222, 128, 0.85);
  background: rgba(74, 222, 128, 0.07);
  border: 1px solid rgba(74, 222, 128, 0.2);
  border-radius: 6px;
  padding: 3px 8px;
}
.pp-stats-live-dot {
  width: 5px;
  height: 5px;
  background: #4ade80;
  border-radius: 50%;
  animation: ppLivePulse 2.2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes ppLivePulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.35; }
}
.pp-stats-school-tag {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.4);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 3px 8px;
}

/* ── Stats table wrapper — unified single table ────────────── */
.pp-stats-tables { }

/* Standard cols visible by default; advanced hidden */
.pp-col-adv { display: none; }
.pp-stats-tables.pp-show-adv .pp-col-adv { display: table-cell; }
.pp-stats-tables.pp-show-adv .pp-col-std { display: none; }

.pp-stats-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.pp-stats-tbl {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Header */
.pp-stats-tbl thead tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.pp-stats-tbl th {
  padding: 5px 10px 5px 0;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(148, 163, 184, 0.52);
  text-align: right;
  white-space: nowrap;
}
.pp-stats-tbl th:first-child,
.pp-stats-tbl td:first-child  { text-align: left; padding-left: 0; width: 50px; }
.pp-stats-tbl th.pp-th-team,
.pp-stats-tbl td.pp-td-team   { text-align: left; width: 140px; overflow: hidden; text-overflow: ellipsis; }

/* Divider col between standard and advanced */
.pp-stats-tbl th.pp-tbl-div,
.pp-stats-tbl td.pp-tbl-div {
  width: 1px;
  padding: 0;
  border-left: 1px solid rgba(255,255,255,0.06);
}

/* Body rows */
.pp-stats-tbl tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.1s ease;
}
.pp-stats-tbl tbody tr:hover { background: rgba(255,255,255,0.025); }
.pp-stats-tbl tbody tr:last-child { border-bottom: none; }

.pp-stats-tbl td {
  padding: 6px 10px 6px 0;
  text-align: right;
  color: rgba(203, 213, 225, 0.90);
  font-size: 11.5px;
}

/* Year cell */
.pp-stats-tbl td:first-child {
  text-align: left;
  padding-left: 0;
  font-weight: 700;
  font-size: 11.5px;
  color: #94a3b8;
  white-space: nowrap;
}

/* Team cell (logo + name) */
.pp-stats-tbl td.pp-td-team {
  text-align: left;
  white-space: nowrap;
}
.pp-tbl-team-cell {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.pp-tbl-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex-shrink: 0;
}
.pp-tbl-team-name {
  font-size: 11px;
  font-weight: 500;
  color: rgba(203, 213, 225, 0.75);
  letter-spacing: 0.01em;
}

/* Totals / career row */
.pp-stats-tbl tr.pp-tbl-career td {
  color: rgba(203, 213, 225, 0.50);
  font-size: 10.5px;
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: 5px;
}
.pp-stats-tbl tr.pp-tbl-career td:first-child {
  color: rgba(148,163,184,0.42);
  font-style: italic;
}

/* ── Color-coding classes ──────────────────────────────────── */
/* Elite — emerald green */
.pp-c-elite {
  color: #4ade80 !important;
  font-weight: 700;
}
/* Good — sky teal */
.pp-c-good {
  color: #38bdf8 !important;
  font-weight: 600;
}
/* Warn — amber (caution / lucky BABIP / etc.) */
.pp-c-warn {
  color: #fbbf24 !important;
  font-weight: 600;
}
/* Poor — muted orange-red */
.pp-c-poor {
  color: #f97316 !important;
}
/* Bad — bright red */
.pp-c-bad {
  color: #f87171 !important;
  font-weight: 700;
}

/* ── Source footer ─────────────────────────────────────────── */
.pp-stats-footer {
  margin-top: 10px;
  font-size: 9.5px;
  color: rgba(148, 163, 184, 0.28);
  letter-spacing: 0.04em;
}
.pp-stats-footer a {
  color: rgba(148, 163, 184, 0.38);
  text-decoration: none;
}
.pp-stats-footer a:hover { color: rgba(148, 163, 184, 0.65); }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 640px) {
  .pp-stats-section { padding: 14px 10px 12px; }
  .pp-stats-tbl {
    width: auto;
    table-layout: auto;
    min-width: 700px;
  }
  .pp-stats-tbl th,
  .pp-stats-tbl td { padding-right: 6px; font-size: 10.5px; }
  .pp-stats-tbl th { font-size: 7.5px; }
  .pp-stats-tbl th.pp-th-team,
  .pp-stats-tbl td.pp-td-team { width: auto; min-width: 80px; max-width: 120px; }
}
