/**
 * Shared UI components — loaded after page styles to apply global overrides.
 */

/* === Gradient heading accents (hero / section titles) === */
.gold-text,
h1 .gold-text,
h2 .gold-text,
h3 .gold-text,
.hero-text h1 .gold-text,
.hero-text h1 span.gold-text,
.page-hero h1 .gold-text,
.page-hero h1 span.gold-text {
  display: inline-block;
  color: #60a5fa;
  background-color: transparent;
  background-image: linear-gradient(135deg, #93c5fd 0%, #60a5fa 45%, #2563eb 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  padding: 0.05em 0.1em;
}

.win-brand {
  display: inline-block;
  background-image: linear-gradient(135deg, var(--color-primary-light) 0%, var(--color-primary-soft) 50%, var(--color-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-style: italic;
  font-weight: 900;
  padding: 0.05em 0.1em;
}

/* === Site header === */
.site-header {
  --header-control-h: 44px;
  background: rgba(10, 14, 26, 0.78);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-bottom: 1px solid var(--color-border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
}

.site-header.scrolled {
  background: rgba(8, 12, 22, 0.94);
  border-bottom-color: var(--color-border-light);
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.45),
    0 1px 0 rgba(255, 255, 255, 0.04) inset;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  height: 72px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

/* Logo — homepage pill mark (beats page inline .logo rules) */
.site-header .logo,
.footer-brand .logo {
  flex-shrink: 0;
  display: inline-flex;
  align-items: stretch;
  min-height: var(--header-control-h, 44px);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: none;
  box-shadow: none;
  background: transparent;
  text-decoration: none;
  gap: 0;
  transition:
    transform var(--transition-fast),
    filter var(--transition-fast);
}

.site-header .logo:hover,
.footer-brand .logo:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  border: none;
  box-shadow: none;
}

.site-header .logo-icon,
.footer-brand .logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 10px 10px 14px;
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary-dark));
  border-radius: var(--radius-full) 0 0 var(--radius-full);
  font-family: var(--font-logo);
  font-size: 1.05rem;
  font-weight: 800;
  font-style: normal;
  line-height: 1;
  color: #fff;
  letter-spacing: 0.01em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.site-header .logo span.logo-text,
.footer-brand .logo span.logo-text {
  display: flex;
  align-items: center;
  padding: 10px 16px 10px 10px;
  background: var(--color-bg-secondary);
  color: var(--color-text-primary);
  -webkit-text-fill-color: var(--color-text-primary);
  font-family: var(--font-logo);
  font-size: 1.05rem;
  font-weight: 800;
  font-style: normal;
  line-height: 1;
  letter-spacing: 0.01em;
  border-radius: 0 var(--radius-full) var(--radius-full) 0;
}

.site-header .logo span:not(.logo-text),
.footer-brand .logo span:not(.logo-text) {
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  -webkit-text-fill-color: currentColor;
}

/* Kill generic page .logo span gradient when it would hit .logo-text */
.site-header .logo span.logo-text,
.footer-brand .logo span.logo-text {
  background: var(--color-bg-secondary);
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: var(--color-text-primary);
  color: var(--color-text-primary);
}

.footer-brand .logo {
  width: fit-content;
  align-self: flex-start;
}

/* Navigation pill — height matches logo / 500% BONUS via --header-control-h */
.site-header .nav-menu,
.nav-menu {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: center;
  max-width: max-content;
  margin: 0 auto;
  gap: 4px;
  box-sizing: border-box;
  height: var(--header-control-h, 44px);
  min-height: var(--header-control-h, 44px);
  padding: 3px;
  background: rgba(255, 255, 255, 0.04);
  border: none;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  list-style: none;
}

.site-header .nav-menu a,
.nav-menu a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1;
  height: 100%;
  padding: 0 14px;
  border-radius: var(--radius-full);
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.site-header .nav-menu a:hover,
.nav-menu a:hover {
  color: var(--color-text-primary);
  background: rgba(255, 255, 255, 0.07);
}

.site-header .nav-menu a.active,
.nav-menu a.active {
  color: var(--color-text-primary);
  background: linear-gradient(
    135deg,
    var(--color-primary-a20),
    rgba(99, 160, 255, 0.1)
  );
  box-shadow:
    inset 0 0 0 1px var(--color-primary-a25),
    0 2px 10px var(--color-primary-a10);
  font-weight: 600;
}

/* Mobile menu toggle */
.site-header .mobile-toggle,
.mobile-toggle {
  display: none;
  flex-shrink: 0;
  flex-direction: column;
  gap: 5px;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  border: none;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
  outline: none;
}

.site-header .mobile-toggle:hover,
.mobile-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

.site-header .mobile-toggle:focus,
.mobile-toggle:focus,
.site-header .mobile-toggle:focus-visible,
.mobile-toggle:focus-visible {
  outline: none;
  box-shadow: none;
}

.site-header .mobile-toggle span,
.mobile-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--color-text-secondary);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.site-header .mobile-toggle.active span:nth-child(1),
.mobile-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.site-header .mobile-toggle.active span:nth-child(2),
.mobile-toggle.active span:nth-child(2) {
  opacity: 0;
}

