/**
 * Style-only PUBG layer for service storefronts (Steam, PlayStation, Xbox, App Store).
 * Keeps each page’s own grid, 2613×602 contain hero, chips, checkout and modals.
 */
body.uppay-page--pubg.uppay-service-storefront {
  --bg: #101318;
  --surface: #1c232d;
  --surface-2: #2a3440;
  --text: #e6ebf2;
  --text-2: #b8c2ce;
  --border: #3e4a58;
  --action: #6fe879;
  --accent: #5ec8ff;
  --accent-cool: #5ec8ff;
  background: #101318;
  color: var(--text);
  font-family: system-ui, "Segoe UI", sans-serif;
}

body.uppay-page--pubg.uppay-service-storefront .font-display {
  font-family: system-ui, "Segoe UI", sans-serif;
  font-weight: 600;
}

body.uppay-page--pubg.uppay-service-storefront header {
  background: transparent !important;
  border-bottom: none !important;
}

body.uppay-page--pubg.uppay-service-storefront .uppay-games-page-shell:has(.steam-checkout-open) {
  z-index: 80;
}

/* Desktop columns lived in uppay-product-page.css; keep them here without that file’s gray fills */
@media (min-width: 1024px) {
  body.uppay-page--pubg.uppay-service-storefront .uppay-product-page.uppay-product-layout--game-flex {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 348px);
    align-items: start;
  }

  body.uppay-page--pubg.uppay-service-storefront .uppay-product-page.uppay-product-layout--game-flex > aside {
    min-width: 0;
  }

  /* Tablet Type 1 hides the rail until 1101px; services keep it from 1024 like the unique-page rail */
  body.uppay-page--pubg.uppay-service-storefront .uppay-games-catalog-rail {
    display: flex !important;
  }

  body.uppay-page--pubg.uppay-service-storefront .uppay-atmo-content:has(> .uppay-games-catalog-rail) > .uppay-product-page {
    padding-top: 0;
    padding-left: 0;
    padding-right: 0;
  }

  body.uppay-page--pubg.uppay-service-storefront .uppay-atmo-content:has(> .uppay-games-catalog-rail) > .ps-page-extra,
  body.uppay-page--pubg.uppay-service-storefront .uppay-atmo-content:has(> .uppay-games-catalog-rail) > .steam-page-extra,
  body.uppay-page--pubg.uppay-service-storefront .uppay-atmo-content:has(> .uppay-games-catalog-rail) > .uppay-reviews-block {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
  }
}

body.uppay-page--pubg.uppay-service-storefront .uppay-product-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: fit-content;
  max-width: 100%;
  padding: 0.4rem 0.75rem 0.4rem 0.5rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #e6ebf2;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
  text-decoration: none;
}

body.uppay-page--pubg.uppay-service-storefront .uppay-product-back:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}

body.uppay-page--pubg.uppay-service-storefront .uppay-product-back__icon {
  flex-shrink: 0;
  width: 1.125rem;
  height: 1.125rem;
}

/* Surfaces: PUBG glass, not the old solid --surface gray */
body.uppay-page--pubg.uppay-service-storefront .steam-bento,
body.uppay-page--pubg.uppay-service-storefront .ps-bento {
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  background: rgba(18, 24, 38, 0.52) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 44px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(28px) saturate(1.2);
  -webkit-backdrop-filter: blur(28px) saturate(1.2);
}

