/* Shared Genesis dialog styles. */
.genesis-content :is(.genesis-checkout,.genesis-auth-dialog,.genesis-invite-dialog) {
  --checkout-ink: #17212e;
  --checkout-muted: #414f60;
  --checkout-accent: #234f66;
  --checkout-divider: #35495a38;
  --checkout-field: #ffffff70;
  --checkout-button: #2d617d;
  --checkout-button-ink: #fff;
  --checkout-success: #256846;
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(420px, calc(100% - 28px));
  max-width: none;
  max-height: calc(100dvh - 28px);
  padding: 24px 24px 20px;
  overflow-y: auto;
  color: var(--checkout-ink);
  background: var(--checkout-surface);
  border: 1px solid transparent;
  border-radius: 28px;
  box-shadow: none;
  scrollbar-width: thin;
}

.genesis-content .genesis-auth-dialog {
  --checkout-surface: var(--genesis-identity-surface);
  --checkout-ink: #f7f9fc;
  --checkout-muted: #d6dee8;
  --checkout-accent: #a9e7f5;
  --checkout-divider: #d6dee84d;
  --checkout-field: #ffffff10;
  --checkout-button: #deedf7;
  --checkout-button-ink: #173344;
  --checkout-success: #a1ecc0;
  color-scheme: dark;
}
.genesis-content .genesis-checkout { --checkout-surface: var(--genesis-subscription-surface); }
.genesis-content .genesis-invite-dialog {
  --checkout-surface: var(--genesis-invitation-surface);
  --checkout-accent: #694923;
  --checkout-button: #886735;
}

.genesis-content :is(.genesis-checkout,.genesis-auth-dialog,.genesis-invite-dialog)::backdrop {
  background: #26373140;
  backdrop-filter: blur(8px) saturate(.84);
}

:is(.genesis-checkout,.genesis-auth-dialog,.genesis-invite-dialog)::before { display: none; }

:is(.genesis-checkout,.genesis-auth-dialog,.genesis-invite-dialog) > h2 {
  margin: 0 0 15px;
  padding-right: 38px;
  font-size: 21px;
  line-height: 1.35;
  font-weight: 600;
}

.genesis-content :is(.genesis-checkout,.genesis-auth-dialog,.genesis-invite-dialog) .genesis-dialog-close {
  top: 13px;
  right: 14px;
  min-width: 32px;
  min-height: 32px;
  padding: 4px;
  font-size: 22px;
  border-radius: 50%;
  color: var(--checkout-muted);
}

.genesis-dialog-close:hover { background: var(--checkout-field); }
.checkout-product {
  display: grid;
  grid-template-columns: 87px minmax(0,1fr);
  align-items: center;
  gap: 14px;
  padding: 1px 0 15px;
}
:is(.genesis-checkout,.genesis-invite-dialog) > .checkout-product {
  grid-template-columns: 87px minmax(0, max-content);
  justify-content: center;
}

.checkout-logo,
.genesis-header .site-brand-logo {
  display: grid;
  place-items: center;
  perspective: 480px;
}
.checkout-logo {
  width: 87px;
  aspect-ratio: 1;
  isolation: isolate;
  background: radial-gradient(ellipse, #b6d6e555, transparent 68%);
}

.checkout-product-info { min-width: 0; font-size: 13px; line-height: 1.55; font-variant-numeric: tabular-nums; }
.checkout-product-info > strong { font-size: 19px; font-weight: 750; }
.checkout-muted { color: var(--checkout-muted); }
.checkout-quota { color: var(--checkout-accent); }
.checkout-quota strong { font-weight: 680; }
.checkout-tier { color: var(--checkout-muted); font-size: 11px; }

.checkout-section {
  border-top: 1px solid var(--checkout-divider);
  margin: 0;
  padding: 12px 0;
  font-size: 13px;
  line-height: 1.5;
}

.checkout-line {
  display: grid;
  grid-template-columns: max-content minmax(0,1fr);
  align-items: start;
  justify-content: space-between;
  gap: 10px;
  padding: 3px 0;
}
.checkout-line dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.checkout-wallets dd:has(.checkout-address) { display: flex; justify-content: end; align-items: flex-start; gap: 4px; }
.checkout-address { min-width: 0; }
.checkout-address summary {
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  text-decoration: underline dotted var(--checkout-muted);
  text-underline-offset: 3px;
  list-style: none;
  white-space: nowrap;
}
.checkout-address summary::-webkit-details-marker { display: none; }
.checkout-address code {
  display: block;
  padding: 3px 0;
  font-size: 11px;
  overflow-wrap: anywhere;
  user-select: text;
}
.checkout-copy {
  display: grid;
  place-items: center;
  width: 27px;
  height: 23px;
  margin: -2px -4px 0 0;
  padding: 0;
  border: 0;
  border-radius: 5px;
  color: var(--checkout-accent);
  background: transparent;
}
.checkout-copy:hover { background: var(--checkout-field); }
.checkout-copy svg { width: 15px; height: 15px; stroke-width: 1.4; }
.checkout-identity { color: var(--checkout-accent); }

.checkout-input-label { margin-bottom: 4px; }
.checkout-input-label p { text-align: right; }
.checkout-input {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 45px;
  padding: 0 8px 0 11px;
  border: 1px solid var(--checkout-divider);
  border-radius: 11px;
  background: var(--checkout-field);
}
.checkout-input:focus-within { border-color: var(--checkout-accent); box-shadow: 0 0 0 2px var(--checkout-divider); }
.checkout-input input {
  width: 100%;
  min-width: 0;
  height: 43px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--checkout-ink);
  font-size: 19px;
  font-variant-numeric: tabular-nums;
}
.checkout-input input:focus-visible { outline: none; }
.checkout-input > strong { font-size: 13px; }
.checkout-input button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 4px;
  border: 0;
  background: none;
  color: var(--checkout-accent);
  font-size: 12px;
  font-weight: 690;
  cursor: pointer;
}

