/* ============================================================
   Blueprint Hockey Analytics — Shared Design System
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Barlow+Condensed:wght@600;700;800;900&display=swap');

:root {
  --navy:       #041E42;
  --navy-deep:  #031629;
  --navy-mid:   #0a2d5e;
  --ice:        #5BABDF;
  --ice-light:  #8AC4E8;
  --ice-dim:    rgba(91,171,223,0.12);

  --white:      #ffffff;
  --off:        #f5f6f8;
  --border:     #e8eaed;
  --border-dk:  rgba(255,255,255,0.1);

  --text:       #0f1419;
  --muted:      #6b7280;
  --muted-dk:   rgba(255,255,255,0.5);

  --green:      #15803d;
  --green-bg:   #dcfce7;
  --red:        #dc2626;
  --red-bg:     #fee2e2;
  --amber:      #92660a;
  --amber-bg:   #fff6dc;

  --shadow:     0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:  0 4px 16px rgba(4,30,66,0.08);
  --radius:     10px;
}

* , *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--off);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.display {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  letter-spacing: -0.5px;
}

/* ── NAV ─────────────────────────────────────────────────────── */
.bp-nav {
  background: var(--navy);
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 200;
  border-bottom: 2px solid var(--ice);
}
.bp-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  gap: 32px;
}
.bp-logo {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 23px;
  letter-spacing: 1px;
  color: var(--white);
  text-transform: uppercase;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.bp-logo-img {
  height: 44px;
  width: 44px;
  object-fit: cover;
  object-position: center center;
  flex-shrink: 0;
  border-radius: 3px;
  opacity: 0.95;
}
.bp-logo .outline {
  -webkit-text-stroke: 1.3px var(--ice);
  color: transparent;
}
.bp-logo-word { letter-spacing: 0.5px; line-height: 1; }
.bp-nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-shrink: 0;
}
.bp-nav-links a {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-dk);
  letter-spacing: 0.2px;
  transition: color 0.15s;
  white-space: nowrap;
}
.bp-nav-links a:hover, .bp-nav-links a.active { color: var(--white); }

/* Player Reports gets real visual weight — it's the actual business, not
   just another informational page, so it shouldn't blend in with Teams/
   Methodology as identical plain text. */
.bp-nav-links a[data-nav="player-reports"] {
  background: var(--ice);
  color: var(--navy) !important;
  padding: 6px 14px;
  border-radius: 6px;
  font-weight: 700;
}
.bp-nav-links a[data-nav="player-reports"]:hover {
  background: var(--ice-light);
  color: var(--navy) !important;
}

/* Hamburger toggle — hidden on desktop, shown only on mobile */
.bp-nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  position: relative;
}
.bp-nav-toggle span {
  display: block;
  position: absolute;
  left: 50%;
  top: 15px;
  width: 20px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transform: translateX(-50%);
  transition: transform 0.2s ease, background 0.2s ease;
}
.bp-nav-toggle span::before,
.bp-nav-toggle span::after {
  content: '';
  display: block;
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.2s ease, top 0.2s ease;
}
.bp-nav-toggle span::before { top: -8px; }
.bp-nav-toggle span::after { top: 8px; }
.bp-nav-toggle.open span { background: transparent; }
.bp-nav-toggle.open span::before { top: 0; transform: rotate(45deg); }
.bp-nav-toggle.open span::after { top: 0; transform: rotate(-45deg); }

/* Search */
.bp-search-wrap {
  position: relative;
  flex: 1;
  max-width: 320px;
}
.bp-search-wrap input {
  width: 100%;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  padding: 7px 12px 7px 32px;
  border: 1px solid var(--border-dk);
  border-radius: 8px;
  background: rgba(255,255,255,0.07);
  color: var(--white);
  outline: none;
  transition: background 0.15s, border-color 0.15s;
}
.bp-search-wrap input:focus {
  background: rgba(255,255,255,0.12);
  border-color: var(--ice);
}
.bp-search-wrap input::placeholder { color: rgba(255,255,255,0.35); }
.bp-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,0.4);
  font-size: 14px;
  pointer-events: none;
}

