/* ============================================================
 * Live Lines — Component Styles
 * ============================================================
 * Reusable components: tier badges, pick rows, accordion bodies,
 * history timeline, other-books expander, filter pills, paywall.
 *
 * Tokens come from /css/tokens.css. No hardcoded hex values here.
 * ============================================================ */


/* ============================================================
 * PAGE FRAME
 * ============================================================ */

.ll-page {
  min-height: 100vh;
  background: var(--cream);
  color: var(--ink);
}

.ll-container {
  max-width: 920px;
  margin: 0 auto;
  padding: var(--space-4);
}

@media (min-width: 768px) {
  .ll-container {
    padding: var(--space-6) var(--space-8);
  }
}


/* ============================================================
 * HEADER
 * ============================================================ */

.ll-header {
  padding: var(--space-4) 0 var(--space-4);
  border-bottom: 1px solid var(--border);
}

.ll-eyebrow {
  font-size: var(--text-eyebrow);
  font-weight: var(--weight-semi);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rust);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.ll-eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--rust);
  animation: ll-pulse 1.6s ease-in-out infinite;
}

.ll-eyebrow-dot--static {
  background: var(--gold);
  animation: none;
}

@keyframes ll-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}


/* ============================================================
 * WEEK BAR (horizontal tab strip below the header)
 * ============================================================ */

.ll-week-bar {
  background: var(--cream-dark);
  border-bottom: 1px solid var(--border);
  margin: 0 calc(-1 * var(--space-4));
  padding: 0 var(--space-4);
  overflow-x: auto;
  scrollbar-width: none;
  white-space: nowrap;
}

.ll-week-bar::-webkit-scrollbar { display: none; }

@media (min-width: 768px) {
  .ll-week-bar {
    margin: 0;
    padding: 0;
  }
}

.ll-week-bar-inner {
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.ll-week-tab {
  font-family: var(--sans);
  font-size: var(--text-sm);
  font-weight: var(--weight-semi);
  color: var(--text-light);
  padding: var(--space-3) var(--space-4);
  cursor: pointer;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all var(--transition-fast);
}

.ll-week-tab:hover {
  color: var(--text-mid);
}

.ll-week-tab.active {
  color: var(--ink);
  border-bottom-color: var(--gold);
}

.ll-headline {
  font-family: var(--serif);
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--ink);
  margin: 0 0 var(--space-2) 0;
}

@media (min-width: 768px) {
  .ll-headline { font-size: var(--text-2xl); }
}

.ll-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  font-size: var(--text-base);
  color: var(--text-mid);
}

.ll-meta-refresh {
  color: var(--gold);
  font-weight: var(--weight-semi);
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: inherit;
}

.ll-meta-refresh:hover { color: var(--gold-light); }

/* The desktop puts refresh inline; mobile hides it */
@media (max-width: 767px) {
  .ll-meta-refresh { display: none; }
}


/* ============================================================
 * FILTER ROW
 * ============================================================ */

.ll-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding: var(--space-4) 0;
  background: var(--cream-dark);
  margin: 0 calc(-1 * var(--space-4));
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

@media (min-width: 768px) {
  .ll-filters {
    margin: 0;
    background: transparent;
    padding-left: 0;
    padding-right: 0;
  }
}

.ll-filter-label {
  font-size: var(--text-eyebrow);
  font-weight: var(--weight-semi);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mid);
  align-self: center;
  margin-right: var(--space-1);
}

.ll-filter-pill {
  font-family: var(--sans);
  font-size: var(--text-base);
  font-weight: var(--weight-semi);
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--ink);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: var(--transition-fast);
  line-height: 1.5;
}

.ll-filter-pill:hover {
  background: var(--cream-mid);
}

.ll-filter-pill[aria-pressed="true"] {
  background: var(--ink);
  color: var(--cream);
}


/* ============================================================
 * DAY BUCKETS
 * ============================================================ */

.ll-day {
  margin-top: var(--space-6);
}

.ll-day-header {
  font-family: var(--serif);
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--ink);
  margin: 0 0 var(--space-2) 0;
}

.ll-time-header {
  font-size: var(--text-eyebrow);
  font-weight: var(--weight-semi);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-light);
  margin: var(--space-3) 0 var(--space-1) 0;
}

.ll-time-header:first-of-type {
  margin-top: var(--space-1);
}


/* ============================================================
 * PICK ROWS (collapsed)
 * ============================================================ */

