#giving-dialog {
  width: min(880px, calc(100vw - 32px));
  max-width: none;
  height: calc(100dvh - 32px);
  max-height: calc(100dvh - 32px);
  padding: 20px;
  overflow: hidden;
}
#giving-dialog[open] { display: flex; flex-direction: column; }
html:has(#giving-dialog[open]), body:has(#giving-dialog[open]) { overflow: hidden; }
.checkout-header { position: relative; flex-shrink: 0; }
#giving-dialog h2 { margin: 0; padding-right: 48px; font-size: 28px; }
#giving-dialog .dialog-close { right: -6px; top: -8px; width: 44px; height: 44px; }
.checkout-mount { flex: 1; min-height: 0; background: white; border-radius: 12px; overflow: hidden; }
.checkout-mount iframe { display: block; width: 100%; height: 100%; border: 0; }
@media (max-width: 600px) {
  #giving-dialog { width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; padding: max(12px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom)); }
  #giving-dialog h2 { font-size: 24px; }
}

.checkout-header { margin: 0 0 12px; }
#checkout-loading { flex-shrink: 0; font-size: 14px; color: var(--muted); }

#giving-dialog [hidden] { display: none !important; }
.checkout-details { overflow-y: auto; min-height: 0; padding: 4px 4px 12px; }
.checkout-step { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 8px 0 20px; }
.checkout-step h3 { margin: 0; font-size: 20px; }
#checkout-amount { color: var(--accent); white-space: nowrap; }
.details-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.details-grid label { display: block; min-width: 0; font-size: 15px; font-weight: 500; }
.details-wide { grid-column: 1 / -1; }
.details-grid input, .details-grid select {
  display: block; width: 100%; min-width: 0; margin-top: 7px; padding: 12px;
  border: 1px solid #886773; border-radius: 10px; background: #21141a; color: #fbf2e9;
  font: inherit; font-size: 16px; min-height: 48px; box-sizing: border-box;
}
.details-grid input:focus-visible, .details-grid select:focus-visible { outline: 2px solid #efa580; outline-offset: 2px; }
.optional, .details-handoff { color: var(--muted); }
.details-handoff { font-size: 14px; line-height: 1.5; margin: 20px 0 14px; }
.checkout-details .button { width: 100%; }
.checkout-back { flex-shrink: 0; align-self: flex-start; border: 0; padding: 6px 0 12px; background: none; color: var(--muted); font: inherit; cursor: pointer; }
@media (max-width: 600px) {
  .checkout-details { padding: 4px 12px 12px; }
  .details-grid { gap: 14px 12px; }
  .checkout-back { margin-left: 4px; }
}
