/* === Table Styles === */

.table-wrapper {
  overflow-x: auto;
  width: 100%;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

h3 {
  margin-bottom: 6px;
}

.odds-table {
  table-layout: auto;
  width: auto;
  min-width: 1000px;
  border-collapse: separate;
  font-size: 11px;
  background-color: #fff;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin: 8px 0 8px;
  outline: 1px solid #ddd;
  border-spacing: 0;
}

.odds-table.auto-layout {
  table-layout: auto !important;
}

td,
th {
  padding: 2px 4px;
  text-align: center;
  border: 1px solid #ccc;
  white-space: nowrap;
  vertical-align: middle;
}

th {
  background-color: #f1f1f1;
  font-weight: bold;
  font-size: 12px;
}

th.matchup-header {
  vertical-align: middle;
  text-align: center;
}

.matchup-name {
  text-align: left;
  padding: 2px;
}
.matchup-header,
.matchup-name {
  max-width: 180px;
  min-width: 150px;
  width: 18%;
  white-space: normal;
  word-break: break-word;
}

.matchup-name div {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: .5px 0;
}

.bookmaker-header {
  font-weight: bold;
  font-size: 12px;
  text-align: center;
  vertical-align: middle;
  width: 180px;
  max-width: 180px;
  min-width: 150px;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.event-time {
  vertical-align: middle;
  max-width: 80px;
  min-width: 60px;
  width: 8%;
  text-align: center;
  white-space: normal;
  padding: 2px;
  font-size: 11px;
}

/* …remove this block if unused… */
.odds-separator {
  border: none;
  border-top: 0.5px dashed #bbb;
  height: .5px;
  background-color: transparent;
  margin: .5px 0;
  width: 100%;
  opacity: 0.3;
}

.separator {
  font-weight: normal;
  color: #666;
  line-height: 1;
}

.team-logo {
  width: 14px;
  height: 14px;
}

.team-name {
  font-size: 11px;
  font-weight: bold;
  white-space: nowrap;
  gap: 2px;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.odds-per-team {
  /* Two-row grid, no gaps, fills the td */
  display: grid;                /* CHANGED: grid instead of flex */
  grid-template-rows: minmax(0,1fr) minmax(0,1fr); /* ← tighter, no fractional gaps */
  gap: 0;                       /* CHANGED: was 2px (caused white band) */
  align-items: stretch;
  justify-items: stretch;
  text-align: center;
  height: 100%;
  width: 100%;
  font-size: 11px;
}

.team-odds {
  display: flex;                /* CHANGED: flex for easy centering */
  align-items: center;          /* vertical center */
  justify-content: center;      /* horizontal center */
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  line-height: 1;
  padding: 2px 0;               /* small internal pad for legibility */
  margin: 0;
  text-align: center;
  font-size: 11px;
  transition: background-color 0.2s ease;
}

/* Draw the split line without extra whitespace */
.odds-per-team {
  position: relative;                 /* new */
}

.odds-per-team .team-odds:first-child {
  border-bottom: none;                /* moved to overlay */
}

.odds-per-team::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  transform: translateY(-0.5px);   /* snap the 1px line to the pixel grid */
  height: 0;
  border-top: 0.5px dashed rgba(187,187,187,0.6);
  pointer-events: none;
  z-index: 1;                         /* appear above backgrounds */
}

.team-odds {                          /* ensure text sits truly centered */
  position: relative;
  z-index: 0;
  min-height: 18px;                   /* gives each half real space to center */
  /* keep your existing flex centering rules here */
}

.team-odds:last-child {
  border-bottom: none;
}

.matchup-row {
  border-bottom: 1px solid #ddd;
}

.suggested-row {
  border-bottom: 2px solid #ccc;
}

.matchup-row:hover {
  background-color: #aaceff;
  cursor: pointer;
}

.bookmaker-highlight {
  background-color: #d7edff !important;
  transition: background-color 0.2s ease;
}

.matchup-row.highlighted {
  background-color: #ffe6cc !important;
  border-left: 4px solid #fff067;
}

.event-started {
  background-color: #fcabab;
  border-left: 4px solid #ff4444;
}

.event-final {
  background-color: #c7c7c7;
  color: #000000;
  border-left: 4px solid #5a00c03f;
}

td.spread,
td.overunder,
td.moneyline,
th.spread,
th.overunder,
th.moneyline {
  width: 60px;
  max-width: 70px;
  min-width: 50px;
  /* Remove inner rim so heatmaps can reach the td border */
  padding: 0;                      /* CHANGED: was 1px 2px */
  font-size: 11px;
  text-align: center;
  white-space: nowrap;
  font-weight: normal;
  justify-content: center;
  align-items: center;
}

/* === Sticky columns (scoped to odds-sticky) === */
.odds-table.odds-sticky {
  table-layout: fixed;
  width: max-content;        /* size to the sum of defined column widths */
  min-width: calc(var(--col1-w) + var(--col2-w) + var(--col3-w)); /* never smaller than the 3 frozen cols */
  border-collapse: separate;
  border-spacing: 0;
  /* Tunable widths for the frozen columns — aligned to your legacy caps */
  --col1-w: 170px;  /* Matchup (max-width used - ~190x would cover longest team names) */
  --col2-w: 30px;   /* $ (unchanged) */
  --col3-w: 71px;   /* Event Time (max-width used) */
}

/* Column widths for the first 3 columns */
.odds-table.odds-sticky th.matchup-header,
.odds-table.odds-sticky td.matchup-name {
  min-width: var(--col1-w);
  width: var(--col1-w);
  box-sizing: border-box;
}
.odds-table.odds-sticky th.suggested-wager-header,
.odds-table.odds-sticky td.suggested-wager-cell {
  min-width: var(--col2-w);
  width: var(--col2-w);
  text-align: center;
  box-sizing: border-box;
}
.odds-table.odds-sticky th.event-time,
.odds-table.odds-sticky td.event-time {
  min-width: var(--col3-w);
  width: var(--col3-w);
  box-sizing: border-box;
}

/* Freeze first 3 body columns */
.odds-table.odds-sticky td.matchup-name {
  position: sticky; left: 0; z-index: 15; background: #fff; /* solid mask */
}
.odds-table.odds-sticky td.suggested-wager-cell {
  position: sticky; left: var(--col1-w); z-index: 15; background: #fff;
}
.odds-table.odds-sticky td.event-time {
  position: sticky; left: calc(var(--col1-w) + var(--col2-w)); z-index: 15; background: #fff;
}

/* Stick ONLY the first-row headers for those 3 columns */
.odds-table.odds-sticky thead tr:first-child > th.matchup-header {
  position: sticky; left: 0; z-index: 5; background: #f1f1f1;
}
.odds-table.odds-sticky thead tr:first-child > th.suggested-wager-header {
  position: sticky; left: var(--col1-w); z-index: 5; background: #f1f1f1;
}
.odds-table.odds-sticky thead tr:first-child > th.event-time {
  position: sticky; left: calc(var(--col1-w) + var(--col2-w)); z-index: 5; background: #f1f1f1;
}

/* Ensure bookmaker headers & the second header row DO NOT stick */
.odds-table.odds-sticky thead tr:first-child > th.bookmaker-header,
.odds-table.odds-sticky thead tr:nth-child(2) > th {
  position: static !important;
  left: auto !important;
  z-index: 1 !important;
  background: #f1f1f1;
}

/* Sticky suggested row: keep text visible within frozen area */
.odds-table.odds-sticky tr.suggested-row > td.suggested-left {
  position: sticky;
  left: 0;
  z-index: 16; /* above the sticky body cells */
  min-width: calc(var(--col1-w) + var(--col2-w) + var(--col3-w));
  width: calc(var(--col1-w) + var(--col2-w) + var(--col3-w));
  max-width: calc(var(--col1-w) + var(--col2-w) + var(--col3-w)); /* NEW: hard cap so it never expands */
  background: #eaffea; /* full-row green */
  box-sizing: border-box;
  contain: size;       /* prevents content from resizing columns/table */
  overflow: visible;   /* allow visual overflow across the grid */
  box-shadow: none; /* if any */
}

/* Bolder vertical divider after the 3rd sticky column (no layout shift) */
.odds-table.odds-sticky td.event-time,
.odds-table.odds-sticky thead tr:first-child > th.event-time {
  box-shadow: 1px 0 0 rgba(0,0,0,0.22); /* subtle divider, no layout shift */
}

/* Make sticky cells adopt the row’s background in stateful cases */
.odds-table.odds-sticky tr.matchup-row:hover td.matchup-name,
.odds-table.odds-sticky tr.matchup-row:hover td.suggested-wager-cell,
.odds-table.odds-sticky tr.matchup-row:hover td.event-time,
.odds-table.odds-sticky tr.matchup-row.highlighted td.matchup-name,
.odds-table.odds-sticky tr.matchup-row.highlighted td.suggested-wager-cell,
.odds-table.odds-sticky tr.matchup-row.highlighted td.event-time,
.odds-table.odds-sticky tr.matchup-row.event-started td.matchup-name,
.odds-table.odds-sticky tr.matchup-row.event-started td.suggested-wager-cell,
.odds-table.odds-sticky tr.matchup-row.event-started td.event-time,
.odds-table.odds-sticky tr.matchup-row.event-final td.matchup-name,
.odds-table.odds-sticky tr.matchup-row.event-final td.suggested-wager-cell,
.odds-table.odds-sticky tr.matchup-row.event-final td.event-time {
  background: inherit !important;
}

/* === Confidence color tokens for the $ icon === */
/* Palette per Keith: gold = High, green = Medium, yellow = Low; Max = glossy black */

.suggested-wager-circle.lit.conf-max{
  /* glossy black + thicker presence + animated sheen */
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0) 55%),
    linear-gradient(180deg, #2c2c2c 0%, #000000 100%);
  color:#fff;
  border-color:#000;
  box-shadow:
    0 0 0 2px rgba(0,0,0,0.45),
    0 0 14px rgba(0,0,0,0.55),
    0 0 24px rgba(0,0,0,0.35);
  transform: scale(1.14); /* slightly bigger than others */
  position: relative;
  overflow: hidden; /* for the sheen effect */
}
.suggested-wager-circle.lit.conf-max::after{
  content:"";
  position:absolute;
  top:-40%;
  left:-60%;
  width:220%;
  height:180%;
  background: linear-gradient(75deg, rgba(255,255,255,0.00) 35%, rgba(255,255,255,0.20) 50%, rgba(255,255,255,0.00) 65%);
  transform: rotate(-8deg);
  animation: maxSheen 2.8s linear infinite;
  pointer-events:none;
}
@keyframes maxSheen{
  0%   { transform: translateX(-30%) rotate(-8deg); }
  100% { transform: translateX(30%)  rotate(-8deg); }
}

.suggested-wager-circle.lit.conf-high {
  background: linear-gradient(180deg, #FFD700 0%, #C89200 100%);
  color: #111; /* visible $ */
  border-color: #7A5C00;
  box-shadow:
    0 0 0 2px rgba(255, 215, 0, 0.35),
    0 0 12px rgba(200, 146, 0, 0.55);
}

.suggested-wager-circle.lit.conf-medium {
  background: #4bb61a;   /* green */
  color: #FFF59D;
  border-color: #afafaf;
}

.suggested-wager-circle.lit.conf-low {
  background: #FFF59D;   /* yellow */
  color: #4bb61a;   /* $ color */
  border-color: #afafaf;
}

/* Optional: subtle hover ring without changing base colors */
.suggested-wager-circle.lit.conf-max:hover,
.suggested-wager-circle.lit.conf-high:hover,
.suggested-wager-circle.lit.conf-medium:hover,
.suggested-wager-circle.lit.conf-low:hover {
  box-shadow: 0 0 0 3px rgba(0,0,0,0.08);
}

/* === Confidence badges in expanded suggestion rows === */
.conf-badge{
  display:inline-block;
  padding:2px 6px;
  font-size:12px;
  line-height:1;
  border-radius:999px;
  font-weight:600;
  vertical-align:middle;
  border:1px solid transparent;
}
.conf-badge.conf-max{
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.16) 0%, rgba(255,255,255,0) 55%),
    linear-gradient(180deg, #2c2c2c 0%, #000000 100%);
  color:#fff;
  border:1px solid #000;
  box-shadow:
    0 0 0 2px rgba(0,0,0,0.35),
    0 0 10px rgba(0,0,0,0.45);
}
.conf-badge.conf-high{
  background: linear-gradient(180deg, #FFD700 0%, #C89200 100%);
  color:#111;
  border-color:#7A5C00;
  box-shadow:
    0 0 0 1px rgba(255,215,0,0.35),
    0 0 8px rgba(200,146,0,0.45);
}
.conf-badge.conf-medium{background:#4bb61a; color:#e4e4e4; border-color:#128246; }
.conf-badge.conf-low{ background:#FFF3B0; color:#4bb61a; border-color:#128246; }

/* Lock the three frozen column widths */
.odds-table.odds-sticky th.matchup-header,
.odds-table.odds-sticky td.matchup-name { max-width: var(--col1-w); }

.odds-table.odds-sticky th.suggested-wager-header,
.odds-table.odds-sticky td.suggested-wager-cell { max-width: var(--col2-w); }

.odds-table.odds-sticky th.event-time,
.odds-table.odds-sticky td.event-time { max-width: var(--col3-w); }

/* Keep expanded text from influencing column sizing — but allow overlay past col 3 */
.odds-table.odds-sticky tr.suggested-row > td.suggested-left { 
  overflow: visible;                 /* <— allow the lines to extend across the table */
}
.odds-table.odds-sticky tr.suggested-row > td.suggested-left .suggested-wager-text {
  display: grid;
  max-width: none;                   /* no intrinsic cap; overlay can extend rightward */
  overflow: visible;
  white-space: normal;               /* each .s-line controls its own wrapping */
  position: relative;                /* NEW: create stacking context */
  z-index: 20;                       /* NEW: paint above the scrolling columns */
}
.odds-table.odds-sticky tr.suggested-row > td.suggested-left .suggested-wager-block {
  display: block;                    /* stack blocks vertically if multiple suggestions */
  max-width: none;
}

/* Single-line fields inside expanded suggestion; each line stays on one row */
.odds-table.odds-sticky tr.suggested-row .s-line { 
  white-space: nowrap;
}
.odds-table.odds-sticky tr.suggested-row .s-label {
  font-weight: 600;
  margin-right: 6px;
  padding: 4px;
}

/* Keep logo + team/value stuck together nicely */
.odds-table.odds-sticky tr.suggested-row .s-team {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-weight: bold;
  font-size: 13px;
}
.odds-table.odds-sticky tr.suggested-row .s-team .team-logo {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
}

/* Underline utility for labels that need emphasis */
.odds-table.odds-sticky tr.suggested-row .s-underline {
  text-decoration: underline;
  text-underline-offset: 2px;
  font-size: 13px;
}

/* NEW: full-row green background overlay (no right <td> needed) */
.odds-table.odds-sticky tr.suggested-row > td.suggested-left .sw-bg {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 600%;
  /*width: 200vw;*/        /* comfortably spans past all bookmaker columns */
  background: #eaffea; /* same green as the row */
  z-index: 18;         /* sits over the Event Time cell (z-index 15) but under the text (20) */
  pointer-events: none;
}
