/* Game and premium purchase pages. Dense tiles, short header. Both themes. */

body[data-page="game.show"] .hero-slider-wrap {
  display: none !important;
}
body[data-page="game.show"] .lg\:col-span-4 > .relative.z-10,
body[data-page="game.show"] .lg\:col-span-4 .-mt-8,
body[data-page="game.show"] .lg\:col-span-4 .-mt-10 {
  margin-top: 0 !important;
}

body[data-page="game.show"],
body[data-page="game.show"] #main-content {
  background: #eceef1 !important;
}
html[data-theme="dark"] body[data-page="game.show"],
html[data-theme="dark"] body[data-page="game.show"] #main-content {
  background: #111318 !important;
}
body[data-page="game.show"] #main-content .min-h-screen {
  background: transparent !important;
}
body[data-page="game.show"] .lg\:grid-cols-12 {
  grid-template-columns: minmax(0, 1fr) !important;
}
body[data-page="game.show"] .lg\:max-w-5xl {
  max-width: 1040px !important;
}
@media (min-width: 1024px) {
  body[data-page="game.show"] .lg\:col-span-4,
  body[data-page="game.show"] .lg\:col-span-8 {
    grid-column: 1 / -1 !important;
  }
}
body[data-page="game.show"] #orderForm :is(.aj-gp-main, .aj-gp-side) > .rounded-xl,
body[data-page="game.show"] .lg\:col-span-4 > .relative.z-10 {
  background: #ffffff !important;
  border: 1px solid rgba(15, 23, 42, .12) !important;
  border-radius: 12px !important;
  box-shadow: none !important;
}
html[data-theme="dark"] body[data-page="game.show"] #orderForm :is(.aj-gp-main, .aj-gp-side) > .rounded-xl,
html[data-theme="dark"] body[data-page="game.show"] .lg\:col-span-4 > .relative.z-10 {
  background: #1f2126 !important;
  border-color: rgba(255, 255, 255, .14) !important;
}
body[data-page="game.show"] #orderForm input {
  background: #f5f6f8 !important;
  border: 1px solid rgba(15, 23, 42, .18) !important;
  border-radius: 8px !important;
  color: #0f172a !important;
}
html[data-theme="dark"] body[data-page="game.show"] #orderForm input {
  background: #222630 !important;
  border-color: rgba(255, 255, 255, .28) !important;
  color: #ffffff !important;
}

body[data-page="game.show"] #orderForm h3.font-semibold {
  margin: 4px 0 10px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  color: #25282d !important;
}
html[data-theme="dark"] body[data-page="game.show"] #orderForm h3.font-semibold {
  color: #f1f2f4 !important;
}