.ll-row {
  background: #FFFFFF;
  border: 0.5px solid var(--border);
  border-radius: 12px;
  margin-bottom: var(--space-2);
  overflow: hidden;
  transition: background var(--transition-base);
}

.ll-row--no-edge .ll-row-header {
  opacity: 0.85;
}

.ll-row--updated {
  background: var(--gold-pale);
}

.ll-row-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-4);
  cursor: pointer;
  width: 100%;
  background: transparent;
  border: none;
  text-align: left;
  font-family: inherit;
}

.ll-row-header:focus {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
}

.ll-row-content {
  flex: 1 1 auto;
  min-width: 0;
}

.ll-row-matchup {
  font-size: var(--text-base);
  font-weight: var(--weight-semi);
  color: var(--ink);
  line-height: 1.3;
  margin: 0 0 var(--space-1) 0;
}

.ll-row-pick {
  font-size: var(--text-base);
  color: var(--text-mid);
  line-height: 1.3;
}

.ll-row-pick-num {
  color: var(--ink);
  font-weight: var(--weight-bold);
}

.ll-row-chevron {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--text-mid);
  transition: transform var(--transition-base);
}

.ll-row[aria-expanded="true"] .ll-row-chevron {
  transform: rotate(180deg);
}


/* ============================================================
 * TIER BADGES
 * ============================================================ */

.ll-badge {
  width: 36px;
  height: 32px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-eyebrow);
  font-weight: var(--weight-bold);
  letter-spacing: 0.02em;
  border: 1px solid var(--ink);
  border-radius: var(--radius-sm);
}

.ll-badge--aplus {
  background: var(--gold);
  color: var(--cream);
}

.ll-badge--a {
  background: var(--silver);
  color: var(--ink);
}

.ll-badge--smart_money {
  background: var(--sage);
  color: var(--cream);
}

.ll-badge--goldilocks {
  background: var(--sage-mid);
  color: var(--ink);
}

.ll-badge--lottery {
  background: var(--rust);
  color: var(--cream);
}

.ll-badge--no_edge {
  background: transparent;
  color: var(--text-light);
  border-color: var(--border);
}


/* ============================================================
 * ACCORDION BODY
 * ============================================================ */

.ll-accordion {
  border-top: 1px solid var(--border);
  background: var(--cream-dark);
  padding: var(--space-4);
  display: none;
}

.ll-row[aria-expanded="true"] .ll-accordion {
  display: block;
}

.ll-accordion-section-label {
  font-size: var(--text-eyebrow);
  font-weight: var(--weight-semi);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mid);
  margin: 0 0 var(--space-3) 0;
}


/* ============================================================
 * HISTORY TIMELINE
 * ============================================================ */

.ll-history {
  position: relative;
  padding-left: var(--space-6);
  margin-bottom: var(--space-4);
}

.ll-history::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 7px;
  width: 1px;
  background: var(--border);
}

.ll-event {
  position: relative;
  margin-bottom: var(--space-4);
}

.ll-event:last-child {
  margin-bottom: 0;
}

.ll-event-dot {
  position: absolute;
  left: calc(-1 * var(--space-6) + 3px);
  top: 4px;
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--gold);
}

.ll-event-icon {
  position: absolute;
  left: calc(-1 * var(--space-6));
  top: 0;
  width: 14px;
  height: 14px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 9px;
  line-height: 1;
}

.ll-event-icon--up   { background: var(--sage); }
.ll-event-icon--down { background: var(--rust); }

.ll-event-title {
  font-size: var(--text-base);
  color: var(--ink);
  line-height: 1.4;
}

.ll-event-title strong {
  font-weight: var(--weight-bold);
}

.ll-event-sub {
  font-size: var(--text-sm);
  color: var(--text-mid);
  line-height: 1.4;
  margin-top: 2px;
}

.ll-event-sub--up   { color: var(--sage); }
.ll-event-sub--down { color: var(--rust); }

.ll-event-time {
  font-size: var(--text-sm);
  color: var(--text-light);
  margin-top: 2px;
}


/* ============================================================
 * OTHER BOOKS EXPANDER
 * ============================================================ */

.ll-other-books {
  border-top: 0.5px solid var(--cream-mid);
  padding-top: var(--space-3);
  margin-bottom: var(--space-4);
}

.ll-other-books-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  width: 100%;
  font-family: inherit;
  color: inherit;
  text-align: left;
  -webkit-appearance: none;
  appearance: none;
}

