/* ShwePlay Subscription, Manual Cash Checkout & Result Mobile/Theme Remediation */
.sp-subscription-page {
  background: transparent !important;
}

.sp-locale-mm .sp-subscription-page {
  --receipt-font: "Noto Sans Myanmar", "Padauk", "Pyidaungsu", "Myanmar Text", "Segoe UI", sans-serif;
  font-family: var(--receipt-font) !important;
}
.sp-locale-mm .sp-subscription-page :is(h1, h2, h3, p, span, strong, small, label, button, a, input, textarea, dt, dd, li) {
  font-family: var(--receipt-font);
  line-height: 1.68;
}
.sp-locale-mm .sp-subscription-page :is(.sp-subscription-kicker, .sp-vip-kicker, .sp-plan-eyebrow, .sp-payment-eyebrow, .sp-transfer-note-badge) {
  letter-spacing: 0 !important;
  text-transform: none !important;
}

.sp-plan-devices-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: #ffd75b;
  background: rgba(245, 179, 1, 0.12);
  border: 1px solid rgba(245, 179, 1, 0.28);
  padding: 4px 10px;
  border-radius: 8px;
  margin-top: 6px;
  align-self: flex-start;
}

.sp-subscription-page .form-control,
.sp-payment-fields .form-control {
  font-size: 16px !important;
}

/* Copy Buttons & Horizontal Transfer Note Pill */
.sp-payment-account .sp-copy-inline {
  min-height: 44px !important;
  padding: 6px 12px !important;
  border-radius: 10px !important;
  background: rgba(245, 179, 1, 0.08) !important;
  border: 1px solid rgba(245, 179, 1, 0.28) !important;
  flex-wrap: wrap;
}
.sp-transfer-note-action-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.sp-transfer-note-copy {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  min-height: 44px !important;
  padding: 8px 14px !important;
  max-width: 100%;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}
.sp-note-copy-action {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 6px !important;
  white-space: nowrap !important;
  flex-shrink: 0;
}