.checkout-order { padding-bottom: 8px; }
.checkout-delivery {
  align-items: baseline;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--checkout-divider);
  font-size: 14px;
  font-weight: 700;
}
.checkout-delivery strong { font-size: clamp(19px, 5vw, 25px); color: var(--checkout-accent); }

.checkout-buttons .button {
  width: 100%;
  min-height: 41px;
  padding: 9px 12px;
  background: var(--checkout-button);
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 680;
  color: var(--checkout-button-ink);
}
.checkout-buttons .button:not(:disabled):hover { background: color-mix(in srgb, var(--checkout-button), #101827 16%); }
.checkout-buttons .button:disabled { opacity: 1; color: var(--checkout-muted); background: var(--checkout-field); border-color: var(--checkout-divider); }
.checkout-feedback {
  margin: 6px 0 8px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--checkout-muted);
  overflow-wrap: anywhere;
}
.checkout-feedback:empty { display: none; }
.checkout-input + .checkout-feedback { margin-bottom: 0; color: #87452f; }
.genesis-checkout[data-checkout-state="loading"] [data-genesis-sale-state],
.invite-feedback[data-loading] {
  display: flex;
  align-items: center;
  gap: 8px;
}
.genesis-checkout[data-checkout-state="loading"] [data-genesis-sale-state]::before,
.invite-feedback[data-loading]::before {
  content: '';
  flex: 0 0 13px;
  height: 13px;
  border: 2px solid var(--checkout-divider);
  border-top-color: var(--checkout-accent);
  border-radius: 50%;
  animation: checkout-reading .85s linear infinite;
}
@keyframes checkout-reading { to { transform: rotate(360deg); } }
.checkout-footnote {
  margin-top: 9px;
  color: var(--checkout-muted);
  text-align: center;
  font-size: 11px;
  line-height: 1.55;
}
.genesis-checkout[data-checkout-state="complete"] [data-genesis-sale-state] { font-weight: 700; color: var(--checkout-success); }

:is(.genesis-invite-dialog,.genesis-auth-dialog) > h2:focus { outline: none; }
.genesis-invite-dialog .checkout-product-info > strong { font-size: 23px; overflow-wrap: anywhere; }
.invite-rows .checkout-line { padding-block: 5px; }
.invite-rows dd { color: var(--checkout-muted); }
.invite-rows .checkout-address code { white-space: normal; }
.invite-link label { display: block; margin-bottom: 7px; font-weight: 680; }
.invite-link .checkout-input input { font-size: 13px; }
.invite-link .checkout-copy { margin: 0; }
.genesis-invite-dialog .invite-feedback { text-align: center; }
.invite-feedback[data-loading] { justify-content: center; }
.genesis-invite-dialog .checkout-footnote { margin-top: 12px; }

.checkout-product.auth-product { grid-template-columns: 44px auto; justify-content: center; gap: 12px; padding: 8px 0 23px; font-size: 13px; line-height: 1.55; }
.checkout-logo.auth-product-logo { width: 100%; }
.auth-product strong { font-size: 17px; font-weight: 720; }
.auth-rows .checkout-line { padding-block: 8px; }
.auth-rows dd { color: var(--checkout-muted); }
.auth-instructions > p { margin: 0; }
.auth-instructions details { margin: 10px 0; color: var(--checkout-accent); }
.auth-instructions summary { padding: 3px 0; cursor: pointer; }
.auth-instructions pre {
  margin: 5px 0 0;
  padding: 10px;
  border: 1px solid var(--checkout-divider);
  border-radius: 10px;
  background: var(--checkout-field);
  font: inherit;
  font-size: 12px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  user-select: text;
}
.auth-success { padding: 18px 0; color: var(--checkout-success); text-align: center; }
.auth-success-label { display: inline-flex; align-items: center; gap: 8px; }
.auth-success-check {
  box-sizing: border-box;
  width: 16px;
  height: 9px;
  border-left: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: translateY(-2px) rotate(-45deg);
}
.auth-success strong { display: block; font-size: 20px; overflow-wrap: anywhere; }
.genesis-auth-dialog :is(.auth-feedback,.auth-help) { text-align: center; }
.auth-help a { color: var(--checkout-accent); text-underline-offset: 3px; }
.auth-help a:hover { text-decoration: underline; }
.auth-retry { display: block; margin: 0 auto; border: 0; padding: 4px 5px; background: none; color: var(--checkout-accent); font: inherit; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

@media (max-width: 480px) {
  .genesis-content :is(.genesis-checkout,.genesis-invite-dialog,.genesis-auth-dialog) { padding: 18px 16px 15px; }
  :is(.genesis-checkout,.genesis-invite-dialog,.genesis-auth-dialog) > h2 { margin-bottom: 11px; }
  .checkout-product { grid-template-columns: 68px minmax(0,1fr); gap: 11px; padding-bottom: 11px; }
  :is(.genesis-checkout,.genesis-invite-dialog) > .checkout-product { grid-template-columns: 68px minmax(0, max-content); }
  .checkout-logo { width: 68px; }
  .checkout-section { padding-block: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .genesis-checkout[data-checkout-state="loading"] [data-genesis-sale-state]::before,
  .invite-feedback[data-loading]::before { animation: none; }
}

