/* =========================
   RESULTS PAGE – NextGen (Broadcast)
   Assumes site background: #111111
   ========================= */

:root{
  --series-accent: #cc2a2a; /* NextGen red */
  --series-hero: url('/assets/images/series/nextgen_hero.jpg'); /* update if different */
}

/* Hero banner matches schedule pages */
.nextgen-page .hero-banner{
  background: var(--series-hero);
  background-size: cover;
  background-position: center;
  height: 280px;
}

@media (max-width: 760px){
  .nextgen-page .hero-banner{ height: 220px; }
  .nextgen-page .header-gradient{ display: none; }
}

/* Content wrapper aligns with schedule pages */
.nextgen-page.results-page .content-wrapper{
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 26px 20px 70px;
}

/* Series accent (Results pages) */
body.nextgen-page.results-page { --series-accent: #ff3b30; }
body.oreilly-page.results-page { --series-accent: #34c759; }
body.trucks-page.results-page  { --series-accent: #0a84ff; }


/* =========================
   Series selector + Page actions (mirrors Schedule pages)
   ========================= */

/* Series selector (between series) */
.series-selector{
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0 10px;
}

.series-selector a{
  text-decoration: none;
  color: #fff;
  font-weight: 900;
  letter-spacing: 0.2px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 0.85rem;
  opacity: 0.9;
}

.series-selector a:hover{
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.18);
  opacity: 1;
}

.series-selector a.active{
  opacity: 1;
  background: rgba(0,0,0,0.28);
  border-color: rgba(255,255,255,0.22);
  box-shadow: inset 0 0 0 2px var(--series-accent);
}

/* Page actions (Schedule / Standings / Results / Updates / Broadcast) */
.page-actions{
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 6px 0 26px;
}

.page-actions a{
  text-decoration: none;
  color: #fff;
  font-weight: 900;
  letter-spacing: 0.2px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
}

.page-actions a:hover{
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.18);
}

.page-actions a.active{
  background: rgba(0,0,0,0.28);
  border-color: rgba(255,255,255,0.22);
  box-shadow: inset 0 0 0 2px var(--series-accent);
}

@media (max-width: 620px){
  .series-selector a,
  .page-actions a{
    flex: 1 1 140px;
    text-align: center;
  }
}

/* Head row */
.page-head{
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.page-head-right:empty{
  display: none;
}

.page-head-left{
  text-align: center;
  width: 100%;
}

.series-header{
  margin: 0;
  font-size: 2.0rem;
  letter-spacing: 0.2px;
}

.series-subtext{
  margin: 8px 0 0;
  opacity: 0.85;
  line-height: 1.35;
}

/* Page actions (Schedule/Standings/Results/Updates/Broadcast) */
/* Section headers */
.panel-head{
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin: 26px 0 14px;
}

.panel-head h2{
  margin: 0;
  font-weight: 900;
  letter-spacing: 0.2px;
}

.muted{
  opacity: 0.82;
}

/* Meta pills */
.latest-meta{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.meta-pill{
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  font-weight: 900;
  letter-spacing: 0.2px;
  background: rgba(0,0,0,0.30);
  border: 1px solid rgba(255,255,255,0.12);
}

.meta-pill.track{
  border-left: 4px solid var(--series-accent);
  padding-left: 8px;
}

/* Cards / panels */
.panel-card{
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 18px 45px rgba(0,0,0,0.45);
  overflow: hidden;
}

.panel-card.compact{
  padding: 14px;
}

/* Results table */
.table-wrap{
  overflow: auto;
}

.results-table{
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
}

.results-table thead th{
  text-align: left;
  padding: 14px 14px;
  font-weight: 900;
  letter-spacing: 0.25px;
  background: rgba(0,0,0,0.35);
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

.results-table tbody td{
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  vertical-align: middle;
}

.results-table tbody tr:hover{
  background: rgba(255,255,255,0.04);
}

/* Notes area */
.result-notes{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 14px;
  background: rgba(0,0,0,0.18);
  border-top: 1px solid rgba(255,255,255,0.08);
}

.note-block{
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  padding: 12px 12px;
}

.note-block h3{
  margin: 0 0 6px;
  font-weight: 900;
  letter-spacing: 0.2px;
}

.note-block p{
  margin: 0;
  line-height: 1.35;
}

/* Divider */
.section-break.series-divider{
  height: 3px;
  border-radius: 999px;
  margin: 24px 0 8px;
  background: linear-gradient(90deg, var(--series-accent), transparent);
}

/* Accordion */
.accordion{
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.accordion-item{
  width: 100%;
  text-align: left;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  color: #fff;
  border-radius: 12px;
  padding: 12px 12px;
  cursor: pointer;

  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.accordion-item:hover{
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.14);
}

.acc-left{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.acc-pill{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 900;
  background: rgba(0,0,0,0.30);
  border: 1px solid rgba(255,255,255,0.12);
  border-left: 4px solid var(--series-accent);
}

.acc-title{
  font-weight: 900;
  letter-spacing: 0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60vw;
}

.acc-right{
  font-weight: 900;
  opacity: 0.9;
}

.accordion-panel{
  margin-top: -6px;
}

/* Mobile */
@media (max-width: 860px){
  .result-notes{ grid-template-columns: 1fr; }
  .page-actions{ justify-content: flex-start; }
}
