/* ============================================================================
   UPGRADE: the Free-limit prompt, the page before Stripe's hosted
   checkout (no card fields) and You're on Pro.
   ============================================================================ */

/* --- Upgrade prompt (shared/_limit_prompt) ------------------------------- */

/* Desktop: no header, just the centered card (radius 18, 440
   wide). Esc and the backdrop still close it. Phone keeps the sheet's
   header with its close button. */
@media (min-width: 46.25rem) {
  .sheet-card--prompt {
    border-radius: var(--r-card);
  }

  .sheet-card--prompt .sheet-header {
    display: none;
  }

  .sheet-card--dialog.sheet-card--prompt .sheet-body {
    padding: var(--sp-6);
  }
}

.limit-prompt {
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}

.limit-prompt-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.limit-prompt-disc {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: var(--r-card);
  background: var(--ac-bg);
  color: var(--ac-text);
}

.limit-prompt-disc .icon {
  width: 24px;
  height: 24px;
}

.limit-prompt-title {
  margin: 0;
  font: var(--fw-bold) 19px/26px var(--font);
  color: var(--tx);
}

.limit-prompt-body {
  margin: 0;
  font: var(--fw-regular) 14px/21px var(--font);
  color: var(--tx2);
}

/* A non-owner is told who can go Pro, as plain text in the primary's place */
.limit-prompt-ask {
  margin: 0;
  padding: 12px 14px;
  border-radius: var(--r-field);
  background: var(--ac-bg);
  color: var(--ac-text);
  font: var(--fw-semibold) var(--t-body) var(--font);
  text-align: center;
}

.limit-prompt-actions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

/* 44px pills on desktop; 50px, radius 12 on phone */
.limit-prompt-button.button--lg {
  height: 44px;
}

@media (max-width: 46.1875rem) {
  /* No title, so the close sits alone at the right */
  .sheet-card--prompt .sheet-header {
    justify-content: flex-end;
  }

  .limit-prompt {
    padding-top: var(--sp-2);
  }

  .limit-prompt-button.button--lg {
    height: 50px;
    border-radius: var(--r-field);
    font-size: 16px;
  }

  /* No "Maybe later" on phone; the sheet's close does the same */
  .limit-prompt-later {
    display: none;
  }
}

/* --- Almost there! (checkouts#show) --------------------------------------- */

.checkout {
  max-width: 880px;
}

.checkout-back-phone {
  display: none;
}

.checkout-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.checkout-back {
  flex-shrink: 0;
  border: var(--bw) solid var(--line);
  background: var(--sf);
}

.checkout-title {
  margin: 0;
  font: var(--fw-bold) 26px/32px var(--font);
  letter-spacing: var(--tracking-tight);
  color: var(--tx);
}

.checkout-subline {
  margin: 0;
  font: var(--fw-regular) var(--t-body-s) var(--font);
  color: var(--tx2);
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-6);
  align-items: start;
}

.checkout-plan,
.checkout-pay {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.checkout-plan-full {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.checkout-price {
  margin: 0;
  font: var(--fw-regular) var(--t-body) var(--font);
  color: var(--tx2);
}

.checkout-amount {
  font: var(--fw-bold) 34px/40px var(--font);
  font-variant-numeric: tabular-nums;
  color: var(--tx);
}

.checkout-ticks {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  font: var(--fw-regular) var(--t-body) var(--font);
  color: var(--tx);
}

.checkout-ticks li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkout-ticks .icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--ac-text);
}

.checkout-plan-short {
  display: none;
}

.checkout-total {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding-top: 14px;
  border-top: var(--bw) solid var(--line);
}

.checkout-total-row {
  display: flex;
  justify-content: space-between;
  gap: var(--sp-3);
  font: var(--fw-regular) var(--t-body) var(--font);
  color: var(--tx);
}

.checkout-total-row dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.checkout-total-today {
  font-weight: var(--fw-bold);
}

.checkout-total-row--then {
  font: var(--fw-regular) var(--t-body-s) var(--font);
  color: var(--tx2);
}

.checkout-tax,
.checkout-safe {
  margin: 0;
  font: var(--fw-regular) 12px/18px var(--font);
  color: var(--tx3);
}

.checkout-pay-title {
  margin: 0;
  font: var(--fw-bold) 16px/22px var(--font);
  color: var(--tx);
}

.checkout-pay-text {
  margin: 0;
  font: var(--fw-regular) var(--t-body-s) var(--font);
  color: var(--tx2);
}

.checkout-pay form {
  display: flex;
}

.checkout-safe {
  text-align: center;
}

@media (max-width: 1099px), (hover: none) and (pointer: coarse) {
  .checkout-back-phone {
    display: flex;
    align-items: center;
    height: 44px;
    margin: -8px 0 4px -8px;
  }

  .checkout-back {
    display: none;
  }

  .checkout-heading {
    margin-bottom: var(--sp-4);
  }

  .checkout-title {
    font: var(--fw-bold) var(--t-display-m) var(--font);
  }

  /* No subline on phone */
  .checkout-subline {
    display: none;
  }

  .checkout-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-4);
  }

  /* "Pro, monthly  $20" in place of the full plan */
  .checkout-plan-full {
    display: none;
  }

  .checkout-plan-short {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 0;
    font: var(--fw-regular) var(--t-body) var(--font);
    color: var(--tx);
  }

  .checkout-plan-short-price {
    font: var(--fw-bold) 20px/26px var(--font);
    font-variant-numeric: tabular-nums;
  }
}

/* --- You're on Pro (checkouts#success) ---------------------------------- */

.upgraded {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  max-width: 400px;
  margin: 12vh auto 0;
  text-align: center;
}

.upgraded-disc {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: var(--r-pill);
  background: var(--ac-bg);
  color: var(--ac-text);
}

.upgraded-disc .icon {
  width: 34px;
  height: 34px;
}

.upgraded-disc--waiting {
  background: var(--sf2);
  color: var(--tx2);
}

.upgraded-title {
  margin: 6px 0 0;
  font: var(--fw-bold) 26px/32px var(--font);
  letter-spacing: var(--tracking-tight);
  color: var(--tx);
}

.upgraded-text {
  margin: 0;
  font: var(--fw-regular) var(--t-body) var(--font);
  color: var(--tx2);
}

.upgraded-actions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  width: 100%;
  margin-top: 14px;
}

.upgraded-note {
  margin: 6px 0 0;
  font: var(--fw-regular) 12px/18px var(--font);
  color: var(--tx3);
}

@media (max-width: 1099px), (hover: none) and (pointer: coarse) {
  .upgraded {
    margin-top: 20vh;
  }

  .upgraded-button.button--lg {
    border-radius: var(--r-field);
    font-size: 16px;
  }
}
