.ehi-sandbox-notice {
  padding: 16px 20px;
  border-radius: 12px;
  background: #e7f0fe;
  color: #202124;
  font-size: 16px;
  line-height: 24px;
}

.donation-form > .ehi-sandbox-notice {
  margin: 0;
  padding: 14px 32px;
  border-radius: 0;
  border-bottom: 1px solid #f1f3f4;
  background: #fff;
  color: #5f6368;
}

.ehi-public-error {
  color: #a12622;
  font-size: 16px;
  line-height: 24px;
  margin: 20px 0;
}

/* One agreement, one payment summary. The accepted server terms stay authoritative. */
.donation-form[data-public-monthly="true"] .donation-review > .donation-review-amount,
.donation-form[data-public-monthly="true"] .donation-review [data-donation-billing-row],
.donation-form[data-public-monthly="true"] .donation-next,
.donation-form[data-public-monthly="true"] .donation-email-fallback {
  display: none;
}

.ehi-monthly-review {
  margin: 28px 0 0;
}

.ehi-monthly-summary {
  overflow: hidden;
  border: 1px solid #e0e8d3;
  border-radius: 20px;
  background: #eff5e3;
}

.donation-review .ehi-monthly-summary dl {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 24px;
  margin: 0;
  padding: 24px;
}

.donation-review .ehi-monthly-summary dl > div {
  min-width: 0;
  padding: 0;
  border: 0;
}

.ehi-monthly-summary dt {
  color: #52613e;
}

.donation-review .ehi-monthly-summary dd {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
  font-size: 48px;
  line-height: 56px;
  white-space: normal;
}

.donation-review .ehi-monthly-summary .ehi-monthly-date {
  font-size: 28px;
  line-height: 36px;
}

.ehi-monthly-summary dd small,
.donation-review .ehi-monthly-summary .ehi-monthly-repeat {
  font-size: 16px;
  line-height: 24px;
  color: #52613e;
}

.donation-review .ehi-monthly-summary .ehi-monthly-repeat {
  margin-top: 6px;
}

.ehi-monthly-summary > p {
  margin: 0;
  padding: 16px 24px;
  border-top: 1px solid #dfe7d2;
  font-size: 16px;
  line-height: 24px;
  color: #52613e;
}

.ehi-monthly-agreement .donation-consent {
  margin-top: 24px;
}

.ehi-monthly-agreement .ehi-monthly-help {
  margin: 8px 0 0 32px;
  color: #5f6368;
  font-size: 16px;
  line-height: 24px;
}

.donation-form[data-public-monthly="true"] .donation-review > dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 24px;
}

.donation-form[data-public-monthly="true"] .donation-review > dl > div:first-child,
.donation-form[data-public-monthly="true"] [data-donation-message-row] {
  grid-column: 1 / -1;
}

.ehi-public-secure {
  margin: 12px 0 0;
  color: #5f6368;
  text-align: center;
  font-size: 16px;
  line-height: 24px;
}

.ehi-public-restart {
  display: block;
  margin: 16px 0;
  color: #1a73e8;
  text-decoration: none;
}

.ehi-public-restart:hover {
  text-decoration: underline;
}

#main .ehi-donation-status {
  max-width: 880px;
  padding-top: 100px;
  padding-bottom: 120px;
  text-align: center;
}

.ehi-donation-status-icon {
  display: inline-grid;
  place-items: center;
  width: 72px;
  height: 72px;
  margin-bottom: 28px;
  border-radius: 50%;
  background: #e7f0fe;
  color: #4a3369;
  font-size: 36px;
  line-height: 1;
}

.ehi-donation-status h1 {
  font-size: 48px;
  font-weight: 400;
  line-height: 56px;
  letter-spacing: -0.5px;
  margin: 0 0 24px;
}

.ehi-donation-status > p {
  max-width: 680px;
  margin: 0 auto 28px;
}

.ehi-donation-status-details {
  max-width: 680px;
  margin: 32px auto;
  border: 1px solid #e8eaed;
  border-radius: 24px;
  overflow: hidden;
  text-align: left;
}

.ehi-donation-status-details dl {
  margin: 0;
}

.ehi-confirmation-payments {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  padding: 28px;
  background: #eff5e3;
}

.ehi-donation-status-details dt,
.ehi-confirmation-amount > span {
  font-size: 16px;
  line-height: 24px;
  color: #5f6368;
}

