/* TFT Games — self-contained, Elementor-safe styles. All selectors are scoped
 * under .tftg-root. House palette: deep blue gradient, white cards, green money. */

.tftg-root {
  --tftg-blue1: #1e3c72;
  --tftg-blue2: #2a5298;
  --tftg-green: #16a34a;
  font-family: inherit;
  color: #1f2937;
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.4;
}
.tftg-root *,
.tftg-root *::before,
.tftg-root *::after { box-sizing: border-box; }

.tftg-skeleton,
.tftg-error,
.tftg-empty {
  padding: 2rem 1.5rem;
  text-align: center;
  color: #6b7280;
  background: #f9fafb;
  border: 1px solid #eef0f3;
  border-radius: 14px;
}
.tftg-error-sub { font-size: .8rem; color: #9ca3af; margin: .35rem 0 0; }

.tftg-card {
  background: #fff;
  border: 1px solid #eef0f3;
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}

/* ---- Crack the Safe ---- */
.tftg-banner {
  background: linear-gradient(135deg, var(--tftg-blue1), var(--tftg-blue2));
  color: #fff;
  border-radius: 14px;
  padding: 1.1rem 1rem;
  text-align: center;
  margin-bottom: 1rem;
}
.tftg-jackpot-label { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; opacity: .9; margin-bottom: .15rem; }
.tftg-jackpot { font-size: clamp(1.8rem, 6vw, 2.6rem); font-weight: 800; letter-spacing: .5px; line-height: 1.1; }
.tftg-season { font-size: .95rem; opacity: .92; margin-top: .15rem; }
.tftg-remaining { font-size: .85rem; opacity: .85; margin-top: .4rem; }
.tftg-next { font-size: .85rem; font-weight: 600; margin-top: .2rem; }

.tftg-grid {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: clamp(2px, 1vw, 6px);
}
.tftg-cell {
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #eef4ff;
  color: var(--tftg-blue1);
  font-weight: 700;
  font-size: clamp(.55rem, 2.2vw, 1rem);
}
.tftg-cell-out { background: #f3f4f6; color: #cbd5e1; text-decoration: line-through; }

.tftg-recent { margin-top: 1rem; }
.tftg-recent-title,
.tftg-lastnight-title {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .5px;
  color: #9ca3af; font-weight: 700; margin-bottom: .4rem;
}
.tftg-recent-list { display: flex; flex-wrap: wrap; gap: .4rem; }
.tftg-chip {
  display: flex; align-items: center; gap: .35rem;
  background: #f9fafb; border: 1px solid #eef0f3; border-radius: 999px;
  padding: .25rem .6rem; font-size: .8rem;
}
.tftg-chip-n { font-weight: 700; color: var(--tftg-blue1); }
.tftg-chip-name { color: #374151; }
.tftg-chip-date { color: #9ca3af; font-size: .72rem; }

.tftg-won {
  background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 14px;
  padding: 1rem; text-align: center; margin-bottom: 1rem;
}
.tftg-won-title { font-size: 1.15rem; font-weight: 800; color: var(--tftg-green); }
.tftg-won-name { font-size: 1.45rem; font-weight: 800; color: #065f46; margin-top: .2rem; }
.tftg-won-pot { color: #047857; margin-top: .2rem; font-weight: 600; }

/* ---- Quiz League ---- */
.tftg-champ {
  background: linear-gradient(135deg, #b8860b, #f5c542);
  color: #fff; border-radius: 12px; padding: .6rem 1rem;
  text-align: center; font-weight: 700; margin-bottom: 1rem;
}
.tftg-champ-name { font-weight: 800; }
.tftg-lg-header {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: .5rem; flex-wrap: wrap; margin-bottom: .75rem;
}
.tftg-lg-title { font-size: 1.25rem; font-weight: 800; color: var(--tftg-blue1); }
.tftg-lg-week { font-size: .8rem; color: #6b7280; font-weight: 600; }

.tftg-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tftg-table { width: 100%; border-collapse: collapse; font-size: .9rem; min-width: 380px; }
.tftg-table th {
  text-align: right; font-size: .68rem; text-transform: uppercase; letter-spacing: .4px;
  color: #9ca3af; padding: .4rem .5rem; border-bottom: 2px solid #eef0f3; white-space: nowrap;
}
.tftg-table th:nth-child(1),
.tftg-table th:nth-child(2) { text-align: left; }
.tftg-table td { text-align: right; padding: .45rem .5rem; border-bottom: 1px solid #f3f4f6; white-space: nowrap; }
.tftg-pos { text-align: center; color: #9ca3af; font-weight: 700; width: 1.8rem; }
.tftg-team { text-align: left; font-weight: 600; color: #1f2937; }
.tftg-pts { font-weight: 800; color: var(--tftg-blue1); }
/* Zebra striping (kept intact under the top-3 accent). */
.tftg-table tbody tr:nth-child(even) td { background: #fafbfc; }
/* Top-3: slim coloured LEFT BORDER only + medal glyph in the # cell (no metallic fills). */
.tftg-top td:first-child { border-left: 3px solid transparent; }
.tftg-top-1 td:first-child { border-left-color: #f5c542; }
.tftg-top-2 td:first-child { border-left-color: #9ca3af; }
.tftg-top-3 td:first-child { border-left-color: #cd7f32; }
.tftg-row-hidden { display: none; }
.tftg-empty-row { text-align: center; color: #9ca3af; padding: 1.2rem; }

.tftg-more {
  display: block; margin: .6rem auto 0; padding: .4rem 1rem; cursor: pointer;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 999px;
  font-size: .82rem; font-weight: 600; color: var(--tftg-blue1); font-family: inherit;
}
.tftg-more:hover { background: #f3f6ff; }

.tftg-alsoplayed { margin-top: .75rem; }
.tftg-alsoplayed-toggle {
  width: 100%; text-align: left; cursor: pointer; padding: .5rem .25rem;
  background: none; border: 0; border-top: 1px solid #f3f4f6;
  font-size: .8rem; font-weight: 600; color: #9ca3af; font-family: inherit;
}
.tftg-alsoplayed-row {
  display: flex; justify-content: space-between; padding: .35rem .25rem;
  font-size: .85rem; color: #9ca3af; border-top: 1px solid #f6f7f8;
}
.tftg-alsoplayed-pts { font-weight: 600; }

.tftg-lastnight {
  margin-top: 1rem; background: #f9fafb; border: 1px solid #eef0f3;
  border-radius: 12px; padding: .75rem 1rem;
}
.tftg-hl { font-size: .9rem; margin: .2rem 0; }
.tftg-hl-em { font-weight: 600; color: #374151; }

/* ===================== QUIZ BANNER — SpeedQuizzing brand =====================
 * ⚠️ THE BOX IS NOT DEFINED HERE ANY MORE. `.tftg-qb` also carries
 * `.tft-panel` from the shared `tft-panels` mu-plugin, which owns the radius,
 * the clipping, the full-column height and the flex column — and
 * `.tft-panel-body` owns the padding. Those declarations were DELETED rather
 * than left here to win: an 18px radius and 26px of padding against Foodie
 * Friday's 12px and 24px is exactly the drift the shared file exists to end,
 * and a local copy that happens to agree today is a local copy that stops
 * agreeing on the next change.
 *
 * Everything below is the brand — cyan, magenta, the letterforms — and stays.
 */
.tftg-qb {
  text-decoration: none;
  background: #38c6f4;                       /* SpeedQuizzing cyan */
  box-shadow: 0 8px 28px rgba(20, 90, 130, 0.30);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  transition: transform .18s ease, box-shadow .18s ease;
}
/* The padded inside. Direction is the module's: this panel is a column of
   head, sub-panels and button. */
.tftg-qb-inner {
  /* ⚠️ Centred, not top-aligned — and NOT `margin-top: auto` on the CTA, which
     is banned in all three panels (Leigh, 18 Sep): that turns slack into a hole
     ABOVE the button instead of padding around it.
     The shared box stretches this panel to Foodie Friday's height, and since the
     Quiz League tile went (v1.5.0) this content is ~41px shorter than the box, so
     the spare collected as bare cyan under the button. Centring splits it. Same
     per-panel decision the banner's copy already uses; it stays out of the shared
     box, which owns geometry for every panel and must not favour this one.
     No-op at 380px, where the panels stack and there is no slack. */
  justify-content: center; flex-direction: column; }
.tftg-qb:hover { transform: translateY(-2px); box-shadow: 0 12px 34px rgba(20,90,130,0.38); }

.tftg-qb-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 20px;
}
.tftg-qb-logo { height: 46px; width: auto; max-width: 70%; display: block; }
.tftg-qb-logo-text { font-size: clamp(24px,5vw,38px); font-weight: 800; color: #fff; letter-spacing: -0.5px; }
.tftg-qb-time {
  font-size: clamp(15px,2.6vw,20px); font-weight: 800; color: #ffffff;
  text-transform: uppercase; letter-spacing: 1px; white-space: nowrap;
}

.tftg-qb-panels { display: flex; gap: 14px; }
.tftg-qb-panel {
  flex: 1; min-width: 0;
  background: #ff00ff;                        /* SpeedQuizzing magenta */
  border-radius: 12px; padding: 16px 18px;
  display: flex; flex-direction: column; gap: 4px;
}
.tftg-qb-panel-title {
  font-size: clamp(15px,2.4vw,19px); font-weight: 800; color: #fff;
  text-transform: uppercase; letter-spacing: 0.5px; line-height: 1.1;
}
.tftg-qb-panel-sub { font-size: clamp(12px,2vw,14px); color: #ffe6ff; font-weight: 600; line-height: 1.25; }
.tftg-qb-panel-safe .tftg-qb-panel-sub[data-tftg-jackpot][data-tftg-live] { color: #fff200; font-weight: 800; font-size: clamp(15px,2.6vw,18px); }

/* ⚠️ NOT `auto`. It dropped the button to the bottom of the panel to share a
   baseline with the Foodie Friday button beside it, and that trade is the
   wrong way round: whichever panel is the shorter of the two then carries the
   whole difference as a hole above its button. The contents sit together and
   the slack falls at the bottom of the panel as padding, the same as the
   other two panels (Leigh, 18 Sep). The fallback is for the panel rendered
   outside a page carrying the shared stylesheet.

   ⚠️ AND NO `padding-top` EITHER. It was there to "keep a real gap above the
   button when the panel is only as tall as its content", which is now exactly
   what the shared gap does — keeping both made the space above this button
   37.6px against 17.6px in the other two, and 18px of the panel's height was
   a gap nobody had chosen. One number, once. */
.tftg-qb-foot { margin-top: var(--tft-panel-cta-gap, 1.1rem); }
/* Shape, padding and the 44px hit area come from `.tft-panel-cta`; the colour
   and the letterforms are the brand's and stay here. */
.tftg-qb-btn {
  background: #ffffff; color: #0a7ea8;
  font-weight: 800; font-size: clamp(15px,2.6vw,18px);
  text-transform: uppercase; letter-spacing: 0.5px;
  transition: background .15s ease, color .15s ease;
}
.tftg-qb:hover .tftg-qb-btn { background: #fff200; color: #1a1a1a; }

/* Internal layout only — the three sub-panels stop fitting side by side well
   before the panel itself stops fitting the column. The width at which PANELS
   stack is not decided here; it is written once, in tft-panel.css. */
@media (max-width: 640px) {
  .tftg-qb-panels { flex-direction: column; }
  .tftg-qb-head { gap: 10px; }
  .tftg-qb-btn { width: 100%; }
}