body[data-page="game.show"] #uncategorizedGrid,
body[data-page="game.show"] [id^="categoryGrid-"] {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
@media (min-width: 640px) {
  body[data-page="game.show"] #uncategorizedGrid,
  body[data-page="game.show"] [id^="categoryGrid-"] {
    gap: 14px;
  }
}
@media (min-width: 900px) {
  body[data-page="game.show"] #uncategorizedGrid,
  body[data-page="game.show"] [id^="categoryGrid-"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
  }
}

body[data-page="game.show"] button.product-card {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  min-height: 70px !important;
  height: 100%;
  padding: 10px !important;
  border-radius: 8px !important;
  text-align: left !important;
  background: #ffffff !important;
  border: 2px solid transparent !important;
  color: #0f172a !important;
  box-shadow: none;
  transition: transform .3s cubic-bezier(.22,.61,.36,1), box-shadow .3s ease, border-color .2s ease;
}
@media (min-width: 900px) {
  body[data-page="game.show"] button.product-card {
    min-height: 80px !important;
    gap: 14px !important;
    padding: 12px !important;
  }
}
html[data-theme="dark"] body[data-page="game.show"] button.product-card {
  background: #1a1d24 !important;
  color: #ffffff !important;
}
body[data-page="game.show"] button.product-card .flex-1 {
  order: 2;
  flex: 1;
  width: auto;
  min-width: 0;
  overflow: hidden !important;
  text-align: left !important;
}
body[data-page="game.show"] button.product-card .flex-shrink-0 {
  order: 0;
  width: 44px;
  height: 44px;
  border-radius: 6px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #f3f4f6;
  flex-shrink: 0;
}
@media (min-width: 900px) {
  body[data-page="game.show"] button.product-card .flex-shrink-0 {
    width: 60px;
    height: 60px;
  }
}
html[data-theme="dark"] body[data-page="game.show"] button.product-card .flex-shrink-0 {
  background: #222630;
}
body[data-page="game.show"] button.product-card img {
  width: 44px !important;
  height: 44px !important;
  object-fit: contain;
  transition: transform .3s cubic-bezier(.22,.61,.36,1);
}
@media (min-width: 900px) {
  body[data-page="game.show"] button.product-card img {
    width: 60px !important;
    height: 60px !important;
  }
}
body[data-page="game.show"] button.product-card:hover img {
  transform: scale(1.08);
}
body[data-page="game.show"] button.product-card .product-name {
  display: -webkit-box !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  text-align: left !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  min-height: 0;
  overflow: hidden !important;
  white-space: normal !important;
  color: inherit !important;
}
@media (min-width: 900px) {
  body[data-page="game.show"] button.product-card .product-name {
    font-size: 16px !important;
  }
}
body[data-page="game.show"] button.product-card .product-price {
  justify-content: flex-start !important;
  margin-top: 2px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  color: rgba(15, 23, 42, .7) !important;
}
@media (min-width: 900px) {
  body[data-page="game.show"] button.product-card .product-price {
    font-size: 13px !important;
  }
}
html[data-theme="dark"] body[data-page="game.show"] button.product-card .product-price {
  color: rgba(255, 255, 255, .7) !important;
}
body[data-page="game.show"] button.product-card:hover:not(.selected) {
  border-color: #555b64 !important;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .18);
}
html[data-theme="dark"] body[data-page="game.show"] button.product-card:hover:not(.selected) {
  border-color: #d5d9e0 !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .35);
}
body[data-page="game.show"] button.product-card.selected {
  background: #ffffff !important;
  border-color: #555b64 !important;
  color: #0f172a !important;
  box-shadow: 0 0 0 1px #555b64 !important;
}
html[data-theme="dark"] body[data-page="game.show"] button.product-card.selected {
  background: #1a1d24 !important;
  border-color: #d5d9e0 !important;
  color: #ffffff !important;
  box-shadow: 0 0 0 1px #d5d9e0 !important;
}
body[data-page="game.show"] button.product-card.selected::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #555b64 url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='white' d='M6.4 11.2 3.2 8l1.1-1.1 2.1 2.1 5.2-5.2L12.7 5z'/></svg>") center / 10px no-repeat;
}
html[data-theme="dark"] body[data-page="game.show"] button.product-card.selected::after {
  background-color: #d5d9e0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='%230f172a' d='M6.4 11.2 3.2 8l1.1-1.1 2.1 2.1 5.2-5.2L12.7 5z'/></svg>");
}

