/* Circumference payment window. Brand tokens mirror docs/BRAND.md in each product;
   a product that already defines the --cx-* tokens keeps its own values. Fonts are the
   suite's self-hosted Raleway and Roboto, declared by the host page. No card field
   exists here: card details are entered only on the Stripe-hosted page. */
.cx-pay {
  --cx-primary: #0c2d46;
  --cx-accent: #0076d4;
  --cx-accent-hover: #0063b1;
  --cx-heading: #273d4e;
  --cx-body: #243947;
  --cx-muted: #5a636e;
  --cx-success: #2f8f5e;
  --cx-danger: #b6362e;
  --cx-panel: #f4f7fb;
  --cx-rule: #e3e8ef;
  --cx-accent-soft: #e8f2fb;
  position: fixed;
  inset: 0;
  z-index: 1080;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgb(12 45 70 / 55%);
  font: 400 15px/1.5 "Roboto", system-ui, "Segoe UI", Arial, sans-serif;
  color: var(--cx-body);
}
.cx-pay__dialog {
  width: min(460px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 24px 64px rgb(12 45 70 / 35%);
}
.cx-pay__band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: var(--cx-primary);
  border-bottom: 4px solid var(--cx-accent);
  border-radius: 12px 12px 0 0;
  color: #fff;
}
.cx-pay__wordmark { font: 800 12px/1 "Raleway", sans-serif; letter-spacing: 0.2em; }
.cx-pay__product { margin-top: 5px; font-size: 12px; color: #c8d6e2; }
.cx-pay__close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.cx-pay__close:hover, .cx-pay__close:focus-visible { background: rgb(255 255 255 / 16%); outline: none; }
.cx-pay__body { padding: 24px 24px 22px; }
.cx-pay__title { margin: 0; font: 700 21px/1.25 "Raleway", sans-serif; color: var(--cx-heading); }
.cx-pay__sub { margin: 4px 0 18px; font-size: 13px; color: var(--cx-muted); }
.cx-pay__lines { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--cx-rule); }
.cx-pay__lines li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--cx-rule);
  font-size: 14px;
}
.cx-pay__lines span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--cx-heading); }
.cx-pay__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 14px 0 4px;
  font: 700 15px/1 "Raleway", sans-serif;
  color: var(--cx-heading);
}
.cx-pay__total strong { font: 700 26px/1 "Roboto", sans-serif; font-variant-numeric: tabular-nums; }
.cx-pay__panel {
  margin: 16px 0 0;
  padding: 12px 14px;
  background: var(--cx-panel);
  border: 1px solid var(--cx-rule);
  border-radius: 8px;
  font-size: 13px;
}
.cx-pay__panel strong { color: var(--cx-heading); }
.cx-pay__link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--cx-accent);
  font: inherit;
  font-weight: 500;
  text-decoration: underline;
  cursor: pointer;
}
.cx-pay__check { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 14px; color: var(--cx-heading); }
.cx-pay__check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--cx-accent); }
.cx-pay__button {
  display: block;
  width: 100%;
  margin-top: 18px;
  padding: 13px 16px;
  border: 0;
  border-radius: 8px;
  background: var(--cx-accent);
  color: #fff;
  font: 500 16px/1.2 "Roboto", sans-serif;
  cursor: pointer;
}
.cx-pay__button:hover { background: var(--cx-accent-hover); }
.cx-pay__button:focus-visible, .cx-pay__link:focus-visible { outline: 3px solid var(--cx-accent-soft); outline-offset: 2px; }
.cx-pay__button:disabled { background: #9bb8d0; cursor: not-allowed; }
.cx-pay__button--quiet { background: #fff; color: var(--cx-accent); border: 1px solid var(--cx-accent); }
.cx-pay__button--quiet:hover { background: var(--cx-accent-soft); }
.cx-pay__fine { display: flex; gap: 8px; margin: 14px 0 0; font-size: 12px; color: var(--cx-muted); }
.cx-pay__fine svg { flex: none; margin-top: 1px; }
.cx-pay__state { padding: 14px 0 4px; text-align: center; }
.cx-pay__state h2 { margin: 14px 0 4px; font: 700 20px/1.3 "Raleway", sans-serif; color: var(--cx-heading); }
.cx-pay__state p { margin: 0 0 4px; color: var(--cx-muted); font-size: 14px; }
.cx-pay__amount { font: 700 28px/1.2 "Roboto", sans-serif; color: var(--cx-heading); font-variant-numeric: tabular-nums; }
.cx-pay__spinner {
  width: 44px;
  height: 44px;
  margin: 6px auto 0;
  border: 4px solid var(--cx-accent-soft);
  border-top-color: var(--cx-accent);
  border-radius: 50%;
  animation: cx-pay-spin 0.9s linear infinite;
}
.cx-pay__badge {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--cx-success);
  color: #fff;
}
.cx-pay__badge--failed { background: var(--cx-danger); }
.cx-pay__external {
  margin-top: 4px;
  padding: 16px;
  border: 2px dashed #9aa7b4;
  border-radius: 8px;
  background: repeating-linear-gradient(135deg, #fff 0 12px, #f6f7f9 12px 24px);
  text-align: center;
}
.cx-pay__external h2 { margin: 0 0 4px; font: 700 15px/1.3 "Roboto", sans-serif; color: var(--cx-heading); }
.cx-pay__external p { margin: 0; font-size: 13px; color: var(--cx-muted); }
@keyframes cx-pay-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .cx-pay__spinner { animation-duration: 3s; } }