.site-header .mobile-toggle.active span:nth-child(3),
.mobile-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* === Header CTA bonus button === */
.header-bonus-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: var(--header-control-h, 44px);
  height: var(--header-control-h, 44px);
  padding: 0 20px 0 6px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, transparent 38%),
    linear-gradient(135deg, #16a34a 0%, var(--color-cta-mid) 55%, #14532d 100%);
  color: var(--color-text-inverse);
  font-family: var(--font-logo);
  font-size: 0.84375rem !important;
  font-weight: 400;
  line-height: 1;
  text-decoration: none;
  border-radius: var(--radius-full);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  flex-shrink: 0;
  border: none;
  box-shadow: 0 6px 20px rgba(22, 163, 74, 0.28);
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-normal),
    background var(--transition-normal);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  z-index: 0;
  isolation: isolate;
}

.header-bonus-btn::before {
  content: '';
  position: absolute;
  top: -30%;
  left: 0;
  width: 55%;
  height: 160%;
  border-radius: inherit;
  background: linear-gradient(
    100deg,
    transparent 0%,
    transparent 30%,
    rgba(255, 255, 255, 0.03) 40%,
    rgba(255, 255, 255, 0.1) 46%,
    rgba(255, 255, 255, 0.22) 50%,
    rgba(255, 255, 255, 0.1) 54%,
    rgba(255, 255, 255, 0.03) 60%,
    transparent 70%,
    transparent 100%
  );
  transform: translateX(-180%) skewX(-12deg);
  animation: headerBonusShine 2.4s linear infinite;
  pointer-events: none;
  z-index: 2;
  will-change: transform;
  filter: blur(0.4px);
  opacity: 1;
}

.header-bonus-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 20% 0%, rgba(255, 255, 255, 0.14), transparent 55%);
  pointer-events: none;
  opacity: 0.9;
  z-index: 0;
}

.header-bonus-btn > span:first-child,
.header-bonus-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-left: 2px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  box-shadow: none;
  font-size: 1rem !important;
  line-height: 1 !important;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.header-bonus-btn .btn-text-full,
.header-bonus-btn .btn-text-short {
  position: relative;
  z-index: 1;
}

.header-bonus-btn:hover {
  transform: translateY(-1px);
  color: var(--color-text-inverse);
  box-shadow: 0 10px 28px rgba(22, 163, 74, 0.38);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, transparent 38%),
    linear-gradient(135deg, #22c55e 0%, var(--color-cta-mid) 52%, #166534 100%);
}

.header-bonus-btn:hover::before {
  animation-duration: 1.8s;
}

.header-bonus-btn:hover::after {
  opacity: 1;
}

.header-bonus-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.24);
}

.header-bonus-btn:focus-visible {
  outline: 2px solid #86efac;
  outline-offset: 3px;
}

.btn-text-full {
  display: inline;
}

.btn-text-short {
  display: none;
}

/* Desktop / tablet: always full CTA label */
@media (min-width: 769px) {
  .site-header .header-bonus-btn .btn-text-full,
  .header-bonus-btn .btn-text-full {
    display: inline !important;
  }

  .site-header .header-bonus-btn .btn-text-short,
  .header-bonus-btn .btn-text-short {
    display: none !important;
  }
}