/* Premium purchase: same light gray / near-black page as the game page. */
body[data-page="premium.show"] .aj-product {
  background: #eceef1;
}
html[data-theme="dark"] body[data-page="premium.show"] .aj-product {
  background: #111318;
}
body[data-page="premium.show"] .aj-hero {
  min-height: 0 !important;
  background: #ffffff;
}
html[data-theme="dark"] body[data-page="premium.show"] .aj-hero { background: #191b21; }
body[data-page="premium.show"] .aj-hero-art,
body[data-page="premium.show"] .aj-hero-shade { display: none; }
body[data-page="premium.show"] .aj-hero-body {
  min-height: 0 !important;
  align-items: center;
  padding: 14px 16px !important;
}
body[data-page="premium.show"] .aj-hero h1 { color: #111827; }
html[data-theme="dark"] body[data-page="premium.show"] .aj-hero h1 { color: #f8fafc; }
body[data-page="premium.show"] .aj-hero p { color: #64748b; }
body[data-page="premium.show"] .aj-hero-logo {
  width: 64px;
  height: 64px;
  box-shadow: none;
}
body[data-page="premium.show"] .aj-plans {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 640px) {
  body[data-page="premium.show"] .aj-plans { grid-template-columns: 1fr 1fr; }
}
body[data-page="premium.show"] .aj-plans .ds-option {
  position: relative;
  display: flex !important;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  padding: 12px 40px 12px 14px;
  border-radius: 8px;
  border-width: 2px;
  transition: transform .3s cubic-bezier(.22,.61,.36,1), box-shadow .3s ease, border-color .2s ease;
}
body[data-page="premium.show"] .aj-plans .ds-option:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .16);
}
body[data-page="premium.show"] .aj-plans .ds-check {
  position: absolute;
  top: 12px;
  right: 12px;
}
body[data-page="premium.show"] .aj-plans .text-base.font-bold {
  font-size: 13px;
  letter-spacing: 0;
  color: rgba(15, 23, 42, .7);
}
html[data-theme="dark"] body[data-page="premium.show"] .aj-plans .text-base.font-bold {
  color: rgba(255, 255, 255, .7);
}
html[data-theme="dark"] body[data-page="premium.show"] .aj-plans .ds-option.is-selected .text-base.font-bold,
html[data-theme="dark"] body[data-page="premium.show"] .aj-plans .ds-option[aria-checked="true"] .text-base.font-bold {
  color: #bfdbfe;
}

/* CapCut Pro: its logo is black on transparent, so it vanished on dark cards.
   In dark mode flip it to white (CapCut's own dark-mode look). */
html[data-theme="dark"] img[alt^="CapCut" i],
html[data-theme="dark"] a[href$="/premium/capcut-pro"] img,
html[data-theme="dark"] body[data-page="premium.show"]:has(a[href$="/premium/capcut-pro"], link[href$="/premium/capcut-pro"]) .aj-hero-logo,
html[data-theme="dark"] img[src*="x9e9cf69uewxskakulpt1x9rcrdv85dvoxeshwhr"] {
  filter: invert(1) hue-rotate(180deg);
}


/* ==================================================================
   Game top-up page layout, 2026-11-18
   Desktop (>=1024px): two columns.
     main  : banner (smaller), game card, 1 Account, 2 Packages
     side  : 3 Redeem, 4 Payment, total + Pay Now (stays on screen)
   Phone/tablet: one column in the same 1-2-3-4 order + fixed bottom pay bar.
   Template wrappers: .aj-gp / .aj-gp-main / .aj-gp-side in storefront/game/show.blade.php
   ================================================================== */
body[data-page="game.show"] .aj-gp-main > .rounded-xl,
body[data-page="game.show"] .aj-gp-side > .rounded-xl { margin-bottom: 12px !important; }

/* Compact step headers */
body[data-page="game.show"] #orderForm :is(.aj-gp-main, .aj-gp-side) > .rounded-xl > .border-b {
  padding-top: 10px !important;
  padding-bottom: 10px !important;
}
body[data-page="game.show"] #orderForm :is(.aj-gp-main, .aj-gp-side) > .rounded-xl > .border-b h3 {
  font-size: 15px !important;
  margin: 0 !important;
}

/* Payment method: a compact row instead of a tall box */
body[data-page="game.show"] .payment-method-btn {
  min-height: 0 !important;
  height: auto !important;
  padding: 10px 12px !important;
  gap: 10px !important;
}
body[data-page="game.show"] .payment-method-btn img { width: 36px !important; height: 36px !important; }
body[data-page="game.show"] .payment-method-btn .text-sm.sm\:text-base { font-size: 14px !important; }
body[data-page="game.show"] .payment-method-btn .text-xs.sm\:text-sm { font-size: 12px !important; margin-top: 2px !important; }
body[data-page="game.show"] .payment-method-btn .tick-indicator { transform: scale(.75); transform-origin: top right; }

