/*
Theme Name: East Bay SCORE Scoreboard
Theme URI: https://eastbayscore.org/
Description: GeneratePress child theme for East Bay SCORE — a scoreboard / sabermetrics analytics aesthetic. Dark charcoal base, LED-amber and red accents, monospace numerics, custom header/footer/favicon. Built to surface full content up to the more tag on the homepage.
Author: EBS Data Lab
Template: generatepress
Version: 1.4.0
License: GNU General Public License v2 or later
Text Domain: ebs-child
*/

/* =========================================================
   0. FONTS  (loaded via @import fallback; main load is in functions.php)
   Oswald  -> display / headings / wordmark
   Roboto Mono -> numerics, meta, scoreboard digits
   Noto Sans KR -> Korean body
   ========================================================= */

:root{
  /* Scoreboard palette */
  --ebs-bg:        #0d1014;   /* deepest charcoal (page) */
  --ebs-bg-2:      #15181d;   /* panel / card */
  --ebs-bg-3:      #1c2027;   /* raised panel */
  --ebs-line:      #2a2f37;   /* hairline borders */
  --ebs-line-2:    #3a4049;   /* stronger border */
  --ebs-text:      #e9e6dd;   /* primary text (warm off-white) */
  --ebs-text-dim:  #9aa1ab;   /* secondary text */
  --ebs-text-mute: #5b626d;   /* muted / captions */
  --ebs-red:       #b8232f;   /* primary accent (scoreboard red) */
  --ebs-red-hi:    #e23b48;   /* hover red */
  --ebs-amber:     #f2b705;   /* LED amber (numbers / highlights) */
  --ebs-amber-dim: #c79a12;
  --ebs-navy:      #16314f;   /* deep navy support */
  --ebs-green:     #2fbf71;   /* "safe" green tick */

  --ebs-mono: "Roboto Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --ebs-display: "Oswald", "Arial Narrow", sans-serif;
  --ebs-body: "Noto Sans KR", "Helvetica Neue", Arial, sans-serif;
}

/* =========================================================
   1. GLOBAL / BODY
   ========================================================= */
body{
  background-color: var(--ebs-bg);
  /* subtle field-grid texture so it never reads as a flat blog */
  background-image:
     linear-gradient(rgba(255,255,255,0.012) 1px, transparent 1px),
     linear-gradient(90deg, rgba(255,255,255,0.012) 1px, transparent 1px);
  background-size: 44px 44px;
  color: var(--ebs-text);
  font-family: var(--ebs-body);
  -webkit-font-smoothing: antialiased;
}

a{ color: var(--ebs-amber); text-decoration: none; }
a:hover, a:focus, a:active{ color: var(--ebs-red-hi); }

/* Container background overrides (GP uses --base-3 white) */
.separate-containers .inside-article,
.separate-containers .comments-area,
.separate-containers .page-header,
.one-container .container,
.separate-containers .paging-navigation,
.inside-page-header,
.sidebar .widget,
.footer-widgets,
.site-info{
  background-color: var(--ebs-bg-2);
  color: var(--ebs-text);
}

/* =========================================================
   2. HEADER  — scoreboard top rail
   ========================================================= */
.site-header{
  background-color: var(--ebs-bg);
  border-bottom: 2px solid var(--ebs-line);
  position: relative;
}
/* glowing red rail under header, like a scoreboard frame */
.site-header::after{
  content:"";
  position:absolute; left:0; right:0; bottom:-2px; height:2px;
  background: linear-gradient(90deg, transparent, var(--ebs-red) 18%, var(--ebs-amber) 50%, var(--ebs-red) 82%, transparent);
  opacity:.85;
}
.inside-header{
  padding-top: 14px; padding-bottom: 14px;
  align-items: center;
}
/* hide the text title — we inject the SVG logo via functions.php */
.site-branding .main-title{ margin:0; line-height:0; }
.ebs-logo{ display:inline-block; line-height:0; }
.ebs-logo svg{ height:48px; width:auto; display:block; }