.bp-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  max-height: 360px;
  overflow-y: auto;
  z-index: 300;
  display: none;
}
.bp-search-results.open { display: block; }
.bp-search-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.1s;
  border-bottom: 1px solid var(--off);
}
.bp-search-result:last-child { border-bottom: none; }
.bp-search-result:hover { background: var(--off); }
.bp-search-headshot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--off);
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.bp-search-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
}
.bp-search-info { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.bp-search-name { font-size: 13px; font-weight: 700; color: var(--text); }
.bp-search-meta {
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}
.bp-search-war {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800;
  font-size: 14px;
  color: var(--navy);
  flex-shrink: 0;
}
.bp-search-empty {
  padding: 16px 12px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

/* ── COMPONENT BADGES (shared between leaderboard, player, team pages) ─ */
.comp {
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  padding: 2px 7px;
  border-radius: 4px;
  display: inline-block;
  min-width: 48px;
  text-align: center;
}
.comp.high { background: var(--green-bg); color: var(--green); }
.comp.mid  { background: var(--amber-bg); color: var(--amber); }
.comp.low  { background: var(--red-bg);   color: var(--red); }
.comp.neu  { background: var(--off);      color: var(--muted); }
.comp.na   { background: #f3f4f6; color: #9ca3af; font-size: 10px; }

.war-val { font-family: 'Barlow Condensed', sans-serif; font-weight: 800; font-size: 17px; letter-spacing: -0.3px; }
.war-val.pos { color: var(--navy); }
.war-val.neg { color: var(--red); }

/* ── FOOTER ──────────────────────────────────────────────────── */
.bp-footer {
  padding: 28px 24px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: var(--white);
}
.bp-footer strong { color: var(--navy); }

/* ── SCROLLBAR (webkit) ──────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  .bp-nav-toggle { display: flex; }
  .bp-nav-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--navy);
    border-bottom: 2px solid var(--ice);
    box-shadow: var(--shadow-md);
    padding: 6px 0;
  }
  .bp-nav-links.open { display: flex; }
  .bp-nav-links a {
    padding: 13px 24px;
    width: 100%;
  }
  .bp-nav-links a:hover, .bp-nav-links a.active {
    background: rgba(255,255,255,0.06);
  }
  /* Mobile: same row shape as the other tabs (left-aligned, full width),
     still highlighted -- light-blue text + accent bar instead of a pill. */
  .bp-nav-links a[data-nav="player-reports"] {
    display: block;
    width: 100%;
    margin: 0;
    padding: 13px 24px;
    text-align: left;
    background: transparent;
    border-radius: 0;
    color: var(--ice) !important;
    box-shadow: inset 3px 0 0 var(--ice);
  }
  .bp-nav-links a[data-nav="player-reports"]:hover,
  .bp-nav-links a[data-nav="player-reports"].active {
    background: rgba(255,255,255,0.06);
    color: var(--ice) !important;
  }
  .bp-search-wrap { max-width: 100%; }
}

/* ── SOCIAL LINKS (footer) ───────────────────────────────────── */
.bp-social { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 22px; margin-top: 12px; }
.bp-social a { display: inline-flex; align-items: center; gap: 7px; color: var(--navy); font-weight: 700; font-size: 12px; text-decoration: none; }
.bp-social a svg { flex: none; }
.bp-social a:hover { color: var(--ice); }

/* ── FOOTER: contact + privacy (small) ───────────────────────── */
.bp-footer-legal { margin-top: 12px; font-size: 11px; color: var(--muted); }
.bp-footer-legal a { color: var(--muted); text-decoration: underline; }
.bp-footer-legal a:hover { color: var(--navy); }
.pr-form-note a { color: inherit; text-decoration: underline; }