.ehi-donation-status-details dd {
  margin: 8px 0 0;
  overflow-wrap: anywhere;
}

.ehi-confirmation-payments dd {
  font-size: 28px;
  line-height: 36px;
}

.ehi-confirmation-payments .ehi-confirmation-date {
  font-size: 24px;
  line-height: 32px;
}

.ehi-confirmation-payments .ehi-confirmation-repeat {
  font-size: 16px;
  line-height: 24px;
  color: #52613e;
}

.ehi-confirmation-meta {
  padding: 8px 28px;
}

.ehi-confirmation-meta > div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: baseline;
  gap: 20px;
  padding: 16px 0;
}

.ehi-confirmation-meta > div + div {
  border-top: 1px solid #f1f3f4;
}

.ehi-confirmation-meta dd {
  margin: 0;
  font-size: 18px;
  line-height: 28px;
}

.ehi-confirmation-meta [data-status-reference] {
  font-size: 16px;
  line-height: 24px;
  color: #5f6368;
}

.ehi-confirmation-amount {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding: 28px;
  background: #eff5e3;
}

.ehi-confirmation-amount > strong {
  font-size: 28px;
  line-height: 36px;
  font-weight: 400;
}

.ehi-donation-status > .ehi-sandbox-notice {
  background: transparent;
  padding: 0;
  color: #5f6368;
}

.ehi-donation-status .ehi-confirmation-note {
  max-width: 560px;
  font-size: 16px;
  line-height: 24px;
  color: #5f6368;
}

.ehi-donation-status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin: 36px 0 28px;
}

#main .ehi-donation-status-actions .button-secondary,
#main .ehi-monthly-manage .button-secondary {
  background: transparent;
  color: #1a73e8;
  border: 1px solid #dadce0;
}

#main .ehi-donation-status-actions .button-secondary:hover,
#main .ehi-monthly-manage .button-secondary:hover {
  background: #f6fafe;
  border-color: #1a73e8;
}

.ehi-donation-status-links {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.ehi-donation-status-links a {
  color: #1a73e8;
  text-decoration: none;
}

.ehi-donation-status-links a:hover {
  text-decoration: underline;
}

@media (max-width: 767px) {
  #main .ehi-donation-status {
    padding-top: 60px;
    padding-bottom: 80px;
  }

  .ehi-donation-status h1 {
    font-size: 36px;
    line-height: 44px;
  }

  .ehi-confirmation-payments {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 24px;
  }

  .ehi-confirmation-meta {
    padding: 8px 24px;
  }

  .ehi-confirmation-meta > div {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .ehi-confirmation-amount {
    padding: 24px;
    flex-wrap: wrap;
  }
}

@media (max-width: 599px) {
  .donation-form > .ehi-sandbox-notice {
    padding: 12px 24px;
  }

  .donation-review .ehi-monthly-summary dl {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
  }

  .donation-review .ehi-monthly-summary dl > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    align-items: baseline;
    column-gap: 12px;
  }

  .donation-review .ehi-monthly-summary dd {
    justify-content: flex-end;
    margin-top: 0;
    text-align: right;
    font-size: 28px;
    line-height: 36px;
  }

  .donation-review .ehi-monthly-summary .ehi-monthly-date {
    font-size: 24px;
    line-height: 32px;
  }

  .donation-review .ehi-monthly-summary .ehi-monthly-repeat {
    grid-column: 2;
  }

  .donation-review .ehi-monthly-summary dl > div + div {
    padding-top: 20px;
    border-top: 1px solid #dfe7d2;
  }

  .ehi-monthly-summary > p {
    padding: 16px 20px;
  }

  .donation-form[data-public-monthly="true"] .donation-review > dl {
    grid-template-columns: 1fr;
  }
}


/* Donor-controlled renewals use the same quiet cards and pill buttons as checkout. */
.ehi-monthly-manage {
  width: 100%;
  max-width: 680px;
  margin: 32px auto 0;
  padding: 28px;
  border: 1px solid #dadce0;
  border-radius: 20px;
  text-align: left;
}

.ehi-donation-status .button:not(:disabled):not([aria-disabled="true"]),
.ehi-monthly-stop-consent,
.ehi-monthly-stop-consent input:not(:disabled) {
  cursor: pointer;
}

