/* Loaded by the checkout page itself, including its scroll-lock rules. */
html.checkout-modal-open,
html.checkout-modal-open body {
  overflow: hidden;
  overscroll-behavior: none;
}
html.checkout-modal-open { scrollbar-gutter: stable; }

.payment-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(98rem, calc(100% - 4rem));
  max-width: none;
  max-height: calc(var(--halo-viewport-height, 100dvh) - 4rem);
  padding: 0;
  overflow: hidden;
  border: 1px solid #3a4d6d;
  border-radius: 1.25rem;
  background: #101622;
  color: var(--halo-ink);
  box-shadow: 0 1rem 4rem #0003;
}
.payment-dialog[open] { display: flex; flex-direction: column; animation: payment-arrive 180ms ease-out both; }
/* Checkout's explicit blur preference overrides the global opaque-backdrop fallback. */
.payment-dialog::backdrop { background: transparent!important; backdrop-filter: blur(9px)!important; -webkit-backdrop-filter: blur(9px)!important; }
.payment-dialog-header { flex: none; padding: 2rem 2.5rem; align-items: flex-start; }
.payment-dialog-heading { min-width: 0; }
.payment-dialog-close { width: calc(44px / var(--halo-site-scale,.8)); height: calc(44px / var(--halo-site-scale,.8)); }
.payment-dialog-close:active { transform: scale(.96); }
.payment-dialog-body {
  display: grid;
  grid-template-columns: minmax(0, 30rem) minmax(0, 1fr);
  gap: 3rem;
  min-height: 0;
  padding: 2.5rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scroll-behavior: auto;
  -webkit-overflow-scrolling: touch;
}
.payment-preview { min-width: 0; align-self: start; position: sticky; top: 0; }
.payment-membership-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  aspect-ratio: 1.586;
  padding: 2rem;
  border: 1px solid #4c6d9d;
  border-radius: 1.25rem;
  background: linear-gradient(125deg, #203f70, #13223c 75%);
  box-shadow: 0 .75rem 2rem #0002;
}
.payment-card-brand { display: flex; align-items: center; gap: .65rem; }
.payment-card-brand strong { font-size: 1.5rem; }
.payment-card-brand span { margin-left: auto; font-size: .9rem; color: #b8cbea; }
.payment-card-mark { color: #9bbcec; margin-block: .25rem; }
.payment-card-plan { margin-top: auto; font-size: 1.35rem; line-height: 1.5; }
#payment-preview-account { color: #c9d8ee; font-size: 1.05rem; overflow-wrap: anywhere; margin-top: -.8rem; }
.payment-preview-summary { padding-block: 2rem; border-bottom: 1px solid var(--line); }
.payment-preview-summary>span { font-size: 1rem; color: var(--muted); }
.payment-preview-summary p { font-size: 1.05rem; line-height: 1.7; color: var(--muted); margin-top: .75rem; }
.payment-preview-summary strong { font-size: 2rem; color: var(--halo-ink); font-variant-numeric: tabular-nums; }
.payment-preview-note { margin-top: 1.5rem; font-size: 1rem; color: #a8caff; line-height: 1.7; }
.payment-dialog-content { min-width: 0; }
.payment-dialog-message { margin: 0 0 1rem; }
.payment-dialog-message:empty { display: none; }
.payment-dialog #stripe-embedded-checkout { background: #101622; border-radius: .75rem; min-height: 24rem; }
.payment-dialog-loading { min-height: 34rem; }
@media(max-width:800px) {
  .payment-dialog { width: calc(100% - 2rem); max-height: calc(var(--halo-viewport-height,100dvh) - 2rem); border-radius: 1rem; }
  .payment-dialog-header { padding: 1.5rem; }
  .payment-dialog-heading h2 { font-size: 1.65rem; }
  .payment-dialog-heading p { font-size: 1rem; }
  .payment-dialog-body { grid-template-columns: 1fr; gap: 1.5rem; padding: 1.5rem; }
  .payment-preview { position: static; }
  .payment-membership-card { max-width: 32rem; margin-inline: auto; padding: 1.5rem; gap: 1rem; }
  .payment-preview-summary { padding-block: 1rem; }
  .payment-preview-summary>span,.payment-preview-summary p:nth-of-type(2),.payment-preview-note { display: none; }
  .payment-dialog-loading { min-height: 20rem; }
}
@media(prefers-reduced-motion:reduce) { .payment-dialog[open] { animation: none; } .payment-dialog-close:active { transform: none; } }