/* tiny "LIVE" status pill next to logo */
.ebs-live{
  display:inline-flex; align-items:center; gap:6px;
  margin-left:18px; padding:4px 9px;
  font-family:var(--ebs-mono); font-size:10px; font-weight:600;
  letter-spacing:.16em; text-transform:uppercase;
  color:var(--ebs-text-dim);
  border:1px solid var(--ebs-line-2); border-radius:3px;
  background:var(--ebs-bg-2);
}
.ebs-live .dot{
  width:7px; height:7px; border-radius:50%;
  background:var(--ebs-green); box-shadow:0 0 6px var(--ebs-green);
  animation: ebs-blink 1.8s ease-in-out infinite;
}
@keyframes ebs-blink{ 0%,100%{opacity:1;} 50%{opacity:.25;} }

/* NAV */
.main-navigation,
.main-navigation ul ul{ background-color: var(--ebs-bg); }
.main-navigation .main-nav ul li a,
.main-navigation .menu-toggle,
.main-navigation .menu-bar-items{
  color: var(--ebs-text-dim);
  font-family: var(--ebs-display);
  font-weight:500; letter-spacing:.06em; text-transform:uppercase;
  font-size:15px;
}
.main-navigation .main-nav ul li:not([class*="current-menu-"]):hover > a,
.main-navigation .main-nav ul li.sfHover > a{
  color: var(--ebs-amber);
  background: var(--ebs-bg-2);
}
.main-navigation .main-nav ul li[class*="current-menu-"] > a{ color: var(--ebs-red-hi); }
.main-navigation ul ul{ border:1px solid var(--ebs-line); }

/* =========================================================
   3. ENTRY / ARTICLE CARDS — box-score panels
   ========================================================= */
.inside-article{
  border:1px solid var(--ebs-line);
  border-left:4px solid var(--ebs-red);
  position:relative;
}
.entry-header{ position:relative; }

.entry-title{
  font-family: var(--ebs-display);
  font-weight:700; letter-spacing:-.01em; line-height:1.18;
}
.entry-title a{ color: var(--ebs-text); }
.entry-title a:hover{ color: var(--ebs-amber); }

/* meta as scoreboard readout */
.entry-meta,
.entry-meta a{
  font-family: var(--ebs-mono);
  font-size:11.5px; letter-spacing:.04em;
  color: var(--ebs-text-mute);
  text-transform:uppercase;
}
.entry-meta a:hover{ color: var(--ebs-amber); }

/* category chips */
footer.entry-meta .cat-links a{
  display:inline-block;
  border:1px solid var(--ebs-line-2);
  padding:3px 9px; border-radius:3px;
  background:var(--ebs-bg-3);
  color:var(--ebs-text-dim);
}
footer.entry-meta .cat-links a:hover{
  border-color:var(--ebs-red); color:var(--ebs-amber);
}

