/**
 * FoxyLottery Terminal Animations, Custom Ball Gradients & Glow Effects
 */

@keyframes pulse-subtle {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(0.98); }
}

@keyframes terminal-glow {
  0%, 100% { box-shadow: 0 0 15px rgba(78, 222, 163, 0.15); }
  50% { box-shadow: 0 0 25px rgba(78, 222, 163, 0.35); }
}

.animate-pulse-subtle {
  animation: pulse-subtle 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.terminal-glow-emerald {
  animation: terminal-glow 4s ease-in-out infinite;
}

/* 3D Spherical Lottery Ball Styling */
.lotto-ball {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  font-family: 'Geist', monospace;
  font-weight: 700;
  box-shadow: inset -2px -3px 6px rgba(0, 0, 0, 0.6), 0 3px 6px rgba(0, 0, 0, 0.4);
  position: relative;
  user-select: none;
}

/* Ball Types */
.ball-white {
  background: radial-gradient(circle at 35% 30%, #ffffff 0%, #e2e8f0 45%, #94a3b8 100%);
  color: #0f172a;
}

.ball-powerball {
  background: radial-gradient(circle at 35% 30%, #f87171 0%, #ef4444 45%, #991b1b 100%);
  color: #ffffff;
  box-shadow: inset -2px -3px 6px rgba(0, 0, 0, 0.7), 0 0 12px rgba(239, 68, 68, 0.5);
}

.ball-megaball {
  background: radial-gradient(circle at 35% 30%, #fde047 0%, #eab308 45%, #854d0e 100%);
  color: #422006;
  box-shadow: inset -2px -3px 6px rgba(0, 0, 0, 0.6), 0 0 12px rgba(234, 179, 8, 0.5);
}

.ball-star {
  background: radial-gradient(circle at 35% 30%, #7dd3fc 0%, #38bdf8 45%, #0369a1 100%);
  color: #082f49;
  box-shadow: inset -2px -3px 6px rgba(0, 0, 0, 0.6), 0 0 12px rgba(56, 189, 248, 0.5);
}

.ball-euro {
  background: radial-gradient(circle at 35% 30%, #fed7aa 0%, #f97316 45%, #9a3412 100%);
  color: #431407;
  box-shadow: inset -2px -3px 6px rgba(0, 0, 0, 0.6), 0 0 12px rgba(249, 115, 22, 0.5);
}

/* Terminal Scanline Ambient Effect */
.terminal-grid-bg {
  background-size: 32px 32px;
  background-image: 
    linear-gradient(to right, rgba(54, 57, 66, 0.15) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(54, 57, 66, 0.15) 1px, transparent 1px);
}

/* ==========================================================================
   FoxyLottery Zero-FOUC Geo-Compliance & Terminal Quantum Pulse ("Вжух")
   ========================================================================== */

/* Zero-FOUC Resolving Mask: preserves layout box model without shift */
html:not(.foxy-geo-resolved) a[href*="/go/"],
html:not(.foxy-geo-resolved) [data-geo-dynamic="true"],
html:not(.foxy-geo-resolved) .foxy-geo-dynamic-badge,
html:not(.foxy-geo-resolved) #foxy-geo-pill,
html:not(.foxy-geo-resolved) .foxy-cta-btn,
html:not(.foxy-geo-resolved) .foxy-cta-box[data-geo-dynamic="true"],
html.foxy-geo-resolving a[href*="/go/"],
html.foxy-geo-resolving .foxy-cta-box,
html.foxy-geo-resolving [data-foxy-geo-cta],
.foxy-geo-resolving[data-foxy-geo-cta] {
  opacity: 0 !important;
  pointer-events: none !important;
  user-select: none !important;
}

/* FoxyLottery Signature: Terminal Quantum Pulse ("Вжух") */
@keyframes foxyLotteryPulsePartner {
  0% {
    opacity: 0;
    transform: scale(0.92) translateY(4px);
    box-shadow: 0 0 0 rgba(78, 222, 163, 0);
    filter: brightness(0.7) blur(1px);
  }
  50% {
    transform: scale(1.02) translateY(-1px);
    box-shadow: 0 0 25px rgba(78, 222, 163, 0.6), 0 0 40px rgba(255, 185, 95, 0.3);
    filter: brightness(1.2) blur(0);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
    box-shadow: 0 4px 16px rgba(78, 222, 163, 0.2);
    filter: brightness(1) blur(0);
  }
}

/* Tier 5 Restricted Entrance Fade */
@keyframes foxyLotteryRestrictedFade {
  0% {
    opacity: 0;
    transform: scale(0.96);
    filter: grayscale(1);
  }
  100% {
    opacity: 0.45;
    transform: scale(1);
    filter: grayscale(1);
  }
}

.foxy-geo-anim-partner {
  animation: foxyLotteryPulsePartner 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.foxy-geo-anim-restricted {
  animation: foxyLotteryRestrictedFade 0.35s ease-out forwards;
}

/* Accessibility: Respect user reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  .foxy-geo-anim-partner {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    box-shadow: none !important;
    transition: opacity 0.2s ease !important;
  }
  .foxy-geo-anim-restricted {
    animation: none !important;
    opacity: 0.45 !important;
    transform: none !important;
    filter: grayscale(1) !important;
    transition: opacity 0.2s ease !important;
  }
  .animate-pulse-subtle,
  .terminal-glow-emerald,
  .animate-pulse,
  .animate-ping,
  .animate-spin {
    animation: none !important;
    transition: none !important;
  }
}

.ticket-fox__dismiss {
  min-width: 44px;
  min-height: 44px;
}

/* Tier 5 / Restricted Jurisdictions: FoxyCasino-Style Gray Disabled Buttons */
html.foxy-geo-tier-5 a.foxy-cta-btn,
html.foxy-geo-tier-5 a[href*="/go/"],
html.foxy-geo-tier-5 [data-commercial-cta="true"],
html.foxy-geo-restricted a.foxy-cta-btn,
html.foxy-geo-restricted a[href*="/go/"],
html.foxy-geo-restricted [data-commercial-cta="true"] {
  pointer-events: none !important;
  cursor: not-allowed !important;
  opacity: 0.45 !important;
  filter: grayscale(1) !important;
  background-color: #475569 !important;
  border-color: #64748b !important;
  color: #cbd5e1 !important;
}

/* Commercial banners, popups, and hero promo cards suppression */
html.foxy-geo-tier-5 .thelotter-banner-box,
html.foxy-geo-tier-5 .foxy-lottery-banner-container,
html.foxy-geo-tier-5 .foxy-promo-banner,
html.foxy-geo-tier-5 .sl-popup,
html.foxy-geo-restricted .thelotter-banner-box,
html.foxy-geo-restricted .foxy-lottery-banner-container,
html.foxy-geo-restricted .foxy-promo-banner,
html.foxy-geo-restricted .sl-popup {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* ==========================================================================
   Arabic Right-to-Left (RTL) & Cairo Typography Support
   ========================================================================== */

[dir="rtl"],
html[dir="rtl"] {
  direction: rtl;
  text-align: right;
  unicode-bidi: embed;
}

[dir="rtl"] body,
html[dir="rtl"] body {
  direction: rtl;
  text-align: right;
  font-family: 'Cairo', system-ui, -apple-system, sans-serif;
}

/* Typography & Headings in RTL */
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5,
html[dir="rtl"] h6,
html[dir="rtl"] .font-headline-xl,
html[dir="rtl"] .font-headline-lg,
html[dir="rtl"] .font-headline-md,
html[dir="rtl"] .font-label-caps,
html[dir="rtl"] .font-body-lg,
html[dir="rtl"] .font-body-md,
html[dir="rtl"] .font-body-sm {
  font-family: 'Cairo', system-ui, -apple-system, sans-serif;
  text-align: right;
}

/* RTL Lists & Tables */
html[dir="rtl"] ul,
html[dir="rtl"] ol {
  padding-right: 1.5rem;
  padding-left: 0;
  text-align: right;
}

html[dir="rtl"] th,
html[dir="rtl"] td {
  text-align: right;
}

/* RTL CTA Box & Button Orientation */
html[dir="rtl"] .foxy-cta-box {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .foxy-cta-box::before {
  left: auto;
  right: 0;
  background: linear-gradient(270deg, #4edea3, #ffb95f);
}

html[dir="rtl"] .foxy-cta-box .foxy-cta-title,
html[dir="rtl"] .foxy-cta-box .foxy-cta-desc {
  font-family: 'Cairo', system-ui, -apple-system, sans-serif;
  text-align: right;
  direction: rtl;
}

html[dir="rtl"] .foxy-cta-btn,
html[dir="rtl"] a.foxy-cta-btn {
  font-family: 'Cairo', system-ui, -apple-system, sans-serif;
  direction: rtl;
  text-align: right;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
}

/* Telemetry, Lottery Numbers & LTR Isolates */
html[dir="rtl"] .lotto-ball,
html[dir="rtl"] .font-label-numeric,
html[dir="rtl"] .font-label-code,
html[dir="rtl"] [dir="ltr"] {
  direction: ltr;
  unicode-bidi: isolate;
  text-align: left;
}


