/* ==========================
   Lineups section
   ========================== */

.thread-lineups-section {
  margin: 20px 0 26px;
}

.thread-lineups {
  border-radius: 12px;
  padding: 14px 18px 18px;
  border: 1px solid var(--border-subtle, #2b3440);
  background: radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.04), 
  transparent 55%), linear-gradient(135deg, rgba(0, 0, 0, 0.96) 0%,
   var(--accent-secondary-soft) 40%, rgba(0, 0, 0, 0.96) 100%);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.55);
}

.thread-lineups__header {
  margin-bottom: 10px;
}

.thread-lineups__header h2 {
  margin: 0;
  font-size: 1.1rem;
}

.thread-lineups__subtitle {
  margin: 2px 0 0;
  font-size: 0.82rem;
  opacity: 0.8;
}

/* Each lineup type (expected / final) row */

.thread-lineups__row + .thread-lineups__row {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.35);
}

.thread-lineups__row-header {
  margin-bottom: 6px;
}

.thread-lineups__type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: rgba(15, 23, 42, 0.85);
  text-transform: uppercase;
}

.thread-lineups__type-badge--expected {
  border-color: rgba(96, 165, 250, 0.85);
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.35);
}

.thread-lineups__type-badge--actual {
  border-color: rgba(52, 211, 153, 0.9);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.35);
}

/* Layout of teams within a row */

.thread-lineups__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 32px;
}

.thread-lineups__team {
  flex: 1 1 240px;
  min-width: 0; /* let long names wrap */
}

.thread-lineups__team-name {
  margin: 0 0 4px;
  font-size: 0.98rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.thread-lineups__team-pill {
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  font-size: 0.72rem;
  text-transform: uppercase;
  opacity: 0.9;
}

/* List of slots/players */

.thread-lineups__list {
  margin: 0;
  padding-left: 0;
  list-style: none;
  font-size: 0.86rem;
}

.thread-lineups__item + .thread-lineups__item {
  margin-top: 2px;
}

.thread-lineups__slot {
  display: inline-block;
  min-width: 130px;
  margin-right: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.8rem;
  opacity: 0.8;
}

.thread-lineups__player {
  font-weight: 500;
}

.thread-lineups__jersey {
  margin-left: 4px;
  font-size: 0.78rem;
  opacity: 0.9;
}

.thread-lineups__pos-code {
  margin-left: 4px;
  font-size: 0.78rem;
  opacity: 0.75;
}

/* Responsive tweaks */

@media (max-width: 700px) {
  .thread-lineups {
    padding: 12px 12px 16px;
  }

  .thread-lineups__slot {
    min-width: 0;
    display: block;
    margin-right: 0;
  }

  .thread-lineups__item {
    padding: 2px 0;
  }
}
/* ==========================
   Lineups section
   ========================== */

/* ==========================
   Lineups section
   ========================== */

.thread-lineups-section {
  margin: 24px 0 28px;
}

/* Outer shell: inherit background, just add structure */
.thread-lineups {
  margin: 0;
  padding: 14px 18px 18px;
  border-radius: 12px;
  border: 1px solid var(--border-subtle, rgba(148, 163, 184, 0.4));
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
}

.thread-lineups__header {
  margin-bottom: 10px;
}

.thread-lineups__header h2 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--text-main);
}

.thread-lineups__subtitle {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* One block per type: Expected / Final */
.thread-lineups__row {
  margin-top: 10px;
}

.thread-lineups__row-header {
  margin-bottom: 6px;
}

.thread-lineups__type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid var(--chip-border, rgba(148, 163, 184, 0.5));
  background-color: var(--chip-bg, rgba(15, 23, 42, 0.9));
  color: var(--text-muted);
}

.thread-lineups__type-badge--expected {
  border-color: var(--accent-secondary-soft, rgba(148, 163, 184, 0.7));
}

.thread-lineups__type-badge--actual {
  border-color: var(--accent-primary-border, rgba(15, 23, 42, 0.9));
}

/* Team columns (home/away) */

.thread-lineups__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
}

.thread-lineups__team {
  flex: 1 1 260px;
  min-width: 0;
}

.thread-lineups__team-name {
  margin: 0 0 4px;
  font-size: 0.98rem;
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: var(--text-main);
}

.thread-lineups__team-pill {
  font-size: 0.7rem;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
}

/* Subsections: Forwards / Defense / Goalies / Other */

.thread-lineups__section {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
}

.thread-lineups__section:first-of-type {
  border-top: none;
  padding-top: 0;
}

.thread-lineups__section-title {
  margin: 0 0 3px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

/* Tables */

.lineup-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  color: var(--text-main);
}

.lineup-table thead th {
  padding: 4px 6px;
  font-weight: 600;
  text-align: left;
  border-bottom: 1px solid rgba(148, 163, 184, 0.45);
  background-color: rgba(15, 23, 42, 0.75); /* dark band to pop against inherited bg */
}

.lineup-table tbody th,
.lineup-table tbody td {
  padding: 3px 6px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.9);
}

.lineup-table tbody th {
  font-weight: 500;
  width: 2.4rem;
  color: var(--text-muted);
}

.lineup-table tbody td {
  font-variant-numeric: tabular-nums;
}

/* Zebra striping – uses surface tokens so it plays nice with any team colors */
.lineup-table tbody tr:nth-child(odd) {
  background-color: rgba(11, 18, 32, 0.85); /* close to --bg-surface */
}

.lineup-table tbody tr:nth-child(even) {
  background-color: rgba(17, 24, 39, 0.78); /* close to --bg-surface-alt */
}

/* Slight hover to make rows feel interactive without screaming */
.lineup-table tbody tr:hover {
  background-color: var(--accent-secondary-soft, rgba(148, 163, 184, 0.18));
}

/* Extras list (fallback weird positions) */

.thread-lineups__extras-list {
  margin: 4px 0 0;
  padding-left: 16px;
  font-size: 0.8rem;
  color: var(--text-main);
}

.thread-lineups__extras-list li + li {
  margin-top: 2px;
}

.thread-lineups__slot {
  font-weight: 500;
  margin-right: 4px;
  color: var(--text-muted);
}

/* Responsive tweaks */

@media (max-width: 800px) {
  .thread-lineups {
    padding: 12px 12px 14px;
  }
}

@media (max-width: 600px) {
  .thread-lineups__grid {
    gap: 14px 0;
  }
}
