/*
 * Approved wallet hierarchy: one centered contact QR in the primary surface,
 * with point-code redemption moved to a secondary dialog.
 */

#rechargeCodeCard {
  --txw-bg: #0c0d10;
  --txw-raised: #111318;
  --txw-line: rgba(255, 255, 255, 0.09);
  --txw-line-strong: rgba(255, 255, 255, 0.18);
  --txw-ink: #edf1f5;
  --txw-muted: #9aa3ae;
  --txw-faint: #707985;
  --txw-ice: #aac7ed;
  --txw-orange: #ff6b35;
  grid-column: 1 / -1;
  width: min(100%, 560px);
  min-width: 0;
  margin: 28px auto 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 18px;
  background:
    radial-gradient(ellipse at 78% -8%, rgba(154, 181, 216, 0.17), transparent 44%),
    linear-gradient(145deg, rgba(17, 19, 24, 0.98), rgba(8, 9, 12, 0.98));
  color: var(--txw-ink);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
}

body[data-page="wallet"] .walletLayout {
  display: block !important;
  max-width: 1120px;
  margin-inline: auto;
}

.txw-wallet-heading {
  position: relative !important;
  inset: auto !important;
  display: block !important;
  width: auto !important;
  height: auto !important;
  margin: 12px auto 0;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  text-align: center;
  transform: none !important;
}

.txw-wallet-heading h1 {
  position: static !important;
  inset: auto !important;
  display: block !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--txw-ink, #edf1f5);
  font-size: 42px;
  font-weight: 280;
  letter-spacing: -0.045em;
  line-height: 1.12;
  transform: none !important;
}

.txw-wallet-heading p {
  margin: 10px auto 0;
  color: #8c95a0;
  font-size: 13px;
  line-height: 1.65;
}

body[data-page="wallet"] .walletLayout > .balanceCard,
body[data-page="wallet"] .walletLayout > .rechargeCard {
  display: none !important;
}

body[data-page="wallet"] .paylog,
body[data-page="wallet"] #msg,
body[data-page="wallet"] #museHint,
body[data-page="wallet"] #channelBadge,
body[data-page="wallet"] #shortfilmChannel {
  display: none !important;
}

html body[data-page="wallet"] #siteHeader#siteHeader.pearl-header .globalStudioSearch,
html body[data-page="wallet"] #siteHeader#siteHeader #mobileNavToggle {
  display: none !important;
}

body[data-page="wallet"] .points-pill {
  border-color: rgba(255, 255, 255, 0.09) !important;
  background: #111318 !important;
  color: #dbe4ed !important;
}

body[data-page="wallet"] .points-pill i {
  display: none;
}

#rechargeCodeCard::before {
  display: block;
  width: calc(100% - 160px);
  height: 1px;
  margin-inline: auto;
  background: linear-gradient(90deg, transparent, rgba(255, 107, 53, 0.78), transparent);
  content: "";
}

#rechargeCodeCard .txw-inner {
  display: grid;
  justify-items: center;
  padding: 28px 34px 30px;
  text-align: center;
}

#rechargeCodeCard h2 {
  margin: 22px 0 0;
  color: var(--txw-ink);
  font-size: 24px;
  font-weight: 430;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

#rechargeCodeCard .txw-copy {
  max-width: 390px;
  margin: 8px 0 0;
  color: var(--txw-muted);
  font-size: 13px;
  line-height: 1.65;
}

#rechargeCodeCard .rechargeCodeQr {
  display: grid;
  width: min(264px, 76vw);
  aspect-ratio: 1;
  margin: 0 auto;
  padding: 14px;
  place-items: center;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: #f8fafb;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.25);
}

#rechargeCodeCard .rechargeCodeQr.hasImage {
  aspect-ratio: 1;
}

#rechargeCodeCard .rechargeCodeQr img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#rechargeCodeCard .rechargeCodeQrEmpty {
  display: grid;
  gap: 5px;
  max-width: 220px;
  padding: 18px;
  color: #4d5562;
  text-align: center;
}

#rechargeCodeCard .rechargeCodeQrEmpty strong {
  color: #3d4450;
  font-size: 13px;
}

#rechargeCodeCard .rechargeCodeQrEmpty small {
  color: #7c8590;
  font-size: 11px;
  line-height: 1.55;
}

#rechargeCodeCard .rechargeCodeQrNote,
#rechargeCodeCard .txw-scan-line {
  margin: 10px 0 0;
  color: #aeb7c1;
  font-size: 12px;
  line-height: 1.55;
}

#rechargeCodeCard .rechargeCodeQrNote {
  display: none !important;
}

#rechargeCodeCard .txw-open-redeem {
  min-height: 44px;
  margin-top: 18px;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: #9ca5b0;
  font-size: 13px;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.2);
  text-underline-offset: 5px;
  transition: color 150ms ease, text-decoration-color 150ms ease;
}

#rechargeCodeCard .txw-open-redeem:hover {
  color: #fff;
  text-decoration-color: rgba(255, 255, 255, 0.55);
}

#rechargeCodeCard .txw-footnote {
  margin: 4px 0 0;
  color: #666f7a;
  font-size: 11px;
  line-height: 1.55;
}

#pointsRedeemDialog {
  width: min(460px, calc(100vw - 28px));
  max-height: min(88dvh, 720px);
  padding: 0;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 16px;
  background: #0d0f13;
  color: #edf1f5;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.65);
}