@keyframes headerBonusShine {
  0% {
    transform: translateX(-180%) skewX(-12deg);
  }
  100% {
    transform: translateX(220%) skewX(-12deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .header-bonus-btn::before {
    animation: none;
    opacity: 0;
  }
}

@media (max-width: 1200px) {
  .site-header {
    --header-control-h: 42px;
  }

  .site-header .header-inner,
  .header-inner {
    height: 68px;
    padding: 0 16px;
    gap: 10px;
  }

  .site-header .logo,
  .footer-brand .logo {
    min-height: var(--header-control-h, 42px);
  }

  .site-header .logo-icon,
  .footer-brand .logo-icon {
    padding: 10px 10px 10px 14px;
    font-size: 1.05rem;
  }

  .site-header .logo span.logo-text,
  .footer-brand .logo span.logo-text {
    padding: 10px 16px 10px 10px;
    font-size: 1.05rem;
  }

  .site-header .nav-menu,
  .nav-menu {
    /* Shrink-wrap the pill; center while it fits; scroll from the left when clipped */
    flex: 0 1 auto;
    width: max-content;
    max-width: 100%;
    min-width: 0;
    margin-left: auto;
    margin-right: auto;
    justify-content: flex-start;
    gap: 2px;
    padding: 3px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .site-header .nav-menu::-webkit-scrollbar,
  .nav-menu::-webkit-scrollbar {
    display: none;
  }

  /* Keep welcome bonus CTA visible on tablets — never collapse into the menu */
  .site-header .header-bonus-btn,
  .header-bonus-btn {
    display: inline-flex !important;
    visibility: visible !important;
    flex-shrink: 0;
    min-height: var(--header-control-h, 42px);
    height: var(--header-control-h, 42px);
    padding: 0 14px 0 5px;
    letter-spacing: 0.04em;
    gap: 7px;
  }

  .header-bonus-btn .btn-text-full {
    display: inline !important;
  }

  .header-bonus-btn .btn-text-short {
    display: none !important;
  }

  .header-bonus-btn > span:first-child,
  .header-bonus-btn-icon {
    width: 30px;
    height: 30px;
  }

  .site-header .mobile-toggle,
  .mobile-toggle {
    display: none !important;
  }
}

@media (max-width: 1024px) {
  .header-inner {
    padding: 0 var(--spacing-md);
    gap: var(--spacing-sm);
  }

  .header-bonus-btn {
    min-height: var(--header-control-h, 42px);
    height: var(--header-control-h, 42px);
    padding: 0 16px 0 5px;
    gap: 8px;
  }

  .header-bonus-btn > span:first-child,
  .header-bonus-btn-icon {
    width: 30px;
    height: 30px;
  }
}

@media (max-width: 768px) {
  .site-header {
    --header-control-h: 40px;
  }

  .site-header .header-inner,
  .header-inner {
    height: 64px;
    padding: 0 var(--spacing-lg);
    gap: 10px;
  }

  .site-header .nav-menu,
  .nav-menu {
    position: fixed !important;
    top: 64px !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 999 !important;
    display: flex !important;
    flex: none !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    max-width: none !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 16px !important;
    gap: 4px !important;
    border-radius: 0 !important;
    border: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45) !important;
    background: rgba(10, 14, 26, 0.98) !important;
    backdrop-filter: blur(24px) !important;
    -webkit-backdrop-filter: blur(24px) !important;
    transform: translateY(-120%) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    max-height: calc(100vh - 64px) !important;
    transition:
      transform 0.28s ease,
      opacity 0.28s ease !important;
  }

  .site-header .nav-menu.active,
  .nav-menu.active {
    transform: translateY(0) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  .site-header .nav-menu a,
  .nav-menu a {
    display: flex;
    width: 100%;
    height: auto;
    padding: 14px 16px;
    line-height: 1.25;
    border-radius: 10px;
    color: var(--color-text-secondary);
  }

  .site-header .nav-menu a:hover,
  .site-header .nav-menu a.active,
  .nav-menu a:hover,
  .nav-menu a.active {
    color: var(--color-text-primary);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: none;
  }

  .site-header .logo-icon,
  .footer-brand .logo-icon {
    padding: 10px 10px 10px 14px;
    font-size: 1.05rem;
  }

  .site-header .logo span.logo-text,
  .footer-brand .logo span.logo-text {
    padding: 10px 16px 10px 10px;
    font-size: 1.05rem;
  }

  .site-header .header-bonus-btn,
  .header-bonus-btn {
    min-height: var(--header-control-h, 40px);
    height: var(--header-control-h, 40px);
    padding: 0 14px 0 4px;
    letter-spacing: 0.05em;
  }

  .site-header .header-bonus-btn .btn-text-full,
  .header-bonus-btn .btn-text-full {
    display: none !important;
  }

  .site-header .header-bonus-btn .btn-text-short,
  .header-bonus-btn .btn-text-short {
    display: inline !important;
  }

  .site-header .mobile-toggle,
  .mobile-toggle {
    display: flex !important;
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 480px) {
  .site-header {
    --header-control-h: 38px;
  }

  .btn-text-full {
    display: none !important;
  }

  .btn-text-short {
    display: inline !important;
  }

  .site-header .header-inner,
  .header-inner {
    height: 60px;
    padding: 0 var(--spacing-md);
  }

  .site-header .nav-menu,
  .nav-menu {
    top: 60px !important;
    max-height: calc(100vh - 60px) !important;
  }

  .site-header .logo,
  .footer-brand .logo {
    min-height: var(--header-control-h, 38px);
  }

  .site-header .logo-icon,
  .footer-brand .logo-icon {
    padding: 10px 10px 10px 14px;
    font-size: 1.05rem;
  }

  .site-header .logo span.logo-text,
  .footer-brand .logo span.logo-text {
    padding: 10px 16px 10px 10px;
    font-size: 1.05rem;
  }

  .site-header .header-bonus-btn,
  .header-bonus-btn {
    min-height: var(--header-control-h, 38px);
    height: var(--header-control-h, 38px);
    padding: 0 12px 0 4px;
    gap: 6px;
  }

  .header-bonus-btn > span:first-child,
  .header-bonus-btn-icon {
    width: 28px;
    height: 28px;
  }

  .site-header .mobile-toggle,
  .mobile-toggle {
    width: 38px;
    height: 38px;
  }
}

/* === Responsive info-table (compact list on mobile) === */
@media (max-width: 768px) {
  .table-wrapper {
    overflow-x: visible;
    border: none;
    box-shadow: none;
    background: transparent;
  }

  .table-wrapper::after {
    display: none;
  }

  .info-table thead {
    display: none;
  }

  .info-table,
  .info-table tbody,
  .info-table tr,
  .info-table th,
  .info-table td {
    display: block;
    width: 100%;
    border-radius: 0 !important;
  }

  .info-table {
    border-radius: 0;
    border-collapse: collapse;
  }

  /* Key/value rows as a flat list inside the parent card */
  .info-table tbody tr {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
    margin: 0;
    padding: 14px 18px;
    background: transparent;
    border: none;
    border-radius: 0;
    border-left: 2px solid transparent;
    box-shadow: none;
    overflow: visible;
    transition: background 0.2s ease, border-color 0.2s ease;
  }

  .info-table tbody tr:nth-child(odd) {
    background: rgba(255, 255, 255, 0.025);
  }

  .info-table th,
  .info-table td {
    border: none !important;
    border-bottom: none !important;
    border-left: none !important;
  }

  .info-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.07);
    border-left-color: rgba(96, 165, 250, 0.75);
    box-shadow: none;
  }

  .info-table tbody tr:hover td,
  .info-table tbody tr:hover th {
    background: transparent !important;
    color: inherit;
  }

  /* Label */
  .info-table tbody th,
  .info-table tbody td:first-child {
    grid-column: unset;
    width: 100%;
    font-size: 0.6875rem;
    font-weight: 700;
    color: rgba(148, 163, 184, 0.95);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0;
    margin: 0;
    border: none;
    background: none !important;
    border-left: none !important;
    white-space: normal;
  }

  /* Value */
  .info-table td {
    padding: 0;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.35;
    display: block;
    background: transparent !important;
    border-left: none !important;
    color: rgba(248, 250, 252, 0.96);
  }

  .info-table tbody td:last-child,
  .info-table tbody th + td,
  .info-table tbody th + td:last-child,
  .info-table tbody td:first-child + td:last-child,
  .info-table tbody th ~ td {
    padding: 0;
  }

  .info-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(148, 163, 184, 0.95);
    opacity: 1;
    margin-bottom: 5px;
  }

  .info-table td:first-child::before,
  .info-table tbody th + td::before {
    display: none;
  }

  /* RTP / providers mobile cards are styled in page CSS */
}

/* === Game cards — keep thumbnails bright (no bottom fade) === */
.popular-game-thumb::after,
.new-release-thumb::after,
.game-highlight-banner::after {
  display: none !important;
}

/* === CTA primary button — center icon + label === */
.cta-btn-main {
  display: inline-flex !important;
  justify-content: center !important;
  align-items: center !important;
  line-height: 1 !important;
  padding-top: 14px !important;
  padding-bottom: 15px !important;
  text-align: center;
}

.cta-btn-main svg {
  display: block;
  flex-shrink: 0;
  transform: translateY(1px);
}

@media (max-width: 768px) {
  .cta-links-row {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .cta-links-row .cta-btn-main {
    width: 100%;
    max-width: 100%;
    justify-content: center !important;
    padding-left: 22px !important;
    padding-right: 22px !important;
    font-size: 0.8125rem !important;
    letter-spacing: 0.02em !important;
  }

  .cta-links-row .cta-btn-secondary {
    width: 100%;
    max-width: 100%;
    justify-content: center;
  }
}

/* === Stat cards — vertically center value + label (grid stretch equalizes row height) === */
.stat-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* Multi-select Filter: zero-result options (live counts) */
.games-filter-option.is-empty,
.games-studios-option.is-empty {
  opacity: 0.35;
  pointer-events: none;
}