/* QR Lightbox Modal & Touch Zoom Badge */
.sp-qr-modal {
  padding: 12px !important;
}
.sp-qr-modal-dialog {
  max-height: calc(100vh - 24px) !important;
  max-height: calc(100dvh - 24px) !important;
  overflow-y: auto !important;
}
#spQrModalImg {
  width: min(240px, calc(100vw - 96px)) !important;
  height: auto !important;
  aspect-ratio: 1 / 1;
}
.sp-qr-modal-close {
  width: 44px !important;
  height: 44px !important;
  flex-shrink: 0;
  transition: background-color 0.2s ease, color 0.2s ease !important;
}
.sp-qr-modal-download-btn,
.sp-qr-modal-close-btn,
.sp-payment-qr-text-btn,
.sp-change-plan,
.sp-change-plan-back {
  min-height: 44px !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
@media (hover: none) {
  .sp-qr-zoom-badge {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
  }
}

/* Result 3-Step Uniform Alignment */
.sp-result-progress article {
  grid-template-columns: 42px minmax(0, 1fr) 28px !important;
}
.sp-result-progress article em {
  display: block;
  margin-top: 2px;
  color: var(--sp-accent, #f5b301);
}

/* Light Mode Descendant Contrast */
.light-mode .sp-subscription-page {
  --sub-bg: #f8fafc;
  --sub-panel: #ffffff;
  --sub-panel-soft: #f1f5f9;
  --sub-text: #0f172a;
  --sub-muted: #475569;
  --sub-border: rgba(15, 23, 42, 0.12);
  --sub-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
  background: transparent !important;
  color: #0f172a !important;
}
.light-mode .sp-subscription-page .sp-vip-status-card {
  background: linear-gradient(145deg, #fffbeb, #ffffff) !important;
  border-color: rgba(217, 119, 6, 0.35) !important;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06) !important;
}
.light-mode .sp-subscription-page .sp-vip-status-meta h2 { color: #0f172a !important; }
.light-mode .sp-subscription-page .sp-vip-tag { background: #f1f5f9 !important; border-color: rgba(15, 23, 42, 0.12) !important; color: #0f172a !important; }
.light-mode .sp-subscription-page .sp-vip-stack-alert { background: rgba(245, 158, 11, 0.12) !important; border-color: rgba(217, 119, 6, 0.3) !important; color: #78350f !important; }
.light-mode .sp-subscription-page .sp-vip-stack-alert p { color: #78350f !important; }
.light-mode .sp-subscription-page .sp-plan-devices-badge { color: #92400e !important; background: rgba(245, 158, 11, 0.14) !important; border-color: rgba(217, 119, 6, 0.32) !important; }
.light-mode .sp-subscription-page :is(.sp-selected-plan > strong, .sp-plan-amount, .sp-plan-price strong, .sp-payment-summary strong, .sp-payment-eyebrow, .sp-payment-hero > span, .sp-copy-inline span, .sp-subscription-kicker, .sp-vip-kicker, .sp-result-progress article em) {
  color: #92400e !important;
}
.light-mode .sp-subscription-page :is(.sp-change-plan, .sp-change-plan-back) {
  background: #f8fafc !important;
  border-color: rgba(15, 23, 42, 0.16) !important;
  color: #0f172a !important;
}
.light-mode .sp-subscription-page .sp-payment-actions button { color: #b91c1c !important; }
.light-mode .sp-subscription-page .sp-transfer-note { background: #fffbeb !important; border-color: rgba(217, 119, 6, 0.4) !important; color: #0f172a !important; }
.light-mode .sp-subscription-page .sp-transfer-note-headline strong { color: #991b1b !important; }
.light-mode .sp-subscription-page .sp-note-copy-hint, .light-mode .sp-subscription-page .sp-transfer-note-help { color: #334155 !important; }
.light-mode .sp-subscription-page .sp-proof-upload { background: #f8fafc !important; border-color: rgba(217, 119, 6, 0.5) !important; }
.light-mode .sp-subscription-page .sp-proof-upload-meta strong { color: #0f172a !important; }
.light-mode .sp-subscription-page .sp-proof-upload-meta span { color: #475569 !important; }
.light-mode .sp-subscription-page .sp-proof-browse-btn { color: #92400e !important; background: rgba(245, 158, 11, 0.16) !important; border-color: rgba(217, 119, 6, 0.35) !important; }
.light-mode .sp-subscription-page .sp-qr-modal-dialog { background: #ffffff !important; border-color: rgba(15, 23, 42, 0.16) !important; color: #0f172a !important; }
.light-mode .sp-subscription-page .sp-qr-modal-title-box h3 { color: #0f172a !important; }
.light-mode .sp-subscription-page .sp-qr-modal-title-box small, .light-mode .sp-subscription-page .sp-qr-modal-hint { color: #475569 !important; }
.light-mode .sp-subscription-page .sp-qr-modal-close, .light-mode .sp-subscription-page .sp-qr-modal-close-btn { background: #f1f5f9 !important; border-color: rgba(15, 23, 42, 0.16) !important; color: #0f172a !important; }

/* Mobile Overflow Elimination */
@media (max-width: 620px) {
  .sp-subscription-page-wrapper {
    padding: 12px 4px 40px !important;
  }
  .sp-subscription-page .sp-subscription-shell,
  .sp-subscription-page .sp-payment-shell,
  .sp-subscription-page .sp-result-shell,
  .sp-subscription-page .sp-checkout-shell,
  .sp-subscription-page .sp-card-shell {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .sp-subscription-page .sp-subscription-hero,
  .sp-subscription-page .sp-subscription-form,
  .sp-subscription-page .sp-payment-hero,
  .sp-subscription-page .sp-payment-form,
  .sp-subscription-page .sp-result-shell {
    padding: 20px 14px !important;
  }
  .sp-payment-actions { padding: 12px 14px !important; flex-wrap: wrap; gap: 8px; }
  .sp-vip-status-card { padding: 18px 14px !important; border-radius: 18px !important; margin-bottom: 16px !important; }
  .sp-vip-status-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .sp-transfer-note-copy { width: 100%; }
  .sp-result-progress article { grid-template-columns: 38px minmax(0, 1fr) 24px !important; padding: 13px 14px !important; }
}

@media (max-width: 380px) {
  .sp-qr-modal-footer { flex-direction: column; align-items: stretch; }
}