#pointsRedeemDialog::backdrop {
  background: rgba(2, 3, 5, 0.78);
  backdrop-filter: blur(7px);
}

#pointsRedeemDialog .txw-dialog-inner {
  position: relative;
  padding: 28px;
}

#pointsRedeemDialog .txw-dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
  background: transparent;
  color: #aeb6c0;
  font-size: 18px;
}

#pointsRedeemDialog h2 {
  margin: 0;
  color: #edf1f5;
  font-size: 24px;
  font-weight: 420;
  letter-spacing: -0.03em;
}

#pointsRedeemDialog .txw-dialog-copy {
  margin: 9px 40px 0 0;
  color: #919aa5;
  font-size: 13px;
  line-height: 1.65;
}

#pointsRedeemDialog .rechargeCodeTiers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 18px;
}

#pointsRedeemDialog #rechargeCodeTiers {
  display: none;
}

#pointsRedeemDialog .rechargeCodeTier {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: #101318;
}

#pointsRedeemDialog .rechargeCodeTier strong {
  display: block;
  overflow: hidden;
  color: #d7dee6;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#pointsRedeemDialog .rechargeCodeTier span {
  display: block;
  margin-top: 3px;
  color: #7f8994;
  font-size: 10px;
}

#pointsRedeemDialog .rechargeCodeTier b {
  color: #b8cae0;
}

#pointsRedeemDialog .rechargeRedeemForm {
  display: grid;
  gap: 9px;
  margin-top: 18px;
}

#pointsRedeemDialog .rechargeRedeemForm label {
  color: #c8d0d9;
  font-size: 13px;
}

#pointsRedeemDialog .rechargeRedeemRow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

#pointsRedeemDialog .rechargeRedeemRow input {
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 13px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  background: #07080b;
  color: #edf1f5;
  font-size: 16px;
  text-transform: uppercase;
}

#pointsRedeemDialog .rechargeRedeemRow input:focus {
  border-color: rgba(170, 199, 237, 0.7);
  outline: 2px solid rgba(170, 199, 237, 0.25);
  outline-offset: 1px;
}

#pointsRedeemDialog .rechargeRedeemRow button {
  min-height: 48px;
  padding: 0 16px;
  border: 0;
  border-radius: 8px;
  background: #e8edf3;
  color: #08090c;
  font-size: 13px;
  font-weight: 650;
}

#pointsRedeemDialog .rechargeRedeemRow button:disabled {
  opacity: 0.35;
  cursor: default;
}

#pointsRedeemDialog .rechargeRedeemStatus {
  min-height: 20px;
  margin: 0;
  color: #79828d;
  font-size: 12px;
  line-height: 1.55;
}

#pointsRedeemDialog .rechargeRedeemStatus[data-tone="success"] {
  color: #b8d4c1;
}

#pointsRedeemDialog .rechargeRedeemStatus[data-tone="error"] {
  color: #ffb1a6;
}

.txw-mobile-nav {
  display: none;
}

@media (max-width: 760px) {
  body[data-page="wallet"] {
    padding-bottom: calc(58px + env(safe-area-inset-bottom));
  }

  #rechargeCodeCard {
    width: 100%;
    margin-top: 22px;
    border-radius: 16px;
  }

  .txw-wallet-heading {
    margin-top: 18px;
  }

  .txw-wallet-heading h1 {
    font-size: 34px;
  }

  .txw-wallet-heading p {
    max-width: 330px;
    font-size: 13px;
  }

  #rechargeCodeCard .txw-inner {
    padding: 24px 20px 22px;
  }

  #rechargeCodeCard h2 {
    font-size: 20px;
  }

  #rechargeCodeCard .rechargeCodeQr {
    width: min(218px, 72vw);
    padding: 12px;
  }

  #pointsRedeemDialog .txw-dialog-inner {
    padding: 26px 22px 22px;
  }

  html body[data-page="wallet"] #walletMobileNav#walletMobileNav {
    position: fixed;
    z-index: 30;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    display: grid;
    width: auto !important;
    height: calc(58px + env(safe-area-inset-bottom));
    grid-template-columns: repeat(5, 1fr);
    margin: 0 !important;
    padding: 5px 8px env(safe-area-inset-bottom);
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 0 !important;
    background: rgba(6, 7, 9, 0.985);
    box-shadow: none !important;
    transform: none !important;
  }

  html body[data-page="wallet"] #walletMobileNav#walletMobileNav button {
    min-height: 48px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #747d88;
    font-size: 11px;
  }

  html body[data-page="wallet"] #walletMobileNav#walletMobileNav button[aria-current="page"] {
    background: #e8edf3;
    color: #08090c;
    font-weight: 650;
  }
}

@media (max-width: 420px) {
  #pointsRedeemDialog .rechargeCodeTiers {
    grid-template-columns: 1fr;
  }

  #pointsRedeemDialog .rechargeRedeemRow {
    grid-template-columns: 1fr;
  }

  #pointsRedeemDialog .rechargeRedeemRow button {
    width: 100%;
  }
}

@media (max-width: 360px) {
  #rechargeCodeCard .txw-inner {
    padding-inline: 16px;
  }

  #rechargeCodeCard .rechargeCodeQr {
    width: 190px;
  }

  #pointsRedeemDialog .txw-dialog-inner {
    padding: 24px 18px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #rechargeCodeCard *,
  #pointsRedeemDialog * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

html body #siteHeader#siteHeader.pearl-header .globalStudioSearch input::placeholder {
  color: #98a3af !important;
  opacity: 1 !important;
}