/* body copy */
.entry-content,
.entry-summary{ color: var(--ebs-text); line-height:1.8; }
.entry-content p{ color:#d5d2c9; }

/* numbers inside posts glow amber (scoreboard feel) — opt-in via .ebs-stat */
.ebs-stat{ font-family:var(--ebs-mono); color:var(--ebs-amber); font-weight:600; }

/* the "Read more" link as a scoreboard button */
.read-more, a.read-more, .read-more-container a{
  display:inline-block;
  font-family:var(--ebs-mono); font-size:12px; font-weight:600;
  letter-spacing:.1em; text-transform:uppercase;
  color:var(--ebs-bg) !important;
  background:var(--ebs-amber);
  padding:8px 16px; border-radius:3px;
  border:1px solid var(--ebs-amber-dim);
  transition: background .15s ease, transform .1s ease;
}
.read-more:hover, a.read-more:hover, .read-more-container a:hover{
  background:var(--ebs-red); color:#fff !important;
  border-color:var(--ebs-red);
  transform: translateY(-1px);
}
.read-more-container{ margin-top:22px; }

/* =========================================================
   4. SIDEBAR widgets — stat panels
   ========================================================= */
.sidebar .widget{
  border:1px solid var(--ebs-line);
  border-top:3px solid var(--ebs-red);
}
.widget .wp-block-heading,
.sidebar .widget-title,
.widget h2{
  font-family:var(--ebs-display);
  text-transform:uppercase; letter-spacing:.08em;
  font-size:15px; color:var(--ebs-amber);
  border-bottom:1px solid var(--ebs-line);
  padding-bottom:10px; margin-bottom:14px;
}
.wp-block-latest-posts__list li,
.wp-block-latest-comments li{
  border-bottom:1px dashed var(--ebs-line);
  padding:8px 0;
}
.wp-block-latest-posts__list a{ color:var(--ebs-text-dim); font-size:14px; }
.wp-block-latest-posts__list a:hover{ color:var(--ebs-amber); }

/* search box */
.wp-block-search__input,
input[type="search"]{
  background:var(--ebs-bg-3) !important;
  border:1px solid var(--ebs-line-2) !important;
  color:var(--ebs-text) !important;
  font-family:var(--ebs-mono);
}
.wp-block-search__button, button[type="submit"]{
  background:var(--ebs-red) !important; color:#fff !important;
  border:none !important; font-family:var(--ebs-display);
  text-transform:uppercase; letter-spacing:.06em;
}
.wp-block-search__button:hover{ background:var(--ebs-red-hi) !important; }

/* =========================================================
   5. PAGINATION — scoreboard innings
   ========================================================= */
.paging-navigation{ border:1px solid var(--ebs-line); }
.nav-links .page-numbers{
  font-family:var(--ebs-mono); font-weight:600;
  border:1px solid var(--ebs-line-2);
  padding:6px 12px; margin:0 3px; border-radius:3px;
  color:var(--ebs-text-dim);
}
.nav-links .page-numbers.current{
  background:var(--ebs-amber); color:var(--ebs-bg); border-color:var(--ebs-amber);
}
.nav-links a.page-numbers:hover{ border-color:var(--ebs-red); color:var(--ebs-amber); }
.nav-previous a, .nav-next a{ color:var(--ebs-amber); font-family:var(--ebs-mono); }

/* =========================================================
   6. FOOTER — scoreboard base panel
   ========================================================= */
.site-footer .site-info{
  background:var(--ebs-bg);
  border-top:2px solid var(--ebs-line);
  position:relative;
}
.site-footer .site-info::before{
  content:"";
  position:absolute; left:0; right:0; top:-2px; height:2px;
  background: linear-gradient(90deg, transparent, var(--ebs-red) 20%, var(--ebs-amber) 50%, var(--ebs-red) 80%, transparent);
}
/* footer container should fill the grid width and stack its rows */
.site-footer .inside-site-info{
  display:block !important;   /* override GP flex so rows stack vertically */
  width:100%; max-width:1200px; margin:0 auto;
}
.ebs-footer{
  display:flex; flex-wrap:wrap; gap:40px;
  justify-content:space-between; align-items:flex-start;
  padding:40px 0 8px;
  width:100%;
}
.ebs-footer__brand{ flex:1 1 360px; min-width:280px; max-width:480px; }
.ebs-footer__brand .ebs-logo svg{ height:40px; margin-bottom:14px; }
.ebs-footer__brand p{
  color:var(--ebs-text-mute); font-size:13px; line-height:1.7; margin:0;
}
.ebs-footer__col{ flex:0 0 auto; min-width:150px; }
.ebs-footer__col h4{
  font-family:var(--ebs-display); text-transform:uppercase;
  letter-spacing:.1em; font-size:13px; color:var(--ebs-amber);
  margin:0 0 12px;
}
.ebs-footer__col ul{ list-style:none; margin:0; padding:0; }
.ebs-footer__col li{ margin:0 0 8px; }
.ebs-footer__col a{ color:var(--ebs-text-dim); font-size:13.5px; }
.ebs-footer__col a:hover{ color:var(--ebs-amber); }
.ebs-footer__disclaimer{
  width:100%;
  border-top:1px dashed var(--ebs-line);
  margin-top:24px; padding:16px 0;
  font-family:var(--ebs-mono); font-size:11px; line-height:1.7;
  color:var(--ebs-text-mute);
}
.copyright-bar{
  width:100%;
  font-family:var(--ebs-mono); font-size:12px;
  color:var(--ebs-text-mute);
  border-top:1px solid var(--ebs-line); padding:14px 0;
}
.copyright-bar .copyright{ color:var(--ebs-text-dim); }
.site-info a{ color:var(--ebs-amber); }

/* =========================================================
   7. MISC / inline content that authors paste
   keep their inline-styled report cards readable on dark bg
   ========================================================= */
.entry-content table{ color:var(--ebs-text); }
.entry-content img{ border-radius:4px; }

/* mobile */
@media (max-width:768px){
  .ebs-footer{ flex-direction:column; gap:24px; }
  .ebs-live{ display:none; }
  .ebs-logo svg{ height:40px; }
}

/* =========================================================
   8. SCORE TICKER  — scrolling broadcast strip under header
   ========================================================= */
.ebs-ticker{
  display:flex; align-items:stretch;
  background:#0a0c0f;
  border-bottom:2px solid var(--ebs-line);
  border-top:1px solid #000;
  overflow:hidden; position:relative;
}
.ebs-ticker__label{
  flex:0 0 auto;
  display:flex; align-items:center;
  padding:0 16px;
  font-family:var(--ebs-mono); font-size:12px; font-weight:600;
  letter-spacing:.14em; color:#fff;
  background:var(--ebs-red);
  position:relative; z-index:2;
  animation: ebs-blink 1.6s ease-in-out infinite;
}
.ebs-ticker__viewport{ flex:1 1 auto; overflow:hidden; position:relative; }
.ebs-ticker__track{
  display:inline-flex; align-items:center;
  white-space:nowrap;
  padding:11px 0;
  animation: ebs-scroll 38s linear infinite;
  will-change: transform;
}
.ebs-ticker:hover .ebs-ticker__track{ animation-play-state: paused; }
.ebs-ticker__item{
  display:inline-flex; align-items:center; gap:8px;
  padding:0 26px;
  font-family:var(--ebs-body); font-size:13.5px;
  color:var(--ebs-text-dim) !important;
  border-right:1px solid var(--ebs-line);
}
.ebs-ticker__item:hover{ color:var(--ebs-amber) !important; }
.ebs-ticker__dot{
  width:6px; height:6px; border-radius:50%;
  background:var(--ebs-amber); box-shadow:0 0 6px var(--ebs-amber);
  flex:0 0 auto;
}
@keyframes ebs-scroll{
  0%{ transform: translateX(0); }
  100%{ transform: translateX(-50%); }
}
@media (max-width:768px){
  .ebs-ticker__label{ padding:0 10px; font-size:11px; }
  .ebs-ticker__item{ padding:0 18px; font-size:12.5px; }
}

/* =========================================================
   9. CUSTOM SIDEBAR PANELS  — scoreboard widgets
   ========================================================= */
.ebs-panel{
  background:var(--ebs-bg-2) !important;
  border:1px solid var(--ebs-line) !important;
  border-top:3px solid var(--ebs-red) !important;
  margin-bottom:24px;
}
.ebs-panel__title{
  font-family:var(--ebs-display) !important;
  text-transform:uppercase; letter-spacing:.07em;
  font-size:15px !important; color:var(--ebs-amber) !important;
  border-bottom:1px solid var(--ebs-line);
  padding-bottom:10px !important; margin:0 0 14px !important;
}
.ebs-panel__foot{
  margin-top:14px; padding-top:10px;
  border-top:1px dashed var(--ebs-line);
  font-family:var(--ebs-mono); font-size:10.5px;
  letter-spacing:.06em; color:var(--ebs-text-mute);
}

/* ---- D) Today's Stat box ---- */
.ebs-statgrid{ display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.ebs-statcell{
  background:#0d1014; border:1px solid var(--ebs-line);
  border-radius:4px; padding:14px 6px; text-align:center;
}
.ebs-statcell__num{
  display:block;
  font-family:var(--ebs-mono); font-weight:600; font-size:26px;
  color:var(--ebs-amber); line-height:1;
  text-shadow:0 0 10px rgba(242,183,5,.35);
}
.ebs-statcell__label{
  display:block; margin-top:7px;
  font-family:var(--ebs-body); font-size:11px; color:var(--ebs-text-dim);
}

/* ---- A) Category standings ---- */
.ebs-standings{ width:100%; border-collapse:collapse; }
.ebs-standings thead th{
  font-family:var(--ebs-mono); font-size:10px; font-weight:600;
  letter-spacing:.08em; text-transform:uppercase;
  color:var(--ebs-text-mute); text-align:left;
  padding:0 0 8px; border-bottom:1px solid var(--ebs-line);
}
.ebs-standings thead th:last-child{ text-align:right; }
.ebs-standings td{ padding:9px 0; border-bottom:1px dashed var(--ebs-line); vertical-align:middle; }
.ebs-standings__rank{
  width:22px; font-family:var(--ebs-mono); font-weight:600;
  color:var(--ebs-red-hi); font-size:13px;
}
.ebs-standings__name{ position:relative; }
.ebs-standings__name a{ color:var(--ebs-text-dim); font-size:13.5px; }
.ebs-standings__name a:hover{ color:var(--ebs-amber); }
.ebs-standings__bar{
  display:block; height:3px; margin-top:5px; border-radius:2px;
  background:linear-gradient(90deg,var(--ebs-red),var(--ebs-amber));
  opacity:.7;
}
.ebs-standings__count{
  text-align:right; width:30px;
  font-family:var(--ebs-mono); font-weight:600; font-size:14px;
  color:var(--ebs-text);
}

/* ---- E) Featured picks ---- */
.ebs-picks{ list-style:none; margin:0; padding:0; counter-reset:none; }
.ebs-picks__item{
  display:flex; gap:12px; align-items:flex-start;
  padding:11px 0; border-bottom:1px dashed var(--ebs-line);
}
.ebs-picks__item:last-child{ border-bottom:none; }
.ebs-picks__num{
  flex:0 0 auto;
  font-family:var(--ebs-mono); font-weight:600; font-size:16px;
  color:var(--ebs-bg); background:var(--ebs-amber);
  width:24px; height:24px; border-radius:3px;
  display:flex; align-items:center; justify-content:center;
}
.ebs-picks__link{ color:var(--ebs-text-dim); font-size:13.5px; line-height:1.45; }
.ebs-picks__link:hover{ color:var(--ebs-amber); }
.ebs-picks__cat{
  display:block; margin-top:4px;
  font-family:var(--ebs-mono); font-size:10px; letter-spacing:.05em;
  color:var(--ebs-text-mute); text-transform:uppercase;
}

/* ---- C) Tag scoreboard ---- */
.ebs-tagboard{ display:flex; flex-wrap:wrap; gap:7px; }
.ebs-tagchip{
  display:inline-flex; align-items:center; gap:6px;
  background:#0d1014; border:1px solid var(--ebs-line-2);
  border-radius:3px; padding:5px 9px;
  font-family:var(--ebs-mono); font-size:11.5px;
  color:var(--ebs-text-dim) !important;
}
.ebs-tagchip:hover{ border-color:var(--ebs-red); color:var(--ebs-amber) !important; }
.ebs-tagchip__n{
  font-size:9.5px; color:var(--ebs-amber);
  border-left:1px solid var(--ebs-line-2); padding-left:6px;
}

/* ---- footer brand spacing fix (logo block clean) ---- */
.ebs-footer__brand .ebs-logo{ display:inline-block; margin-bottom:14px; }

/* safety: hide any empty widget shells that have no content */
.sidebar .widget:empty{ display:none !important; }
.sidebar .widget_block:not(:has(*)){ display:none !important; }

/* =========================================================
   10. STICKY HEADER  — header + ticker stay pinned on scroll
   ========================================================= */
.site-header{
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow .25s ease, background-color .25s ease;
}
/* ticker sits directly under the sticky header and pins too */
.ebs-ticker{
  position: sticky;
  top: 62px;            /* fallback; refined by --ebs-header-h below */
  top: var(--ebs-header-h, 62px);
  z-index: 99;
}
/* when WP admin bar is present (logged-in), offset by 32px */
body.admin-bar .site-header{ top: 32px; }
body.admin-bar .ebs-ticker{ top: calc(var(--ebs-header-h, 62px) + 32px); }
@media screen and (max-width:782px){
  body.admin-bar .site-header{ top: 46px; }
  body.admin-bar .ebs-ticker{ top: calc(var(--ebs-header-h, 62px) + 46px); }
}

/* scrolled state: deepen background + add shadow + thin red underline glow */
.site-header.ebs-stuck{
  background-color: rgba(13,16,20,.96);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 22px rgba(0,0,0,.55);
}

/* MOBILE: keep header sticky but release the ticker (saves vertical space) */
@media (max-width:768px){
  .ebs-ticker{ position: static; top: auto; }
}