body.uppay-page--pubg.uppay-service-storefront .steam-pay-block,
body.uppay-page--pubg.uppay-service-storefront .ps-pick {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

body.uppay-page--pubg.uppay-service-storefront .steam-step-num {
  width: 1.75rem;
  height: 1.75rem;
  background: rgba(39, 127, 242, 0.2);
  color: #5ea8ff;
  font-size: 0.75rem;
  font-weight: 700;
}

body.uppay-page--pubg.uppay-service-storefront .steam-field-label,
body.uppay-page--pubg.uppay-service-storefront .ps-field-label {
  color: var(--text-2);
  font-weight: 600;
}

body.uppay-page--pubg.uppay-service-storefront .steam-input {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  box-shadow: none;
}

body.uppay-page--pubg.uppay-service-storefront .steam-input::placeholder {
  color: #8b97a6;
}

body.uppay-page--pubg.uppay-service-storefront .steam-input:focus {
  border-color: var(--accent-cool);
  box-shadow: 0 0 0 3px rgba(94, 200, 255, 0.22);
}

body.uppay-page--pubg.uppay-service-storefront #steamCountryGroup.steam-currency-chip-row .uppay-app-region-pill,
body.uppay-page--pubg.uppay-service-storefront .ps-chip {
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  color: var(--text) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

body.uppay-page--pubg.uppay-service-storefront #steamCountryGroup.steam-currency-chip-row .uppay-app-region-pill:hover:not(:disabled),
body.uppay-page--pubg.uppay-service-storefront #steamCountryGroup.steam-currency-chip-row .uppay-app-region-pill.is-on,
body.uppay-page--pubg.uppay-service-storefront .ps-chip:hover,
body.uppay-page--pubg.uppay-service-storefront .ps-chip.is-on {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(140, 185, 255, 0.75) !important;
  color: #ffffff !important;
  box-shadow:
    0 0 0 1px rgba(94, 200, 255, 0.16),
    0 0 18px rgba(39, 127, 242, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

body.uppay-page--pubg.uppay-service-storefront .steam-quick-nominals__btn {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

body.uppay-page--pubg.uppay-service-storefront .steam-quick-nominals__btn:hover {
  border-color: rgba(140, 185, 255, 0.55);
  background: rgba(255, 255, 255, 0.1);
}

body.uppay-page--pubg.uppay-service-storefront .steam-quick-nominals__title,
body.uppay-page--pubg.uppay-service-storefront .steam-wallet-bounds {
  color: var(--text-2);
}

body.uppay-page--pubg.uppay-service-storefront .steam-region-limit-link {
  font-family: system-ui, "Segoe UI", sans-serif;
  color: var(--text-2);
}

body.uppay-page--pubg.uppay-service-storefront .steam-region-limit-link:hover {
  color: var(--text);
}

/* Keep service hero slot: wide contain banner, not Type 1 cover */
body.uppay-page--pubg.uppay-service-storefront .steam-hero-shell,
body.uppay-page--pubg.uppay-service-storefront .ps-hero-shell {
  aspect-ratio: 2613 / 602;
  background: #101318;
}

body.uppay-page--pubg.uppay-service-storefront .steam-hero-banner,
body.uppay-page--pubg.uppay-service-storefront .ps-hero-banner {
  object-fit: contain;
  object-position: center;
}

/* CTA — PUBG checkout green, not the old theme file */
body.uppay-page--pubg.uppay-service-storefront .uppay-cta--buy,
body.uppay-page--pubg.uppay-service-storefront .uppay-hero-modal__submit,
body.uppay-page--pubg.uppay-service-storefront .svc-mob-bar__btn {
  background: #44cf5e !important;
  border: none !important;
  color: #0a0d0a !important;
  font-family: system-ui, "Segoe UI", sans-serif;
  font-weight: 600 !important;
  letter-spacing: -0.01em;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.22);
}

body.uppay-page--pubg.uppay-service-storefront .uppay-cta--buy:hover:not(:disabled),
body.uppay-page--pubg.uppay-service-storefront .uppay-hero-modal__submit:hover:not(:disabled),
body.uppay-page--pubg.uppay-service-storefront .svc-mob-bar__btn:hover:not(:disabled) {
  background: #3cb653 !important;
  color: #0a0d0a !important;
  box-shadow:
    0 10px 32px rgba(0, 0, 0, 0.28),
    0 0 18px rgba(68, 207, 94, 0.28);
  transform: none;
}

body.uppay-page--pubg.uppay-service-storefront .uppay-cta--buy:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

body.uppay-page--pubg.uppay-service-storefront #steamMobileBar,
body.uppay-page--pubg.uppay-service-storefront #psMobileBar {
  background: rgba(8, 10, 20, 0.97);
  border-top: 1px solid var(--border);
}

/* The pay bar lives inside the page shell (z-index 1). Lift Support above it. */
@media (max-width: 1023px) {
  body.uppay-page--pubg.uppay-service-storefront:has(#steamMobileBar.is-visible),
  body.uppay-page--pubg.uppay-service-storefront:has(#psMobileBar.is-visible) {
    --uppay-support-dock-offset: calc(10px + 68px + 12px);
  }
}

body.uppay-page--pubg.uppay-service-storefront .svc-mob-bar__label,
body.uppay-page--pubg.uppay-service-storefront .svc-mob-bar__price {
  color: var(--text);
}

body.uppay-page--pubg.uppay-service-storefront .uppay-storefront-checkout .uppay-checkout-promo,
body.uppay-page--pubg.uppay-service-storefront .uppay-storefront-checkout__total {
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

body.uppay-page--pubg.uppay-service-storefront .uppay-checkout-trust {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-2);
}

body.uppay-page--pubg.uppay-service-storefront .uppay-checkout-trust .uppay-hero-trust-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.25rem 1.75rem;
}

body.uppay-page--pubg.uppay-service-storefront .uppay-checkout-trust .uppay-hero-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

body.uppay-page--pubg.uppay-service-storefront .uppay-checkout-trust .uppay-hero-trust-icon,
body.uppay-page--pubg.uppay-service-storefront .uppay-checkout-trust .uppay-hero-trust-icon--seal {
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  color: #5ec8ff;
}

body.uppay-page--pubg.uppay-service-storefront .uppay-checkout-trust .uppay-hero-trust-icon--seal {
  width: 1.45rem;
  height: 1.45rem;
}

body.uppay-page--pubg.uppay-service-storefront .uppay-storefront-info-surface,
body.uppay-page--pubg.uppay-service-storefront .steam-page-info-surface {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(18, 24, 38, 0.52);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 44px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(28px) saturate(1.2);
  -webkit-backdrop-filter: blur(28px) saturate(1.2);
}

body.uppay-page--pubg.uppay-service-storefront .uppay-storefront-info-surface::before,
body.uppay-page--pubg.uppay-service-storefront .steam-page-info-surface::before {
  background: none;
}

/* Atmosphere: slow live pan once the owner image is in place */
@keyframes uppay-service-atmo-drift {
  0% { transform: scale(1) translate3d(0, 0, 0); }
  50% { transform: scale(1.045) translate3d(-1.2%, -0.8%, 0); }
  100% { transform: scale(1) translate3d(0, 0, 0); }
}

body.uppay-page--pubg.uppay-service-storefront .uppay-games-page-atmosphere__media {
  transform-origin: center top;
}

body.uppay-page--pubg.uppay-service-storefront .uppay-games-page-atmosphere.is-active .uppay-games-page-atmosphere__image {
  animation: uppay-service-atmo-drift 28s ease-in-out infinite;
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  body.uppay-page--pubg.uppay-service-storefront .uppay-games-page-atmosphere.is-active .uppay-games-page-atmosphere__image {
    animation: none;
  }
}
