/* =========================================================
   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 (legacy, kept for reference) */
.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; }
/* =========================================================
   SCRATCH CARD SYSTEM
   ========================================================= */

.lpp-scratch-launch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.15);
  background: #ffffff;
  color: #0b6b3a;
  font-weight: 800;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
}
.lpp-scratch-launch:hover { transform: translateY(-1px); }

.lpp-scratch-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  display: none;
  z-index: 999999;
}
.lpp-scratch-backdrop.is-open { display: block; }

.lpp-scratch-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 1000000;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.lpp-scratch-modal.is-open { display: flex; }

.lpp-scratch-dialog {
  position: relative;
  width: min(920px, 96vw);
  max-height: 92vh;
  background: #fff;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0,0,0,.35);
  border: 1px solid rgba(0,0,0,.10);
  display: flex;
  flex-direction: column;
}

.lpp-scratch-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #0b6b3a;
  color: #f7d774;
}

.lpp-scratch-title {
  font-size: 16px;
  font-weight: 1000;
  color: #f7d774;
}

.lpp-scratch-close {
  border: 2px solid rgba(247, 215, 116, .45);
  background: rgba(247, 215, 116, .10);
  color: #f7d774;
  font-size: 20px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 12px;
}

.lpp-scratch-body {
  padding: 16px;
  overflow: auto;
}

.lpp-scratch-summary {
  background: #f8fafc;
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 12px;
  position: sticky;
  top: 0;
  min-height: 92px;
}
.lpp-scratch-summary.is-hidden { display: none; }

.lpp-scratch-btn.primary {
  background: #ffcf46;
  color: #0b6b3a;
  border: 2px solid #0b6b3a;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 1000;
  cursor: pointer;
  transition: all .15s ease;
}
.lpp-scratch-btn.primary:hover {
  background: #0b6b3a;
  color: #ffcf46;
  border-color: #ffcf46;
}
.lpp-scratch-btn.primary:disabled {
  opacity: .6;
  cursor: not-allowed;
}

@media (max-width: 900px) {
  .lpp-scratch-btn.primary { width: 100%; }
}

.lpp-scratch-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-height: 62vh;
  overflow: auto;
}
@media (max-width: 900px) {
  .lpp-scratch-grid { grid-template-columns: repeat(2, 1fr); }
}

.lpp-scratch-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  min-height: 84px;
}

/* =========================================
   SCRATCH RESULT (HORIZONTAL LAYOUT)
========================================= */

.lpp-scratch-result{
  position:absolute;
  inset:0;
  padding:10px 12px;

  display:flex;
  align-items:center;
  gap:12px;

  border:2px solid #FFD943;
  border-radius:14px;

  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.08),
    0 8px 18px rgba(0,0,0,.14);

  overflow:hidden;
}

/* WIN */
.lpp-scratch-result.win{
  background:
    radial-gradient(circle at left, rgba(255,217,67,.18), transparent 50%),
    linear-gradient(135deg, #0b6b3a 0%, #0f8a4a 100%);
  color:#fff;
}

/* LOSE */
.lpp-scratch-result.lose{
  background:
    radial-gradient(circle at left, rgba(255,217,67,.10), transparent 50%),
    linear-gradient(135deg, #4b5563 0%, #6b7280 100%);
  color:#fff;
}

/* =========================================
   LEFT: LOGO
========================================= */

.lpp-scratch-logo{
  width:50px;
  height:auto;
  flex-shrink:0;
  filter:drop-shadow(0 2px 6px rgba(0,0,0,.25));
}

/* =========================================
   RIGHT: TEXT BLOCK
========================================= */

.lpp-scratch-text{
  display:flex;
  flex-direction:column;
  justify-content:center;
  line-height:1.2;
}

/* WIN / LOSE */
.lpp-scratch-status{
  font-size:11px;
  font-weight:900;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:#FFD943;
  margin-bottom:2px;
}

/* TICKET NUMBER */
.ticket-no{
  font-size:16px;
  font-weight:900;
}

/* LABEL */
.ticket-label{
  font-size:11px;
  opacity:.9;
  font-weight:600;
}

.lpp-scratch-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.lpp-scratch-error { display: none; }
.lpp-scratch-error.is-show { display: block; }

.lpp-scratch-pager { display: none !important; }

.lpp-scratch-modal button,
.lpp-scratch-modal [type="button"],
.lpp-scratch-modal [type="submit"] {
  border-color: unset;
  color: unset;
}
.lpp-scratch-btn.primary { background: #ffcf46; color: #0b6b3a; border: 2px solid #0b6b3a; }
.lpp-scratch-btn.primary:hover { background: #0b6b3a; color: #ffcf46; border-color: #ffcf46; }

/* =========================================================
   CASHFLOWS PAYMENT WAITING OVERLAY
   Full-screen blurred overlay shown while we poll for payment
   confirmation. Hides the thank-you page until the order is
   confirmed paid, failed, or timed out.
========================================================= */

#tol-payment-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  /* Dark tint + blur everything behind the overlay */
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: opacity 0.45s ease;
}

#tol-payment-overlay.is-hiding {
  opacity: 0;
  pointer-events: none;
}

.tol-payment-box {
  background: #ffffff;
  border-radius: 20px;
  padding: 48px 36px 40px;
  max-width: 460px;
  width: 100%;
  text-align: center;
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.45);
}

/* Spinner */
.tol-payment-spinner {
  width: 56px;
  height: 56px;
  border: 5px solid #e5e7eb;
  border-top-color: #068648;
  border-radius: 50%;
  animation: tol-spin 0.85s linear infinite;
  margin: 0 auto 24px;
}

/* Error state — stop spinning, show ✕ */
.tol-payment-spinner.is-error {
  border-color: #fee2e2;
  border-top-color: #dc2626;
  animation: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  line-height: 1;
  color: #dc2626;
}
.tol-payment-spinner.is-error::after {
  content: '\2715'; /* ✕ */
  font-weight: 700;
}

@keyframes tol-spin {
  to { transform: rotate(360deg); }
}

.tol-payment-title {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 10px;
  line-height: 1.3;
}

.tol-payment-msg {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
  line-height: 1.65;
}

@media (max-width: 480px) {
  .tol-payment-box { padding: 36px 24px 32px; }
  .tol-payment-title { font-size: 18px; }
}