.ll-other-books-header:focus {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.ll-other-books-chevron {
  width: 14px;
  height: 14px;
  color: var(--text-mid);
  transition: transform var(--transition-base);
}

.ll-book-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 0.5px solid var(--cream-mid);
  color: var(--ink);
  text-decoration: none;
}

.ll-book-row:last-child {
  border-bottom: none;
}

.ll-book-row:hover {
  background: var(--cream);
  margin: 0 calc(-1 * var(--space-2));
  padding-left: var(--space-2);
  padding-right: var(--space-2);
}

.ll-book-name {
  font-size: var(--text-base);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
}

.ll-book-name-icon {
  width: 12px;
  height: 12px;
  color: var(--text-light);
}

.ll-book-line {
  font-size: var(--text-base);
  font-weight: var(--weight-semi);
  color: var(--ink);
}

.ll-book-delta--worse  { color: var(--rust); font-weight: var(--weight-regular); font-size: var(--text-base); }
.ll-book-delta--match  { color: var(--text-light); font-weight: var(--weight-regular); font-size: var(--text-base); }
.ll-book-delta--better { color: var(--sage); font-weight: var(--weight-regular); font-size: var(--text-base); }


/* ============================================================
 * BET BUTTON + GAME LINK
 * ============================================================ */

.ll-bet-button {
  display: block;
  width: 100%;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--sans);
  font-size: var(--text-base);
  font-weight: var(--weight-semi);
  text-align: center;
  text-decoration: none;
  padding: var(--space-3) var(--space-4);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
}

.ll-bet-button:hover {
  background: var(--text-mid);
}

.ll-game-link {
  display: block;
  width: 100%;
  text-align: center;
  font-size: var(--text-base);
  font-weight: var(--weight-semi);
  color: var(--gold);
  text-decoration: none;
  padding: var(--space-3);
  margin-top: var(--space-2);
}

.ll-game-link:hover {
  color: var(--gold-light);
}


/* ============================================================
 * EMPTY STATE
 * ============================================================ */

.ll-empty {
  text-align: center;
  padding: var(--space-8) 0;
}

.ll-empty-card {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  margin: var(--space-6) 0;
}

.ll-empty-label {
  font-size: var(--text-eyebrow);
  font-weight: var(--weight-semi);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mid);
  margin-bottom: var(--space-2);
}

.ll-empty-countdown {
  font-family: var(--serif);
  font-style: italic;
  font-weight: var(--weight-bold);
  color: var(--gold);
  font-size: var(--text-3xl);
  line-height: 1.2;
  margin: var(--space-2) 0;
}

.ll-empty-date {
  font-size: var(--text-sm);
  color: var(--text-mid);
}

.ll-empty-message {
  font-size: var(--text-md);
  color: var(--text-mid);
  margin: var(--space-4) 0;
}

.ll-empty-message strong {
  color: var(--ink);
  font-weight: var(--weight-bold);
}

.ll-empty-ctas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin: var(--space-4) 0;
}

.ll-empty-cta {
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  text-decoration: none;
  color: var(--ink);
  transition: var(--transition-fast);
}

.ll-empty-cta:hover {
  background: var(--cream-dark);
}

.ll-empty-cta-label {
  font-size: var(--text-eyebrow);
  font-weight: var(--weight-semi);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--space-1);
}

.ll-empty-cta-body {
  font-size: var(--text-sm);
  color: var(--text-mid);
  line-height: 1.4;
}

.ll-empty-footer {
  font-size: var(--text-sm);
  color: var(--text-light);
  margin-top: var(--space-6);
}


/* ============================================================
 * LOADING SKELETON
 * ============================================================ */

@keyframes ll-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.ll-skeleton {
  background: linear-gradient(
    90deg,
    var(--cream-mid) 0%,
    var(--border) 50%,
    var(--cream-mid) 100%
  );
  background-size: 200% 100%;
  animation: ll-shimmer 1.8s infinite;
  border-radius: var(--radius-sm);
  display: inline-block;
}

.ll-skeleton--meta { width: 60%; height: 14px; }
.ll-skeleton--day  { width: 40%; height: 18px; margin-bottom: var(--space-2); }
.ll-skeleton--time { width: 25%; height: 11px; margin-bottom: var(--space-2); }

.ll-row-skeleton {
  background: #FFFFFF;
  border: 0.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-2);
}