.ehi-donation-status .button:disabled,
.ehi-donation-status .button[aria-disabled="true"] {
  cursor: not-allowed;
}

#main .ehi-donation-status .button:disabled,
#main .ehi-donation-status .button[aria-disabled="true"] {
  background: #F1F3F4;
  border-color: #DADCE0;
  color: #5F6368;
  box-shadow: none;
}

.ehi-donation-status .button {
  justify-content: center;
  text-align: center;
  white-space: normal;
  font-size: 16px;
  line-height: 24px;
}

.ehi-monthly-manage :is(h2, h3, p),
.ehi-monthly-card-status p {
  text-align: left;
}

.ehi-monthly-manage h2 {
  margin: 0 0 12px;
  font-size: 28px;
  line-height: 36px;
  font-weight: 400;
}

.ehi-monthly-manage p {
  margin: 0 0 20px;
  font-size: 18px;
  line-height: 28px;
  color: #5f6368;
}

.ehi-monthly-stop-review {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #f1f3f4;
}

.ehi-monthly-stop-review h3 {
  margin: 0 0 16px;
  font-size: 28px;
  line-height: 36px;
  font-weight: 400;
}

.ehi-monthly-stop-consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 16px;
  line-height: 24px;
}

.ehi-monthly-stop-consent input {
  flex-shrink: 0;
  margin-top: 5px;
}

.ehi-monthly-stop-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

@media (max-width: 600px) {
  .ehi-monthly-manage { padding: 20px; }
  .ehi-monthly-stop-actions .button,
  .ehi-monthly-manage-actions .button,
  .ehi-donation-status-actions .button { width: 100%; }
}


.donation-form > .ehi-public-manage-link {
  margin: 0;
  padding: 14px 32px;
  border-bottom: 1px solid #f1f3f4;
  font-size: 16px;
  line-height: 24px;
  color: #5f6368;
}


.ehi-monthly-manage-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 12px;
}

.ehi-monthly-card-status {
  width: 100%;
  max-width: 680px;
  margin: 28px auto 0;
  padding: 24px;
  border-radius: 20px;
  background: #e7f0fe;
  text-align: left;
}

.ehi-monthly-card-status p {
  margin: 0;
  font-size: 18px;
  line-height: 28px;
}

.ehi-monthly-card-status .button {
  margin-top: 16px;
  cursor: pointer;
}

.ehi-monthly-card-status .button:disabled {
  cursor: not-allowed;
}

.ehi-invoice-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin: 0 0 24px;
  padding: 24px;
  background: #eff5e3;
  border-radius: 16px;
}

.ehi-invoice-summary dt {
  font-size: 16px;
  line-height: 24px;
  color: #5f6368;
}

.ehi-invoice-summary dd {
  margin: 8px 0 0;
  font-size: 28px;
  line-height: 36px;
  overflow-wrap: anywhere;
}

.ehi-monthly-invoice .ehi-invoice-note {
  margin: 20px 0 0;
}

@media (max-width: 600px) {
  .ehi-invoice-summary {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
  }
}

/* Private monthly payment history shares the confirmation page's type and spacing. */
.ehi-monthly-history {
  width: 100%;
  max-width: 680px;
  margin: 32px auto;
  padding: 24px;
  border: 1px solid #e8eaed;
  border-radius: 20px;
  text-align: left;
}
.ehi-monthly-history > summary {
  cursor: pointer;
  color: #202124;
  font-size: 20px;
  line-height: 28px;
}
.ehi-monthly-history > summary:focus-visible {
  outline: 2px solid #1a73e8;
  outline-offset: 6px;
  border-radius: 4px;
}
.ehi-monthly-history .ehi-history-note,
.ehi-history-list span {
  color: #5f6368;
  font-size: 16px;
  line-height: 24px;
}
.ehi-history-list {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
}
.ehi-history-list > li {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  border-top: 1px solid #f1f3f4;
}
.ehi-history-list strong,
.ehi-history-list span {
  display: block;
  overflow-wrap: anywhere;
}
.ehi-history-list strong {
  color: #202124;
  font-size: 18px;
  line-height: 28px;
  font-weight: 400;
}
.ehi-history-amount {
  text-align: right;
}
@media (max-width: 540px) {
  .ehi-monthly-history { padding: 20px; }
  .ehi-history-list > li { flex-direction: column; gap: 8px; }
  .ehi-history-amount { text-align: left; }
}
