/* =========================================================
   TOL REVEAL ENGINE – CLEAN STABLE LAYOUT
   ========================================================= */


/* =========================
   MODAL
========================= */

.tol-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999999;
}

.tol-modal.is-open {
  display: flex;
}

.tol-modal-inner {
  background: #fff;
  width: 95%;
  max-width: 820px;
  border-radius: 20px;
  padding: 30px 25px 25px;
  position: relative;
  overflow: visible;
  box-shadow: 0 30px 60px rgba(0,0,0,.4);
}

.tol-modal-body {
  max-height: 80vh;
  overflow-y: auto;
}

/* =========================
   CLOSE BUTTON (OUTSIDE MODAL)
========================= */

.tol-close {
  position: fixed;
  top: calc(5vh + 8px);
  right: calc(2.5% + 8px);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #068648;
  color: #fff;
  border: 3px solid #ffffff;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0,0,0,.35);
  transition: all .2s ease;
  z-index: 9999999;
}

.tol-close:hover {
  background: #046d3a;
  transform: scale(1.08);
}


/* =========================
   WRAPPER
========================= */

.emoji-bingo-wrapper {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  font-family: system-ui, sans-serif;
}


/* =========================
   NAVIGATION
========================= */

.nav-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.nav-btn {
  background: #111;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
}

.nav-btn:disabled {
  opacity: .3;
  cursor: not-allowed;
}

.ticket-counter {
  font-weight: 600;
}


/* =========================
   HEADER
========================= */

.ticket-header {
  background: #068648;
  color: #fff;
  padding: 14px;
  text-align: center;
  font-weight: 600;
  border-radius: 14px 14px 0 0;
}


/* =========================
   SLIDER STRUCTURE
========================= */

.ticket-slider-wrapper {
  overflow: hidden;
  width: 100%;
}

.ticket-slider {
  display: flex;
  width: 100%;
  transition: transform .4s ease;
}

.ticket-slide {
  min-width: 100%;
  box-sizing: border-box;
}


/* =========================
   BINGO CARD
========================= */

.emoji-bingo-card {
  width: 100%;
  background: #fff;
  border-radius: 0 0 14px 14px;
  overflow: hidden;
  box-shadow:
    0 15px 30px rgba(0,0,0,.25),
    0 0 18px rgba(6,134,72,.2);
  position: relative;
}


/* =========================
   GRID
========================= */

.bingo-grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 6px;
  padding: 12px;
  background: #222;
}

.bingo-cell {
  aspect-ratio: 1/1;
  background: #f5f5f5;
  border-radius: 8px;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: .2s ease;
}

.bingo-cell.empty {
  background: #111;
}


/* =========================
   SCRATCH OVERLAY
========================= */

.scratch-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg,#d8d8d8 0%,#b5b5b5 25%,#f2f2f2 50%,#b5b5b5 75%,#d8d8d8 100%),
    repeating-linear-gradient(
      45deg,
      rgba(255,255,255,.15),
      rgba(255,255,255,.15) 2px,
      rgba(0,0,0,.05) 2px,
      rgba(0,0,0,.05) 4px
    );
  background-blend-mode: overlay;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  cursor: pointer;
  transition: opacity .4s ease;
}

.scratch-overlay.revealed {
  opacity: 0;
  pointer-events: none;
}


/* =========================
   WIN GLOW
========================= */

@keyframes dogGlowPulse {
  0%   { box-shadow: 0 0 8px rgba(255,215,0,.7); }
  50%  { box-shadow: 0 0 30px rgba(255,215,0,1), 0 0 50px rgba(255,215,0,.5); }
  100% { box-shadow: 0 0 8px rgba(255,215,0,.7); }
}

@keyframes dogScalePulse {
  0%,100% { transform: scale(1); }
  50%     { transform: scale(1.22); }
}

.win-silver,
.win-gold,
.win-platinum {
  animation:
    dogGlowPulse  1.2s ease-in-out infinite,
    dogScalePulse 1.2s ease-in-out infinite;
}


/* =========================
   BADGES
========================= */

.winner-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
  background: #FFD943;
  color: #000;
}


/* =========================
   UPDATED RESULT PANEL
========================= */

.result-panel {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px;
  margin-top: 8px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  background: #111;
  color: #fff;
  min-height: 36px;
}

