/* Match marketing_tokens.css and the compact Pricing page, scoped to the dialog. */
.credit-checkout {
  --cc-canvas: #faf8f4;
  --cc-surface: #f6f3eb;
  --cc-purple: #3c1a47;
  --cc-ink: #302a31;
  --cc-muted: #706770;
  --cc-line: #dbd4cb;
  --cc-serif: "Fraunces", Georgia, serif;
  --cc-sans: "DM Sans", system-ui, sans-serif;
  /* Close centers on the title's first line, so both follow these values. */
  --cc-pad-top: 32px;
  --cc-title-size: 40px;
  --cc-title-top: 0px;
  box-sizing: border-box;
  width: min(460px, calc(100vw - 24px));
  min-width: 0;
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: var(--cc-pad-top) 32px 32px;
  border: 1px solid var(--cc-line);
  border-radius: 8px;
  background: var(--cc-canvas);
  color: var(--cc-ink);
  font: 400 14px/1.65 var(--cc-sans);
  -webkit-font-smoothing: antialiased;
  overflow: auto;
  box-shadow: 0 16px 60px rgb(48 42 49 / 16%);
}
.credit-checkout::backdrop { background: rgb(48 42 49 / 35%); }
.credit-checkout * { box-sizing: border-box; }
.credit-checkout button, .credit-checkout input { font: inherit; }
.credit-checkout button { cursor: pointer; text-transform: none; text-shadow: none; }
.credit-checkout h2 { margin: var(--cc-title-top) 36px 26px 0; padding: 0; font: 400 var(--cc-title-size)/1.1 var(--cc-serif); letter-spacing: -.045em; color: var(--cc-ink); }
.credit-checkout h2:focus { outline: none; }
.credit-checkout .cc-close { position: absolute; right: 10px; top: calc(var(--cc-pad-top) + var(--cc-title-top) + var(--cc-title-size) * .55 - 22px); width: 44px; height: 44px; padding: 0; border: 0; background: none; color: var(--cc-muted); font-size: 25px; line-height: 1; }
.credit-checkout fieldset { padding: 0; border: 0; margin: 0; min-width: 0; }
.credit-checkout legend { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; padding: 0; overflow: hidden; white-space: nowrap; }

