/* lottery_hub.css — /lottery. Builds on stats_hub.css.
   Every row is drawn in its team's color, like the original lottery page.
   Each row sets --team (team color) and --on (text color that reads on it). */

.lt-headbar { margin-bottom: 14px; }
.lt-mark { color: #B42318; font-weight: 700; margin-left: 1px; }

/* ---------- toolbar ---------- */
.lt-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 16px; margin: 0 auto 20px; max-width: 1180px; }
.lt-toolbar .lt-tb-r { justify-self: start; }
.lt-toolbar .lt-sim { background: var(--gold); color: var(--navy); border: 0; border-radius: 6px; padding: 10px 28px; font-family: var(--cond); font-size: 21px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; box-shadow: 0 2px 0 #B9821A; }
.lt-toolbar .lt-sim:hover { background: #F2B53A; }
.lt-toolbar .lt-sim:active { transform: translateY(1px); box-shadow: 0 1px 0 #B9821A; }
.lt-toolbar .lt-sim:disabled { opacity: .55; cursor: default; transform: none; }
.lt-toolbar .lt-reset { border: 2px solid var(--navy); background: #fff; color: var(--navy); border-radius: 6px; padding: 8px 20px; font-family: var(--cond); font-size: 19px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.lt-toolbar .lt-reset:hover { background: var(--navy); color: #fff; }

/* ---------- list + shared row grid ---------- */
.lt-list, .lt-roundbar, .lt-oddsec, .lt-notes { max-width: 1180px; margin-left: auto; margin-right: auto; }
.lt-row {
  position: relative; display: grid; align-items: center; column-gap: 16px;
  grid-template-columns: 72px 50px minmax(0, 1.1fr) minmax(0, 1fr) 300px 112px 26px;
  grid-template-areas: "pk logo team pro odds flags meta";
  padding: 10px 14px 10px 0; min-height: 76px;
}
.lt-row > .lt-pk { grid-area: pk; }
.lt-row > .lg { grid-area: logo; justify-self: center; }
.lt-row > .lt-team { grid-area: team; }
.lt-row > .lt-prospect { grid-area: pro; }
.lt-row > .lt-odds { grid-area: odds; }
.lt-row > .lt-flags { grid-area: flags; }
.lt-row > .lt-meta { grid-area: meta; }
.lt-row > .lt-detail { grid-column: 3 / -1; }

.lt-pk { font-family: var(--cond); font-weight: 700; font-size: 34px; line-height: 1; text-align: center; font-variant-numeric: tabular-nums; display: flex; align-items: flex-start; justify-content: center; gap: 3px; }
.lt-mv { font-family: var(--text); font-size: 12.5px; font-weight: 800; line-height: 1; margin-top: 2px; letter-spacing: .02em; text-shadow: 0 1px 2px rgba(0,0,0,.55); }
.lt-mv.up { color: #4ADE80; }
.lt-mv.down { color: #FF7070; }
.lt-row > .lg { width: 48px; height: 48px; object-fit: contain; filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); }
.lg.none { display: inline-block; width: 48px; height: 48px; }
.lg.sm { width: 18px; height: 18px; object-fit: contain; vertical-align: -4px; }
.lt-heat img.lg.on-dark, .lt-notes img.lg.on-dark { background: var(--navy-2); border-radius: 50%; padding: 1px; }

.lt-team { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.lt-team b { font-family: var(--cond); font-weight: 700; font-size: 23px; letter-spacing: .005em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lt-team small { font-size: 13px; margin-top: 2px; font-variant-numeric: tabular-nums; white-space: pre; }
.lt-flags { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
.lt-flag { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; line-height: 1.15; white-space: nowrap; }
.lt-flag .dots { display: inline-flex; gap: 3px; }
.lt-flag .dots i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.lt-flag.grp, .lt-flag.no { padding: 2px 6px; border-radius: 3px; font-size: 10.5px; }
.lt-flag.grp { border: 1px solid color-mix(in srgb, var(--on) 55%, transparent); }
.lt-flag.grp.rel { background: var(--gold); border-color: var(--gold); color: #3A2600; }
.lt-flag.no { background: #fff; color: #B42318; }
.lt-flag .lg.xs { width: 16px; height: 16px; object-fit: contain; filter: drop-shadow(0 1px 1px rgba(0,0,0,.35)); }

.lt-prospect { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; padding-left: 16px; border-left: 1px solid transparent; }
.lt-prospect .nm { font-family: var(--cond); font-weight: 600; font-size: 21px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.hub .lt-prospect .nm a { color: inherit; }
.lt-prospect .sub { font-size: 12.5px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.lt-odds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.lt-odds .o { text-align: center; padding: 6px 4px 5px; border-radius: 6px; }
.lt-odds .o small { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.lt-odds .o b { display: block; font-family: var(--cond); font-weight: 700; font-size: 23px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.lt-odds .o .x { opacity: .55; }

.lt-meta { display: flex; justify-content: flex-end; }
.lt-info { width: 24px; height: 24px; border-radius: 50%; border: 0; font-weight: 700; font-size: 13px; font-style: italic; font-family: Georgia, serif; cursor: pointer; padding: 0; }
.lt-detail { font-size: 13px; padding: 8px 12px; margin-top: 8px; border-radius: 6px; }

/* late picks (17–30) and round 2: no odds, tighter */
.lt-row.late { min-height: 54px; padding-top: 6px; padding-bottom: 6px; }
.lt-row.late .lt-pk { font-size: 25px; }
.lt-row.late > .lg, .lt-row.late > .lg.none { width: 36px; height: 36px; }
.lt-row.late .lt-team b { font-size: 19px; }
.lt-row.late .lt-prospect .nm { font-size: 18px; margin-top: 0; }
.lt-list.r2list .lt-row { grid-template-columns: 58px 50px minmax(0, 1fr) 112px 26px; grid-template-areas: "pk logo team flags meta"; }

/* section headers */
.lt-sep { display: flex; align-items: baseline; gap: 10px; }
.lt-sep b { font-family: var(--cond); font-weight: 700; font-size: 22px; color: var(--navy); }
.lt-sep span { color: var(--muted); font-size: 13px; }

@keyframes lt-tick { from { transform: translateY(-60%); opacity: .2; } to { transform: none; opacity: 1; } }

/* ======================================================================
   Team-color rows
   ====================================================================== */
.lt-list { display: flex; flex-direction: column; gap: 4px; }
.lt-sep { margin: 18px 0 6px; padding: 0 2px; }
.lt-sep:first-child { margin-top: 0; }
.lt-row {
  background-color: var(--team); color: var(--on); border-radius: 7px;
  background-image: linear-gradient(90deg, rgba(255,255,255,.07) 0%, rgba(255,255,255,0) 45%, rgba(0,0,0,.16) 100%);
  box-shadow: 0 1px 2px rgba(23,33,43,.18);
}
.lt-team small, .lt-prospect .sub { opacity: .82; }
.lt-prospect { border-left-color: color-mix(in srgb, var(--on) 28%, transparent); }
.lt-odds .o { background: color-mix(in srgb, var(--on) 13%, transparent); }
.lt-odds .o.one { background: color-mix(in srgb, var(--on) 22%, transparent); }
.lt-odds .o small { opacity: .78; }
.lt-info { background: color-mix(in srgb, var(--on) 20%, transparent); color: inherit; }
.lt-info[aria-expanded="true"] { background: var(--on); color: var(--team); }
.lt-detail { background: color-mix(in srgb, #000 22%, transparent); }
.lt-row.late { border-radius: 6px; }
/* Scaled phone/tablet cards (lottery_hub.js adds .lt-fit): edge to edge, and a bit taller. */
.lt-list.lt-fit { max-width: none; }
/* iPhone Safari enlarges text inside blocks wider than the screen ("text autosizing"). The cards are laid out
   1080px wide and scaled down, so without this their small labels grow and spill into the next column. */
.lt-list, .lt-list * { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
.lt-list.lt-fit .lt-row { min-height: 96px; padding-top: 15px; padding-bottom: 15px; border-radius: 0; }
.lt-list.lt-fit .lt-row.late { min-height: 68px; padding-top: 10px; padding-bottom: 10px; }
.lt-list.lt-fit .lt-sep { padding-left: 28px; }


/* ---------- below the order: round toggle + odds + notes ---------- */
.lt-roundbar { display: flex; justify-content: center; margin-top: 18px; margin-bottom: 4px; }
.lt-oddsec { margin-top: 8px; }
.lt-h3 { font-family: var(--cond); font-size: 26px; margin: 22px 0 8px; color: var(--navy); }
.lt-intro { color: var(--muted); font-size: 14px; margin: 0 0 10px; max-width: 95ch; }
.lt-rule { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.lt-heat-wrap { max-height: none; border-radius: 8px; }
.lt-rule + .lt-heat-wrap { margin-top: 16px; }
.lt-heat td.hm { text-align: center; font-size: 12px; min-width: 40px; }
.lt-heat td.hm.empty { background: transparent; }
.lt-heat tbody tr:nth-child(even) td.hm.empty { background: var(--row-alt); }
.lt-heat td.pk { text-align: center; font-family: var(--cond); font-weight: 700; font-size: 17px; }
.lt-heat td.tm { display: flex; align-items: center; gap: 6px; min-width: 150px; }
.lt-heat td.tm small { color: var(--muted); font-size: 11.5px; }
.lt-heat td.avg { font-weight: 700; }
.lt-heat thead th { text-align: center; }

.lt-notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 22px; align-items: start; }
.lt-notes section { background: var(--card); border: 1px solid var(--rule); border-radius: 8px; padding: 14px 16px; }
.lt-notes h3 { font-family: var(--cond); font-size: 24px; margin: 0 0 10px; color: var(--navy); }
.lt-notes ul { margin: 0; padding: 0; list-style: none; font-size: 13.5px; }
.lt-notes li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 10px; padding: 7px 0; border-top: 1px solid var(--rule-soft); }
.lt-notes li:first-child { border-top: 0; padding-top: 0; }
.lt-notes ul.plain li { display: block; }
.lt-notes section.rights { grid-column: 1 / -1; }
.lt-notes section.rights ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
.lt-notes section.rights li:nth-child(2) { border-top: 0; padding-top: 0; }
.lt-notes .nb { align-self: start; text-align: center; background: var(--navy); color: #fff; font-family: var(--cond); font-weight: 700; font-size: 15px; border-radius: 4px; padding: 2px 0; }
.lt-notes .ft { display: block; font-weight: 600; }
.lt-notes .ft i { font-style: normal; color: var(--muted); margin: 0 2px; }
.lt-notes .ft .lg.sm { margin-right: 3px; }
.lt-notes .ft em { font-style: normal; font-weight: 400; color: var(--muted); font-size: 12.5px; margin-left: 8px; }
.lt-notes .pt { display: block; color: var(--muted); margin-top: 2px; }

/* ---------- fast-mode spin ---------- */
.lt-overlay { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; background: rgba(23, 33, 43, .72); opacity: 0; transition: opacity .25s ease; cursor: pointer; padding: 16px; }
.lt-overlay.on { opacity: 1; }
.lt-wheel { width: min(440px, 100%); background: var(--navy); border: 3px solid var(--gold); border-radius: 10px; padding: 22px 20px 20px; text-align: center; color: #fff; box-shadow: 0 24px 60px rgba(0,0,0,.45); transform: scale(.94); transition: transform .25s ease; }
.lt-overlay.on .lt-wheel { transform: none; }
.lt-wheel-cap { font-family: var(--cond); font-weight: 600; font-size: 20px; letter-spacing: .04em; text-transform: uppercase; color: var(--gold); }
.lt-wheel-win { height: 190px; overflow: hidden; display: flex; align-items: center; justify-content: center; margin: 12px 0 6px; background: var(--navy-2); border-radius: 8px; background-image: linear-gradient(180deg, rgba(255,255,255,.08), rgba(0,0,0,.16)); }
.lt-wheel-reel { display: flex; flex-direction: column; align-items: center; gap: 10px; animation: lt-tick .09s ease-out; }
.lt-wheel-reel img { width: 110px; height: 110px; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,0,0,.4)); }
.lt-wheel-reel b { font-family: var(--cond); font-size: 26px; line-height: 1; }
.lt-wheel-sub { min-height: 20px; color: #C9D4DF; font-size: 14px; }
.lt-wheel.won { animation: lt-win .9s ease-out; }
.lt-wheel.won .lt-wheel-win { box-shadow: inset 0 0 0 3px var(--gold); }
@keyframes lt-win { 0% { transform: scale(1); } 30% { transform: scale(1.06); box-shadow: 0 0 0 10px rgba(233,169,43,.35), 0 24px 60px rgba(0,0,0,.45); } 100% { transform: scale(1); } }

/* ---------- responsive ---------- */
/* Phones and narrow windows: the cards keep the exact desktop layout and are scaled down to fit
   (lottery_hub.js sets zoom on .lt-list below 1080px). Only the parts around the cards restyle here. */
@media (max-width: 720px) {
  /* header + toolbar */
  .hub-wrap.hub-view { padding-left: 10px; padding-right: 10px; padding-top: 16px; }
  .lt-headbar { margin-bottom: 12px; }
  .lt-headbar h2 { font-size: 30px; }
  .lt-toolbar { gap: 10px; margin-bottom: 14px; }
  .lt-toolbar .lt-sim { padding: 9px 16px; font-size: 18px; }
  .lt-toolbar .lt-reset { padding: 6px 10px; font-size: 15px; }

  /* odds tables: narrower cells so more columns fit before scrolling */
  .lt-h3 { font-size: 22px; margin: 18px 0 6px; }
  .lt-heat th, .lt-heat td { padding-left: 5px; padding-right: 5px; }
  .lt-heat td.hm { font-size: 11px; min-width: 30px; }
  .lt-heat td.pk { font-size: 15px; }
  .lt-heat td.tm { min-width: 0; gap: 4px; }
  .lt-heat td.tm small { font-size: 10.5px; }
  .lt-rule { font-size: 12px; }
  /* group table: keep just the group name in the pinned column (the details make it too wide) */
  .lt-rule + .lt-heat-wrap td.tm small { display: none; }
  .lt-rule + .lt-heat-wrap td.tm b { white-space: normal; font-size: 12px; line-height: 1.2; }
  .lt-rule + .lt-heat-wrap td.tm { min-width: 92px; max-width: 110px; }

  /* notes */
  .lt-notes { grid-template-columns: 1fr; gap: 12px; margin-top: 16px; }
  .lt-notes section { padding: 12px 12px; }
  .lt-notes h3 { font-size: 21px; margin-bottom: 8px; }
  .lt-notes ul { font-size: 13px; }
  .lt-notes li { grid-template-columns: 40px minmax(0, 1fr); gap: 9px; }
  .lt-notes section.rights { grid-column: auto; }
  .lt-notes section.rights ul { grid-template-columns: 1fr; }
  .lt-notes section.rights li:nth-child(2) { border-top: 1px solid var(--rule-soft); padding-top: 7px; }
}