/* ═══════════════════════════════════════════════════════════
   GTF Live Draw — 100% pixel-perfect clone
   Ref: WhatsApp screenshots 08 May 2026
═══════════════════════════════════════════════════════════ */

/* ── Full-screen black overlay ─────────────────────────── */
.ld-overlay {
  position: fixed;
  inset: 0;
  background: #000;
  z-index: 9999;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'Roboto', Arial, sans-serif;
}
.ld-overlay.active { display: flex; }

/* ── 10-second countdown before draw starts ────────────── */
.ld-pre-countdown {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.ld-pre-countdown-label {
  color: rgba(255,255,255,.7);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.ld-pre-countdown-num {
  color: #fff;
  font-size: 96px;
  font-weight: 900;
  line-height: 1;
  font-family: 'Arial Black', 'Roboto', sans-serif;
  text-shadow: 0 0 40px rgba(255,255,255,.3);
  transition: transform .15s ease;
}
.ld-pre-countdown-num.pulse {
  transform: scale(1.12);
}
.ld-pre-countdown-bar {
  width: 200px;
  height: 4px;
  background: rgba(255,255,255,.15);
  border-radius: 2px;
  overflow: hidden;
}
.ld-pre-countdown-fill {
  height: 100%;
  background: #e53030;
  border-radius: 2px;
  transition: width 1s linear;
}

/* ── Main white panel ───────────────────────────────────── */
.ld-panel {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  padding: 0 0 8px;
}

/* ── Title bar ──────────────────────────────────────────── */
/* White/silver gradient strip behind title text/image */
.ld-title-bar {
  background: linear-gradient(180deg, #fff 0%, #e8e8e8 50%, #d8d8d8 100%);
  padding: 10px 10px 8px;
  text-align: center;
  border-bottom: 1px solid #ccc;
  margin-bottom: 6px;
}
/* Image version of title (user replaces with their image) */
.ld-title-img {
  max-width: 100%;
  height: auto;
  max-height: 60px;
  display: block;
  margin: 0 auto;
}
/* CSS fallback title (used if image missing) */
.ld-title-text {
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-family: 'Arial Black', 'Roboto', sans-serif;
  color: #fff;
  -webkit-text-stroke: 5px #1565c0;
  paint-order: stroke fill;
  text-shadow:
    2px 2px 0 #0d47a1,
    -1px -1px 0 #0d47a1,
     1px -1px 0 #0d47a1,
    -1px  1px 0 #0d47a1,
     0 0 20px rgba(33,150,243,.45);
  line-height: 1.1;
}

/* ── Prize row ──────────────────────────────────────────── */
.ld-row {
  display: flex;
  align-items: center;
  padding: 6px 8px;
  min-height: 70px;
  gap: 6px;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height .4s ease, opacity .3s ease, padding .4s ease;
}
/* Alternating row backgrounds matching screenshot */
.ld-row:nth-child(odd)  { background: #ffffff; }
.ld-row:nth-child(even) { background: #f2f2f2; }

.ld-row.ld-row-visible {
  max-height: 90px;
  opacity: 1;
  padding: 6px 8px;
}

/* Badge — hidden until row locked */
.ld-badge {
  width: 38px; height: 38px;
  border-radius: 50%;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity .4s ease;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.ld-badge.show { opacity: 1; }
.ld-badge img  { width: 38px; height: 38px; display: block; }

/* Thai label — purple during shuffle, red when row locked */
.ld-label {
  font-size: 14px;
  font-weight: 700;
  color: #6b21a8;          /* purple — shuffling state */
  white-space: nowrap;
  width: 82px;
  flex-shrink: 0;
  text-align: left;
  transition: color .3s;
  font-family: 'Roboto', sans-serif;
  line-height: 1.2;
}
.ld-row.row-locked .ld-label {
  color: #dc2020;           /* red — locked state */
}

/* ── Digit boxes ────────────────────────────────────────── */
.ld-digits {
  display: flex;
  gap: 3px;
  flex: 1;
}

/* Each digit: white bg, gray border, black number — shuffling */
.ld-digit {
  flex: 1;
  height: 56px;
  background: #ffffff;
  border: 2px solid #b0b0b0;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: background .15s, border-color .15s;
}
.ld-digit-inner {
  font-size: 36px;
  font-weight: 900;
  color: #111;
  font-family: 'Arial Black', 'Roboto', monospace;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: #fff;
  transition: color .15s, background .15s;
}

/* LOCKED: red outer bg, white inner, BLACK number */
.ld-digit.locked {
  background: #e53030;
  border-color: #e53030;
  padding: 2px;
}
.ld-digit.locked .ld-digit-inner {
  background: #ffffff;
  color: #111111;
  font-size: 34px;
}

/* ── Footer bar ─────────────────────────────────────────── */
.ld-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px 4px;
  margin-top: 4px;
  border-top: 1px solid #ddd;
  gap: 6px;
}
.ld-footer-badge {
  width: 44px; height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  overflow: hidden;
}
.ld-footer-badge img { width: 44px; height: 44px; display: block; }

/* Red pill for date and time */
.ld-footer-pill {
  background: #e53030;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 50px;
  white-space: nowrap;
  font-family: 'Roboto', sans-serif;
  letter-spacing: .2px;
}

/* GTF — image version */
.ld-footer-gtf-img {
  height: 28px;
  width: auto;
  display: block;
}
/* GTF — CSS fallback */
.ld-footer-gtf-text {
  font-size: 22px;
  font-weight: 900;
  color: #aaa;
  font-family: 'Arial Black', 'Roboto', sans-serif;
  letter-spacing: 2px;
  -webkit-text-stroke: 1.5px #888;
  text-shadow: 1px 1px 0 #666, -1px -1px 0 #ddd;
}

/* ── Closing countdown text ─────────────────────────────── */
.ld-end-countdown {
  text-align: center;
  color: rgba(255,255,255,.55);
  font-size: 13px;
  margin-top: 12px;
  letter-spacing: .3px;
  min-height: 20px;
  font-family: 'Roboto', sans-serif;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 370px) {
  .ld-digit        { height: 46px; }
  .ld-digit-inner  { font-size: 28px; }
  .ld-digit.locked .ld-digit-inner { font-size: 26px; }
  .ld-label        { font-size: 12px; width: 68px; }
  .ld-title-text   { font-size: 16px; }
  .ld-pre-countdown-num { font-size: 72px; }
}
@media (min-width: 440px) {
  .ld-digit        { height: 62px; }
  .ld-digit-inner  { font-size: 40px; }
  .ld-digit.locked .ld-digit-inner { font-size: 38px; }
  .ld-panel        { max-width: 460px; }
}

/* ── Show/hide via classes (no inline style=) ───────────── */
.ld-panel-hidden      { display: none !important; }
.ld-hidden            { display: none !important; }
.ld-img-hidden        { display: none !important; }
.ld-img-visible       { display: block !important; }

/* GTF wrapper */
.ld-footer-gtf-wrap   {
  display: flex; align-items: center; justify-content: center;
  flex: 1;
}