/**
 * CMS theme tokens — radius, style variants, typography (see SiteLayout + Panel Theme).
 * GGG markup uses Tailwind rounded-full / rounded-lg; these vars override from Panel settings.
 */

body {
  font-family: var(--font-body, ui-sans-serif, system-ui, sans-serif);
  font-weight: var(--font-body-weight, 400);
  background-color: var(--ggg-background, rgb(255 255 255));
  color: var(--ggg-text, rgb(17 24 39));
}

[data-theme="dark"] body {
  background-color: var(--ggg-background-dark, rgb(17 24 39));
  color: var(--ggg-text-dark, rgb(243 244 246));
}

/* Heading block h1/h2 used dark:text-gray-50 — utility missing from built theme.css */
[data-theme="dark"] #content :is(h1, h2).text-gray-900 {
  color: rgb(243 244 246);
}

h1, h2, h3, h4, h5, h6,
.font-heading {
  font-family: var(--font-heading, ui-sans-serif, system-ui, sans-serif);
  font-weight: var(--font-heading-weight, 700);
}

.rounded-full,
button.rounded-full,
a.rounded-full,
.casino-details-btn,
.casino-details-close {
  border-radius: var(--ggg-radius-btn, 9999px) !important;
}

.rounded-lg,
.casino-card.rounded-lg,
.tile-surface.rounded {
  border-radius: var(--ggg-radius-card, 0.5rem) !important;
}

@media (min-width: 768px) {
  .tp-modal-panel {
    border-radius: var(--ggg-radius-card, 0.5rem) !important;
  }
}

/* Style: flat */
body.theme-style-flat .rounded-lg.border,
body.theme-style-flat .casino-card.rounded-lg.border {
  box-shadow: none;
}

/* Style: shadow */
body.theme-style-shadow .rounded-lg.border.bg-white,
body.theme-style-shadow .rounded-lg.border.border-gray-200,
body.theme-style-shadow .casino-card.rounded-lg.border {
  box-shadow: 0 4px 14px -2px rgb(0 0 0 / 0.08), 0 2px 6px -2px rgb(0 0 0 / 0.06);
}

[data-theme="dark"] body.theme-style-shadow .rounded-lg.border.bg-white,
[data-theme="dark"] body.theme-style-shadow .rounded-lg.border.border-gray-200,
[data-theme="dark"] body.theme-style-shadow .casino-card.rounded-lg.border {
  box-shadow: 0 4px 14px -2px rgb(0 0 0 / 0.35);
}

/* Casino listing filter backdrop — keep filter bar above overlay (cards dim via fixed overlay only) */
body.listing-filter-backdrop-open #casino-filter-bar {
  position: relative;
  z-index: 31;
}

body.listing-filter-backdrop-open #casino-cards-container,
body.listing-filter-backdrop-open [data-load-more-controls],
body.listing-filter-backdrop-open .casino-details-content:not(.hidden) {
  pointer-events: none;
}

/* Progressive image reveal (game/casino cards) */
.lazy-blur {
  filter: blur(12px);
  transition: filter 0.4s ease;
}

.lazy-blur.loaded {
  filter: blur(0);
}

/* Top casinos — amber border only (no Tailwind ring: it replaces box-shadow and looks like a heavy blur) */
.casino-card.casino-card-top-ad {
  border-color: rgb(252 211 77) !important;
  box-shadow: none;
}

[data-theme="dark"] .casino-card.casino-card-top-ad {
  border-color: rgb(245 158 11 / 0.5) !important;
}

body.theme-style-shadow .casino-card.casino-card-top-ad {
  box-shadow: 0 4px 14px -2px rgb(0 0 0 / 0.08), 0 2px 6px -2px rgb(0 0 0 / 0.06);
}

[data-theme="dark"] body.theme-style-shadow .casino-card.casino-card-top-ad {
  box-shadow: 0 4px 14px -2px rgb(0 0 0 / 0.35);
}

/* Hero — layered gradient + radial glows (see UI kit hero-bg) */
.hero-bg {
  position: relative;
  overflow: hidden;
  background: linear-gradient(to bottom right, var(--ggg-primary), var(--ggg-secondary));
}

.hero-bg::before {
  content: "";
  position: absolute;
  inset: -1px;
  pointer-events: none;
  background:
    radial-gradient(60% 60% at 80% 10%, rgba(var(--ggg-secondary-rgb, 100 116 139), 0.35), transparent 60%),
    radial-gradient(50% 50% at 10% 20%, rgba(var(--ggg-primary-rgb, 37 99 235), 0.42), transparent 60%),
    radial-gradient(40% 40% at 60% 90%, rgba(var(--ggg-primary-rgb, 37 99 235), 0.28), transparent 60%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.4;
  background-size: 42px 42px;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  -webkit-mask-image: radial-gradient(60% 60% at 50% 30%, #000, transparent);
  mask-image: radial-gradient(60% 60% at 50% 30%, #000, transparent);
}

.gradient-text {
  background: linear-gradient(
    135deg,
    var(--ggg-primary) 0%,
    var(--ggg-secondary) 60%,
    var(--ggg-primary) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-card-glow {
  background: linear-gradient(
    to bottom right,
    rgba(var(--ggg-primary-rgb, 37 99 235), 0.28),
    rgba(var(--ggg-secondary-rgb, 100 116 139), 0.18),
    transparent
  );
}

[data-theme="light"] .hero-bg::before {
  opacity: 0.55;
}

[data-theme="light"] .hero-grid {
  opacity: 0.25;
  background-image:
    linear-gradient(to right, rgba(15, 23, 42, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.05) 1px, transparent 1px);
}