@media (min-width: 1024px) {
  body[data-page="game.show"] .lg\:max-w-5xl { max-width: 1200px !important; }

  body[data-page="game.show"] .aj-gp.lg\:grid-cols-12 {
    grid-template-columns: minmax(0, 1fr) 360px !important;
    column-gap: 20px !important;
    row-gap: 0 !important;
    align-items: start;
  }
  body[data-page="game.show"] .aj-gp > .lg\:col-span-4 { grid-column: 1 !important; grid-row: 1; margin-bottom: 12px !important; }
  /* banner smaller: banner and game card side by side */
  body[data-page="game.show"] .aj-gp > .lg\:col-span-4 {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 12px;
    align-items: start;
  }
  body[data-page="game.show"] .aj-gp > .lg\:col-span-4 > :first-child { margin-bottom: 0 !important; border-radius: 12px; }
  body[data-page="game.show"] .aj-gp > .lg\:col-span-4 > .relative.z-10 { align-self: stretch; }
  body[data-page="game.show"] .aj-gp > .lg\:col-span-4 > .relative.z-10 .whitespace-nowrap { flex-wrap: wrap; white-space: normal; row-gap: 4px; }
  body[data-page="game.show"] .aj-gp > .lg\:col-span-8,
  body[data-page="game.show"] .aj-gp #orderForm { display: contents; }
  body[data-page="game.show"] .aj-gp-main { grid-column: 1; grid-row: 2; margin-top: 0 !important; min-width: 0; }
  body[data-page="game.show"] .aj-gp-side { grid-column: 2; grid-row: 1 / span 2; margin-top: 0 !important; align-self: start; min-width: 0; }

  /* the side column follows the page while the user scrolls the package list */
  body[data-page="game.show"] .aj-gp-side { position: sticky; top: 84px; }

  /* side column is narrow: one payment method per row */
  body[data-page="game.show"] .aj-gp-side .grid.sm\:grid-cols-2 { grid-template-columns: minmax(0, 1fr) !important; }

  /* total + Pay Now: stacked, full-width button, no longer floating at the page bottom */
  body[data-page="game.show"] .aj-gp-side #summaryBarDesktop {
    position: relative !important;
    bottom: auto !important;
    box-shadow: none !important;
  }
  body[data-page="game.show"] .aj-gp-side #summaryBarDesktop > div {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
  }
  body[data-page="game.show"] .aj-gp-side #summaryBarDesktop #selectedItem { max-width: 240px; }
  body[data-page="game.show"] .aj-gp-side #buyNowBtn { width: 100% !important; padding: 12px 16px !important; }

  /* packages: 4 compact tiles per row */
  body[data-page="game.show"] .aj-gp-main #uncategorizedGrid,
  body[data-page="game.show"] .aj-gp-main [id^="categoryGrid-"] {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }
  body[data-page="game.show"] .aj-gp-main button.product-card {
    min-height: 64px !important;
    gap: 10px !important;
    padding: 8px 10px 30px !important;
  }
  body[data-page="game.show"] .aj-gp-main button.product-card .flex-shrink-0,
  body[data-page="game.show"] .aj-gp-main button.product-card img { width: 40px !important; height: 40px !important; }
  body[data-page="game.show"] .aj-gp-main button.product-card .product-name { font-size: 13.5px !important; }
  body[data-page="game.show"] .aj-gp-main button.product-card .product-price { font-size: 12.5px !important; }
}
@media (min-width: 1024px) and (max-width: 1279.98px) {
  body[data-page="game.show"] .aj-gp-main #uncategorizedGrid,
  body[data-page="game.show"] .aj-gp-main [id^="categoryGrid-"] { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
/* short laptop screens: let the side column scroll with the page instead of being cut off */
@media (min-width: 1024px) and (max-height: 699.98px) {
  body[data-page="game.show"] .aj-gp-side { position: static; }
}
/* light theme: package tiles were white on a white card */
html:not([data-theme="dark"]) body[data-page="game.show"] button.product-card:not(.selected) { background: #f3f5f8 !important; }

/* 2026-11-18 audit fixes */
/* game name: wrap instead of "MLBB ..." when the card is narrow */
body[data-page="game.show"] .aj-gp > .lg\:col-span-4 > .relative.z-10 h1.truncate { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
/* tablets: banner + game card side by side too, so the banner is not full width */
@media (min-width: 640px) and (max-width: 1023.98px) {
  body[data-page="game.show"] .aj-gp > .lg\:col-span-4 {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 12px;
    align-items: start;
  }
  body[data-page="game.show"] .aj-gp > .lg\:col-span-4 > :first-child { margin-bottom: 0 !important; border-radius: 12px; }
  body[data-page="game.show"] .aj-gp > .lg\:col-span-4 > .relative.z-10 { align-self: stretch; }
  body[data-page="game.show"] .aj-gp > .lg\:col-span-4 > .relative.z-10 .whitespace-nowrap { flex-wrap: wrap; white-space: normal; row-gap: 4px; }
}
/* phone pay bar: show $0.00 before a package is picked instead of an empty total */
#totalPriceMobile:empty::before { content: "$0.00 USD"; }
/* the temple skyline decoration (kh-site-bg.css ::after) spans both columns of the banner/card row */
@media (min-width: 640px) {
  body[data-page="game.show"] .aj-gp > .lg\:col-span-4::after { grid-column: 1 / -1; }
}

/* ==================================================================
   Buttons v2 (2026-11-18): rounded, soft blue gradient, normal case.
   Verify Account / Apply / Buy Now -> share one style; clear grey disabled state.
   ================================================================== */
body[data-page="game.show"] :is(#checkUsernameBtn, #applyCouponBtn, #buyNowBtn, #buyNowBtnMobile) {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%) !important;
  color: #ffffff !important;
  border: 0 !important;
  border-radius: 12px !important;
  font-family: Inter, "Kantumruy Pro", system-ui, sans-serif !important;
  font-weight: 600 !important;
  font-size: 15px !important;
  letter-spacing: .01em !important;
  text-transform: none !important;
  box-shadow: 0 8px 18px -10px rgba(37, 99, 235, .85);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
  opacity: 1 !important;
}
body[data-page="game.show"] #checkUsernameBtn { width: 100%; min-height: 44px; }
body[data-page="game.show"] #applyCouponBtn { min-height: 40px; padding: 0 18px !important; font-size: 14px !important; }
body[data-page="game.show"] #buyNowBtn { min-height: 50px; font-size: 16px !important; }
body[data-page="game.show"] #buyNowBtnMobile { min-height: 46px; padding: 0 20px !important; }
body[data-page="game.show"] :is(#checkUsernameBtn, #applyCouponBtn, #buyNowBtn, #buyNowBtnMobile) span { text-transform: none !important; letter-spacing: inherit !important; font-size: inherit !important; }
body[data-page="game.show"] .aj-btn-arrow { font-size: 1.05em; transition: transform .15s ease; }
@media (hover: hover) {
  body[data-page="game.show"] :is(#checkUsernameBtn, #applyCouponBtn, #buyNowBtn, #buyNowBtnMobile):not(:disabled):hover {
    transform: translateY(-1px);
    filter: brightness(1.07);
    box-shadow: 0 12px 22px -12px rgba(37, 99, 235, .95);
  }
  body[data-page="game.show"] :is(#buyNowBtn, #buyNowBtnMobile):not(:disabled):hover .aj-btn-arrow { transform: translateX(3px); }
}
body[data-page="game.show"] :is(#checkUsernameBtn, #applyCouponBtn, #buyNowBtn, #buyNowBtnMobile):not(:disabled):active { transform: scale(.98); }
body[data-page="game.show"] :is(#checkUsernameBtn, #applyCouponBtn, #buyNowBtn, #buyNowBtnMobile):disabled {
  background: #e2e8f0 !important;
  color: #94a3b8 !important;
  box-shadow: none;
  cursor: not-allowed;
}
html[data-theme="dark"] body[data-page="game.show"] :is(#checkUsernameBtn, #applyCouponBtn, #buyNowBtn, #buyNowBtnMobile):disabled {
  background: #262b36 !important;
  color: #6b7486 !important;
}

/* "Select" chip on each package tile; turns into "Selected" */
body[data-page="game.show"] button.product-card { padding-bottom: 30px !important; }
body[data-page="game.show"] button.product-card .aj-pick {
  position: absolute;
  right: 8px;
  bottom: 7px;
  z-index: 2;
  padding: 4px 10px;
  border-radius: 999px;
  font: 600 11px/1 Inter, system-ui, sans-serif;
  color: #2563eb;
  background: rgba(37, 99, 235, .10);
  pointer-events: none;
  transition: background .15s ease, color .15s ease;
}
body[data-page="game.show"] button.product-card .aj-pick::before { content: "Select"; }
html[data-theme="dark"] body[data-page="game.show"] button.product-card .aj-pick { color: #93c5fd; background: rgba(59, 130, 246, .16); }
body[data-page="game.show"] button.product-card.selected .aj-pick,
html[data-theme="dark"] body[data-page="game.show"] button.product-card.selected .aj-pick { color: #ffffff; background: #2563eb; }
body[data-page="game.show"] button.product-card.selected .aj-pick::before { content: "\2713  Selected"; }
/* the chip already shows the choice, so drop the old corner tick */
body[data-page="game.show"] button.product-card.selected::after { display: none !important; }
body[data-page="game.show"] button.product-card.selected,
html[data-theme="dark"] body[data-page="game.show"] button.product-card.selected {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 1px #3b82f6, 0 8px 20px -12px rgba(37, 99, 235, .8) !important;
}