.ll-skeleton--badge   { width: 36px; height: 22px; }
.ll-skeleton--line-a  { width: 65%; height: 14px; margin-bottom: 6px; }
.ll-skeleton--line-b  { width: 50%; height: 12px; }


/* ============================================================
 * PAYWALL STATE
 * ============================================================ */

.ll-paywall {
  position: relative;
}

.ll-paywall-header {
  padding: var(--space-4) 0 var(--space-3);
}

.ll-paywall-eyebrow {
  font-size: var(--text-eyebrow);
  font-weight: var(--weight-semi);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.ll-paywall-eyebrow::before {
  content: "•";
  color: var(--rust);
}

.ll-paywall-headline {
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1.15;
  margin: 0 0 var(--space-4) 0;
}

.ll-paywall-headline-1 {
  color: var(--ink);
  font-weight: var(--weight-bold);
  display: block;
}

.ll-paywall-headline-2 {
  color: var(--gold);
  font-style: italic;
  font-weight: var(--weight-bold);
  display: block;
}

.ll-paywall-body {
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.6;
  margin-bottom: var(--space-4);
}

.ll-paywall-body strong {
  color: var(--ink);
  font-weight: var(--weight-bold);
}

.ll-paywall-blur {
  position: relative;
  margin-bottom: var(--space-6);
  pointer-events: none;
  user-select: none;
}

.ll-paywall-blur .ll-row { pointer-events: none; }
.ll-paywall-blur .ll-row:nth-child(1) { filter: blur(5px);   opacity: 0.55; }
.ll-paywall-blur .ll-row:nth-child(2) { filter: blur(6.5px); opacity: 0.5;  }
.ll-paywall-blur .ll-row:nth-child(3) { filter: blur(8px);   opacity: 0.45; }
.ll-paywall-blur .ll-row:nth-child(n+4) { filter: blur(10px); opacity: 0.4; }

.ll-paywall-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 220px;
  background: linear-gradient(180deg, transparent 0%, var(--cream) 100%);
  pointer-events: none;
}

.ll-paywall-card {
  position: relative;
  margin-top: -40px;
  background: var(--ink);
  color: var(--cream);
  border-radius: var(--radius-md);
  padding: var(--space-6);
}

.ll-paywall-card-headline {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: var(--weight-bold);
  color: var(--cream);
  line-height: 1.3;
  margin: 0 0 var(--space-3) 0;
}

.ll-paywall-card-subhead {
  font-size: var(--text-base);
  color: var(--text-light);
  margin: 0 0 var(--space-5) 0;
}

.ll-paywall-plans {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

@media (min-width: 540px) {
  .ll-paywall-plans { grid-template-columns: 1fr 1fr 1fr; }
}

.ll-paywall-plan {
  background: transparent;
  border: 1px solid var(--text-light);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  text-align: center;
}

.ll-paywall-plan--featured {
  border-color: var(--gold);
  position: relative;
}

.ll-paywall-plan-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: var(--ink);
  font-size: var(--text-eyebrow);
  font-weight: var(--weight-bold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 2px var(--space-2);
  border-radius: var(--radius-sm);
}

.ll-paywall-plan-name {
  font-size: var(--text-base);
  font-weight: var(--weight-semi);
  color: var(--cream);
  margin-bottom: var(--space-1);
}

.ll-paywall-plan-price {
  font-family: 'JetBrains Mono', monospace;
  font-size: var(--text-base);
  color: var(--cream);
  line-height: 1.4;
}

.ll-paywall-plan-release {
  display: block;
  color: var(--gold);
  font-size: var(--text-sm);
}

.ll-paywall-cta {
  display: block;
  width: 100%;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
  text-align: center;
  text-decoration: none;
  padding: var(--space-3) var(--space-4);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
}

.ll-paywall-cta:hover { background: var(--gold-light); }

.ll-paywall-footer {
  font-size: var(--text-sm);
  color: var(--text-light);
  text-align: center;
  margin-top: var(--space-3);
}

.ll-paywall-after {
  padding: var(--space-6) 0;
  text-align: center;
}

.ll-paywall-after-eyebrow {
  font-size: var(--text-eyebrow);
  font-weight: var(--weight-semi);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-mid);
  margin-bottom: var(--space-2);
}

.ll-paywall-after-body {
  font-size: var(--text-md);
  color: var(--text-mid);
  margin-bottom: var(--space-4);
}

.ll-paywall-after-link {
  color: var(--gold);
  font-weight: var(--weight-semi);
  text-decoration: none;
}
