/* Frontend UI/UX polish — reusable across all public routes and theme colors.
   Small, compositor-friendly transitions; no infinite decorative animation. */
:root {
  --site-ui-ease: cubic-bezier(.2,.7,.2,1);
  --site-ui-fast: 150ms;
  --site-ui-medium: 230ms;
  --site-ui-focus: var(--rtpx-button-accent,var(--accent,#769ded));
}
body:not(.admin-page) {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body:not(.admin-page) :where(main, main section, .shell, .footer-link-columns, .global-footer-root) {
  min-width: 0;
}
body:not(.admin-page) :where(button, input, select, textarea, [role="button"], a) {
  -webkit-tap-highlight-color: transparent;
}
body:not(.admin-page) :where(button, a, [role="button"]):focus-visible {
  outline: 2px solid var(--site-ui-focus);
  outline-offset: 3px;
}
body:not(.admin-page) :where(input, textarea, select):focus-visible {
  outline: 2px solid var(--site-ui-focus);
  outline-offset: 2px;
}
body:not(.admin-page) :where(img, video) {
  max-width: 100%;
}
body:not(.admin-page) :where(.footer-column-heading, .footer-legal, .footer-bottom-copy, .jackpot-detail-value, .home-game-card__title-reveal) {
  overflow-wrap: anywhere;
}
body:not(.admin-page) :where(.global-footer .footer-link-list a,.global-footer .footer-back-top) {
  transition: color var(--site-ui-fast) ease, opacity var(--site-ui-fast) ease;
}
body:not(.admin-page) .global-footer .footer-link-list a:hover {
  color: var(--rtpx-theme-primary,var(--accent,#93b4ff));
}
@media (hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference) {
  body:not(.admin-page) :where(.home-game-card__button,.game-pola-main-button,.jackpot-action-button,.all-wins-load-more,.footer-back-top) {
    transition-property: transform,background-color,border-color,box-shadow,opacity,color;
    transition-duration: var(--site-ui-fast),var(--site-ui-medium),var(--site-ui-medium),var(--site-ui-medium),var(--site-ui-fast),var(--site-ui-fast);
    transition-timing-function: var(--site-ui-ease);
  }
  body:not(.admin-page) :where(.home-game-card__button,.game-pola-main-button,.jackpot-action-button,.all-wins-load-more):not(:disabled):not(.is-disabled):hover {
    transform: translateY(-1px);
  }
  body:not(.admin-page) :where(.home-game-card__button,.game-pola-main-button,.jackpot-action-button,.all-wins-load-more):not(:disabled):not(.is-disabled):active {
    transform: translateY(0);
  }
}
/* Animasi masuk satu kali per dokumen; tidak menggerakkan hero atau gambar saat loading. */
@media (prefers-reduced-motion:no-preference) and (min-width:821px) {
  body:not(.admin-page) :where(.game-pola-main,.jackpot-main,.all-wins-main) {
    animation: site-ui-page-reveal 280ms var(--site-ui-ease) both;
  }
}
@keyframes site-ui-page-reveal {
  from { opacity: .86; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width:820px) {
  body:not(.admin-page) :where(.footer-link-columns,.footer-link-column) { min-width: 0; }
  body:not(.admin-page) :where(.global-footer .footer-link-list a,.global-footer .footer-back-top) { touch-action: manipulation; }
}
@media (prefers-reduced-motion:reduce) {
  body:not(.admin-page) :where(.game-pola-main,.jackpot-main,.all-wins-main) { animation: none !important; }
  body:not(.admin-page) :where(.global-footer a,.home-game-card__button,.game-pola-main-button,.jackpot-action-button) { transition: none !important; }
}
/* The global footer now has two meaningful groups instead of three. */
@media (min-width:821px) {
  body:not(.admin-page) .global-footer .footer-link-columns {
    grid-template-columns: repeat(2,minmax(0,1fr));
    width: min(100%,700px);
  }
}

/* Smart global footer contrast, independent from theme name: supports 10x2 + custom. */
body:not(.admin-page) .global-footer {
  --footer-text:var(--rtpx-footer-text,var(--theme-text,#F2F6FF));
  --footer-text-strong:var(--rtpx-footer-text-strong,var(--theme-text,#FFF));
  --footer-line:var(--rtpx-footer-line,var(--theme-line,rgba(255,255,255,.12)));
  color:var(--footer-text);
}
body:not(.admin-page) .global-footer :where(.footer-link-column a,.footer-legal p,.footer-bottom-copy p) {
  color:var(--footer-text);
}
body:not(.admin-page) .global-footer :where(.footer-column-toggle,.footer-column-heading,.footer-property-logo) {
  color:var(--footer-text-strong);
}
body:not(.admin-page) .global-footer .footer-social a { color:var(--footer-text-strong); }
body:not(.admin-page) .global-footer .footer-link-column a:is(:hover,:focus-visible) {
  color:var(--footer-text-strong);
  text-decoration:underline;
  text-underline-offset:3px;
}
body:not(.admin-page) .global-footer :where(.footer-top,.footer-bottom,.footer-link-column) {
  border-color:var(--footer-line);
}
/* Avoid transitions while an early or late theme update adjusts contrast. */
@media (prefers-reduced-motion:reduce) {
  body:not(.admin-page) .global-footer :where(a,button) { transition:none!important; }
}

/* Light: remove legacy white-on-pale typography on header/action surfaces. */
html[data-site-theme-mode="light"] body:not(.admin-page) :where(.account-actions .sign-in-link,.main-cta__secondary) {
  color:var(--theme-text,#203650);
  border-color:var(--theme-line,rgba(20,40,60,.16));
  background:color-mix(in srgb,var(--theme-container-bg,#e6edf5) 80%,white 20%);
}
html[data-site-theme-mode="light"] body:not(.admin-page) :where(.account-actions .sign-in-link,.main-cta__secondary):is(:hover,:focus-visible) {
  color:var(--theme-text,#203650);
  background:var(--theme-container-bg,#e6edf5);
}
html[data-site-theme-mode="light"] body:not(.admin-page) .global-footer .footer-back-top {
  color:var(--rtpx-button-accent-text,#fff);
}


/* v10.0.8 cross-route adaptive typography — inherits published Night/Light/Custom palette. */
body:not(.admin-page) :where(.game-pola-page,.jackpot-page,.all-wins-page,.home-page) {
  color: var(--theme-text,var(--text,#eef2f8));
}
body:not(.admin-page) :where(.game-pola-page,.jackpot-page,.all-wins-page,.home-page) :where(.game-pola-note p,.game-pola-note strong,.game-pola-step-metric span,.game-pola-step-instruction p,.game-pola-empty,.game-pola-loading,.game-pola-intro-chip--provider) {
  color: var(--theme-muted,var(--muted,var(--theme-text,#eef2f8)));
}
body:not(.admin-page) :where(.sort-menu__option,.simple-menu a,.simple-menu button) {
  color: var(--theme-text,var(--text,#eef2f8));
}
body:not(.admin-page) .global-footer {
  background-color: var(--rtpx-theme-footer-bg,var(--theme-footer-bg,var(--footer-bg)));
  color: var(--rtpx-footer-text-strong,var(--theme-text));
}
body:not(.admin-page) .global-footer :where(.footer-link-list a,.footer-link-column a,.footer-bottom-copy,.footer-legal,.footer-social a,.footer-column-heading) {
  color: var(--rtpx-footer-text,var(--theme-text));
}
body:not(.admin-page) .global-footer :where(.footer-link-list a,.footer-link-column a):hover {
  color: var(--rtpx-footer-text-strong,var(--theme-text));
}
body:not(.admin-page) :where(.jackpot-promo-rich-paragraph,.jackpot-promo-rich-list,.jackpot-content) {
  overflow-wrap: anywhere;
}
body:not(.admin-page) .winner-brand-global-link {
  color: color-mix(in srgb,var(--theme-text,var(--text,#f8f8fa)) 85%,var(--rtpx-theme-primary,var(--accent,#7a9deb)) 15%);
  text-decoration: underline;
  text-decoration-thickness: .085em;
  text-underline-offset: .2em;
  font-weight: 750;
  border-radius: 2px;
  overflow-wrap: anywhere;
  transition: color 140ms ease, background-color 140ms ease;
}
body:not(.admin-page) .winner-brand-global-link:is(:hover,:focus-visible) {
  color: var(--theme-text,var(--text));
  background-color: color-mix(in srgb,var(--rtpx-theme-primary,var(--accent)) 12%,transparent);
}
/* Hover and typography changes avoid any layout shift; accessibility keeps a visible focus ring. */
@media (prefers-reduced-motion:reduce) {
  body:not(.admin-page) .winner-brand-global-link { transition:none; }
}

/* Context-aware text: do not inherit light-page black ink inside a dark card. */
body:not(.admin-page) :is(.home-game-card, .game-pola-card) {
  --text: var(--rtpx-card-text, var(--theme-text));
  --muted: var(--rtpx-card-muted, var(--theme-muted));
}