/* Badge inside result */
.result-label {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.result-amount {
  font-weight: 700;
}

/* Summary layout */
.summary-total {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: #068648;
  border-radius: 8px;
  text-align: center;
}

.no-win {
  opacity: 0.7;
}


/* =========================
   BREAKDOWN
========================= */

.breakdown-panel {
  margin-top: 20px;
  padding: 15px;
  background: #000;
  color: #fff;
  border-radius: 12px;
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.breakdown-panel.is-visible {
  display: grid;
}

.summary-total {
  grid-column: 1 / -1;
}

.no-win {
  grid-column: 1 / -1;
}

.breakdown-row {
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(255,255,255,0.07);
  font-size: 13px;
  text-align: center;
}

@media (max-width: 768px) {
  .breakdown-panel {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* =========================
   MOBILE FIX
========================= */

@media (max-width: 768px) {

  .emoji-bingo-wrapper {
    width: 100%;
  }

  .bingo-cell {
    font-size: 18px;
  }

}

/* =========================================================
   REVEAL CARD – PREMIUM WHITE VERSION
========================================================= */

.tol-reveal-section {
  text-align: center !important;
  margin-bottom: 40px !important;
}

.tol-reveal-heading {
  margin-bottom: 25px !important;
  font-size: 28px !important;
  font-weight: 700 !important;
}

/* Grid layout */
.tol-reveal-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 40px !important;
  justify-items: center !important;
}

@media (max-width: 1024px) {
  .tol-reveal-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 768px) {
  .tol-reveal-grid {
    grid-template-columns: 1fr !important;
  }
}

/* =========================
   CARD
========================= */

.tol-reveal-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  max-width: 400px !important;
  width: 100% !important;

  background: #ffffff !important;
  border-radius: 18px !important;
  overflow: hidden !important;

  border-top: 4px solid #FFD700 !important;

  box-shadow: 0 6px 20px rgba(0,0,0,0.08) !important;
  transition: all 0.25s ease !important;

  padding: 0 0 18px 0 !important;
}

/* Hover effect */
.tol-reveal-card:hover {
  transform: translateY(-6px) !important;
  box-shadow: 0 12px 30px rgba(0,0,0,0.15) !important;
}

/* =========================
   IMAGE
========================= */

.tol-card-image {
  width: 100% !important;
  max-width: 400px !important;
  height: auto !important;
  display: block !important;

  border-top-left-radius: 18px !important;
  border-top-right-radius: 18px !important;
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;

  margin: 0 !important;
  padding: 0 !important;
}

/* =========================
   TITLE
========================= */

.tol-card-title {
  margin-top: 14px !important;
  font-weight: 700 !important;
  font-size: 18px !important;
  padding: 0 16px !important;
  text-align: center !important;
}

/* =========================
   TICKETS
========================= */

.tol-card-tickets {
  margin-top: 8px !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
  max-width: 100% !important;
  padding: 0 16px !important;
  text-align: center !important;

  color: #068648 !important;
  font-weight: 600 !important;

  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
}

/* =========================
   BUTTON
========================= */

.tol-reveal-btn {
  margin-top: 14px !important;
  background: #068648 !important;
  color: #ffffff !important;
  border: 1px solid #ffffff !important;

  padding: 10px 22px !important;
  border-radius: 8px !important;

  font-size: 14px !important;
  font-weight: 600 !important;

  cursor: pointer !important;
  transition: all .2s ease !important;
}

.tol-reveal-btn:hover {
  background: #046d3a !important;
  transform: scale(1.04) !important;
}

/* Hide instant-win messages when a reveal type is active */
.instant-winn {
  display: none !important;
}


/* =========================================================
   ARD RESULTS REVEAL MODAL
========================================================= */

.ard-modal-overlay {
  position: fixed;
  inset: 0;
  display: none;
  background: rgba(0,0,0,.55);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.ard-modal-overlay.is-open { display: flex; }

.ard-modal {
  background: #fff;
  max-width: 980px;
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  overflow: hidden;
}

.ard-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #eee;
}
.ard-modal__title { margin: 0; font-size: 16px; line-height: 1.4; font-weight: 600; }
.ard-modal__close { background: transparent; border: 0; font-size: 22px; line-height: 1; cursor: pointer; }
.ard-modal__body  { padding: 16px; max-height: 70vh; overflow: auto; }

/* Winners summary */
.ard-winners-wrap  { margin: 0 0 14px 0; }
.ard-winners-title { margin: 0 0 8px 0; font-weight: 800; font-size: 18px; }
.ard-winners-list  { display: grid; grid-template-columns: 1fr; gap: 6px; }
.ard-winner-row {
  padding: 8px 10px;
  border-radius: 10px;
  background: #f0fdf4;
  border: 1px solid #86efac;
  font-weight: 600;
  font-size: 14px;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.ard-winner-row .ticket { font-weight: 800; }
.ard-winner-row .prize  { opacity: .95; }
.ard-winner-row .comp   { opacity: .8; }

/* Ticket grid — 5 columns desktop, responsive */
.ard-tickets-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 12px;
}
@media (max-width: 1024px) { .ard-tickets-grid { grid-template-columns: repeat(4, minmax(110px, 1fr)); } }
@media (max-width: 780px)  { .ard-tickets-grid { grid-template-columns: repeat(3, minmax(100px, 1fr)); } }
@media (max-width: 520px)  { .ard-tickets-grid { grid-template-columns: repeat(2, minmax(100px, 1fr)); } }

/* Ticket cards */
.ard-ticket-card {
  border: 1px solid #e5e5e5;
  border-radius: 20px;
  width: 100%;
  aspect-ratio: 1/1;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
  display: flex;
  flex-direction: column;
  background: #fff;
}
.ard-ticket-top {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}
.ard-ticket-num { margin: 0; font-weight: 800; font-size: 18px; text-align: center; }
.ard-ticket-bottom {
  flex: 0 0 auto;
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: .4px;
  text-transform: uppercase;
  padding: 4px 6px;
}
.ard-ticket-card.winner { border-color: #16a34a; }
.ard-ticket-card.winner .ard-ticket-bottom { background: #16a34a; color: #fff; }
.ard-ticket-card.nowin  .ard-ticket-bottom { background: #e5e7eb; color: #111; }

/* Hide stray Pay/Cancel buttons on thank-you page */
.order-actions-button { display: none !important; }

/* Auto-refresh overlay */
.ard-refresh-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  color: #fff;
  font-weight: 700;
  padding: 16px;
  text-align: center;
}
.ard-refresh-overlay.on { display: flex; }
.ard-refresh-box {
  background: #111;
  border-radius: 12px;
  padding: 16px 18px;
  max-width: 520px;
  box-shadow: 0 12px 40px rgba(0,0,0,.4);
  line-height: 1.35;
}
.ard-refresh-small { font-weight: 500; opacity: .85; font-size: 14px; margin-top: 4px; }