.credit-checkout .cc-cadences { display: flex; gap: 5px; margin-bottom: 24px; padding: 5px; border-radius: 6px; background: var(--cc-surface); }
.credit-checkout .cc-cadences label { flex: 1; min-width: 0; position: relative; cursor: pointer; }
.credit-checkout .cc-cadences input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.credit-checkout .cc-cadences span { display: grid; grid-template-rows: 23px 18px; align-content: center; min-height: 60px; gap: 3px; padding: 8px 4px; border-radius: 4px; text-align: center; white-space: nowrap; }
.credit-checkout .cc-cadences input:checked + span { background: white; color: var(--cc-purple); box-shadow: 0 1px 5px rgb(48 42 49 / 7%); }
.credit-checkout .cc-cadences small { font-size: 11px; color: var(--cc-muted); }
.credit-checkout .cc-cadences input:focus-visible + span { outline: 2px solid #6b6b6b; outline-offset: 2px; }

.credit-checkout .cc-packages { display: flex; flex-direction: column; gap: 10px; }
.credit-checkout .cc-row { position: relative; display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-width: 0; min-height: 52px; padding: 12px; border: 1px solid var(--cc-line); border-radius: 5px; background: transparent; cursor: pointer; }
.credit-checkout .cc-row input { position: static; opacity: 1; appearance: auto; flex: 0 0 16px; width: 16px; height: 16px; margin: 0; padding: 0; accent-color: var(--cc-purple); cursor: pointer; }
.credit-checkout .cc-row strong { font-weight: 400; }
.credit-checkout .cc-row > span { min-width: 0; overflow-wrap: anywhere; }
.credit-checkout .cc-row > span:last-child { margin-left: auto; color: var(--cc-purple); white-space: nowrap; }
.credit-checkout .cc-row:has(input:checked) { border-color: var(--cc-purple); background: white; }
.credit-checkout .cc-popular-label { position: absolute; top: -9px; left: 32px; padding: 0 6px; background: var(--cc-canvas); font-size: 11px; font-weight: 400; line-height: 17px; color: var(--cc-muted); }
.credit-checkout .cc-row:has(input:checked) .cc-popular-label { background: white; }
.credit-checkout .cc-row input:focus-visible { outline: 2px solid #6b6b6b; outline-offset: 4px; }

.credit-checkout .cc-terms { margin: 10px 0 0; color: var(--cc-muted); font-size: 12px; line-height: 18px; }
.credit-checkout .cc-action { display: flex; align-items: center; gap: 16px; margin-top: 22px; }
.credit-checkout .cc-next { display: flex; align-items: center; justify-content: center; flex: 0 0 44px; width: 44px; height: 44px; margin-left: auto; border: 0; border-radius: 50%; padding: 0; background: var(--cc-purple); color: white; }
.credit-checkout .cc-next:hover { background: #54255f; }
/* Headshot bonus belongs to the eligible credit option, not portrait-pack checkout. */
.credit-checkout .cc-bonus { flex: 1; min-width: 0; display: grid; grid-template-columns: 16px minmax(0, 1fr); column-gap: 10px; align-items: baseline; margin: 0; font-size: 13px; line-height: 1.45; }
.credit-checkout .cc-bonus .cc-bonus-star { justify-self: start; }
.credit-checkout .cc-bonus strong { font-weight: 500; }
.credit-checkout .cc-bonus-star { color: var(--cc-purple); font-size: 12px; }
.credit-checkout .cc-bonus small { grid-column: 2; margin-top: 1px; color: var(--cc-muted); font-size: 12px; }
.credit-checkout .cc-bonus a { padding: 10px 0; margin: -10px 0; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.credit-checkout .cc-bonus a:focus-visible { outline: 2px solid #706770; outline-offset: 3px; }
.credit-checkout .cc-next svg { width: 22px; height: 22px; flex-shrink: 0; }
.credit-checkout button:disabled { cursor: wait; opacity: .45; }
.credit-checkout.cc-pack-offer { --cc-title-size: 29px; width: min(430px, calc(100vw - 24px)); }
.credit-checkout.cc-pack-offer h2 { margin-bottom: 25px; }
.credit-checkout .cc-pack-purchase { display: flex; align-items: center; gap: 20px; padding: 19px 17px; border: 1px solid var(--cc-line); border-radius: 5px; background: white; }
.credit-checkout .cc-pack-price { min-width: 0; font: 400 32px/1.1 var(--cc-serif); letter-spacing: -.04em; }
.credit-checkout .cc-pack-price small { display: block; margin-top: 4px; color: var(--cc-muted); font: 400 11px/1.65 var(--cc-sans); letter-spacing: 0; }
.credit-checkout .cc-plans, .credit-checkout .cc-retry { min-height: 44px; border: 0; background: none; padding: 8px 0; color: var(--cc-purple); text-align: left; font-size: 13px; }
.credit-checkout .cc-plans { display: block; width: 100%; margin: 16px 0 0; padding: 4px 0; text-align: center; font-size: 11px; }
.credit-checkout .cc-plans span { margin-left: 5px; }
.credit-checkout .cc-back { position: absolute; left: 10px; top: 10px; display: grid; place-items: center; width: 44px; height: 44px; margin: 0; padding: 0; border: 0; background: none; color: var(--cc-muted); }
.credit-checkout .cc-back:not([hidden]) + h2 { margin-top: 30px; }
/* While Back shows, the title moves below the mirrored Back and close pair. */
.credit-checkout:has(> .cc-back:not([hidden])) .cc-close { top: 10px; }
.credit-checkout .cc-back svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.credit-checkout .cc-back:hover { color: var(--cc-purple); }
.credit-checkout .cc-status { font: 400 13px/1.65 var(--cc-sans); margin: 14px 0 0; color: var(--cc-muted); }
.credit-checkout .cc-status:empty { display: none; }
.credit-checkout a { color: var(--cc-purple); text-decoration: underline; }
.credit-checkout:is(.cc-usage-limit, .cc-content-warning, .cc-share-offer) { --cc-title-size: 32px; width: min(430px, calc(100vw - 24px)); }
.credit-checkout.cc-usage-limit h2 { margin-bottom: 12px; }
.credit-checkout .cc-usage-intro { margin: 0 0 22px; color: var(--cc-muted); }
.credit-checkout .cc-usage-actions { display: grid; gap: 10px; }
.credit-checkout :is(.cc-buy-usage, .cc-primary) { display: flex; align-items: center; justify-content: center; width: 100%; min-height: 48px; margin: 0; padding: 12px 18px; border: 1px solid var(--cc-purple); border-radius: 5px; font: inherit; font-weight: 500; text-decoration: none; }
.credit-checkout :is(.cc-buy-usage, .cc-primary) { background: var(--cc-purple); color: white; }
.credit-checkout :is(.cc-buy-usage, .cc-primary):hover { background: #54255f; }
.credit-checkout:is(.cc-usage-limit, .cc-content-warning, .cc-share-offer) :is(button, a):focus-visible { outline: 2px solid #6b6b6b; outline-offset: 3px; }
.credit-checkout.cc-content-warning h2 { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.credit-checkout .cc-warning-icon { flex: none; width: 26px; height: 26px; fill: none; stroke: #a8551f; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.credit-checkout.cc-content-warning p { margin: 0 0 12px; font: inherit; }
.credit-checkout.cc-content-warning .cc-primary { margin-top: 22px; }
.credit-checkout.cc-share-offer { --cc-pad-top: 40px; --cc-title-size: 34px; width: min(460px, calc(100vw - 24px)); padding: var(--cc-pad-top) 40px 28px; }
.credit-checkout.cc-share-offer h2 { display: flex; align-items: flex-start; gap: 12px; margin: 0 40px 30px 0; text-wrap: balance; }
.credit-checkout.cc-share-offer .cc-credit-icon { flex: none; width: 30px; height: 30px; margin-top: calc((1.1em - 30px) / 2); }
.credit-checkout.cc-share-offer .cc-close { top: 36px; right: 14px; }
.credit-checkout.cc-share-offer ol { display: grid; gap: 18px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.credit-checkout.cc-share-offer li { position: relative; margin: 0; padding-left: 42px; font-size: 15px; line-height: 1.5; counter-increment: step; }
.credit-checkout.cc-share-offer li::before { content: counter(step); position: absolute; left: 0; top: -2px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #ece6dd; color: var(--cc-ink); font-size: 13px; font-weight: 500; line-height: 1; }
.credit-checkout.cc-share-offer li a { color: var(--cc-purple); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.credit-checkout.cc-share-offer .cc-primary { min-height: 52px; margin-top: 34px; border-radius: 6px; font-size: 15px; }
.credit-checkout.cc-share-offer .cc-details { display: block; margin-top: 10px; padding: 10px 0; text-align: center; color: var(--cc-muted); font-size: 14px; text-decoration: none; }
.credit-checkout.cc-share-offer .cc-details:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 600px) {
  .credit-checkout { --cc-pad-top: 26px; --cc-title-size: 36px; padding: var(--cc-pad-top) 20px 26px; }
  .credit-checkout h2 { margin-bottom: 22px; }
  .credit-checkout.cc-pack-offer { --cc-pad-top: 28px; --cc-title-size: 27px; width: min(390px, calc(100vw - 24px)); padding: var(--cc-pad-top) 22px 28px; }
  .credit-checkout.cc-pack-offer h2 { margin-bottom: 22px; }
  .credit-checkout .cc-pack-purchase { padding: 17px 13px; gap: 15px; }
  .credit-checkout.cc-share-offer { --cc-pad-top: 32px; --cc-title-size: 30px; padding: var(--cc-pad-top) 24px 20px; }
  .credit-checkout.cc-share-offer .cc-close { top: 24px; right: 8px; }
  .credit-checkout.cc-share-offer h2 { margin-bottom: 26px; }
  .credit-checkout.cc-share-offer .cc-primary { margin-top: 30px; }
}
@media (max-height: 480px) {
  .credit-checkout:is(.cc-content-warning, .cc-share-offer) { --cc-pad-top: 20px; --cc-title-size: 26px; padding-bottom: 20px; }
  .credit-checkout:is(.cc-content-warning, .cc-share-offer) h2 { margin-bottom: 10px; }
  .credit-checkout.cc-content-warning p { margin-bottom: 8px; }
  .credit-checkout:is(.cc-content-warning, .cc-share-offer) .cc-primary { margin-top: 14px; }
}
@media (max-width: 370px) {
  .credit-checkout .cc-row { font-size: 12px; }
  .credit-checkout .cc-cadences { font-size: 13px; }
  .credit-checkout.cc-pack-offer { --cc-pad-top: 26px; --cc-title-size: 25px; padding: var(--cc-pad-top) 17px 26px; }
  .credit-checkout .cc-pack-purchase { padding: 15px 11px; gap: 11px; }
}

/* Signup and login use Pricing's shared dialog palette and typography. */
.editor-auth [hidden] { display: none !important; }
.editor-auth { --cc-title-top: 2px; }
.editor-auth h2 { margin: var(--cc-title-top) 36px 12px 0; }
.editor-auth #editor-auth-intro { margin: 0 0 22px; font: inherit; color: var(--cc-muted); }
.editor-auth .ea-alternate, .editor-auth .ea-reset { min-height: 44px; border: 0; padding: 8px 0; background: none; color: var(--cc-purple); font-size: 13px; }
.editor-auth form { margin: 0; }
.editor-auth label { display: block; margin: 16px 0 7px; }
.editor-auth input { display: block; width: 100%; min-height: 50px; padding: 11px 13px; border: 1px solid var(--cc-line); border-radius: 5px; background: white; color: var(--cc-ink); font-size: 16px; }
.editor-auth .ea-hint { display: block; margin-top: 5px; color: var(--cc-muted); font-size: 12px; }
.editor-auth .ea-terms { display: flex; align-items: flex-start; gap: 10px; margin: 20px 0 0; font-size: 13px; line-height: 1.6; cursor: pointer; }
.editor-auth .ea-terms input { flex: 0 0 18px; width: 18px; min-height: 18px; height: 18px; margin: 2px 0 0; padding: 0; accent-color: var(--cc-purple); }
.editor-auth .ea-agreement a { color: var(--cc-purple); text-decoration: underline; text-underline-offset: 3px; }
.editor-auth .ea-agreement a:focus-visible { outline: 2px solid #706770; outline-offset: 3px; }
.editor-auth .ea-submit { width: 100%; min-height: 48px; margin-top: 24px; border: 0; border-radius: 5px; padding: 12px 18px; background: var(--cc-purple); color: white; font-weight: 500; }
.editor-auth .ea-submit:hover { background: #54255f; }
.editor-auth .ea-alternate { display: block; width: 100%; margin-top: 8px; text-align: center; }
.editor-auth .ea-reset { display: block; margin-left: auto; }
.editor-auth .ea-status { margin: 14px 0 0; font: inherit; font-size: 13px; color: var(--cc-muted); overflow-wrap: anywhere; }
.editor-auth .ea-status:empty { display: none; }
.editor-auth .ea-status[data-error] { color: #a33429; }
.editor-auth input:focus { outline: none; box-shadow: none; border-color: #a39b91; }
.editor-auth input[type=checkbox]:focus-visible, .editor-auth button:focus-visible { outline: 2px solid #706770; outline-offset: 3px; }
.editor-auth a:focus-visible { outline: 2px solid #6b6b6b; outline-offset: 3px; }
