/* Donate page — shares layout tokens with privacy.css / landing.css */

html.donate-page,
html.donate-page body {
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
}

.donate {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100dvh;
  min-height: 100svh;
  padding: 0 clamp(16px, 4vw, 24px);
}

.donate__logo {
  position: absolute;
  top: var(--page-inset);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: var(--logo-size);
  height: var(--logo-size);
  border-radius: 13px;
  background: var(--page-surface);
  border: 1.5px solid var(--logo-stroke);
  color: #ffffff;
  display: grid;
  place-items: center;
  text-decoration: none;
  transition:
    background-color 0.3s ease,
    border-color var(--stroke-ease),
    color 0.3s ease;
}

html[data-page-theme="light"] .donate__logo {
  color: #141414;
}

.donate__logo:hover {
  border-color: var(--logo-stroke-hover);
}

.donate__logo-mark {
  width: 14px;
  height: 21px;
  display: block;
}

.donate__logo-mark path {
  fill: currentColor;
}

.donate__main {
  width: 100%;
  max-width: 560px;
  padding-top: calc(var(--chrome-top) + 12px);
  padding-bottom: calc(var(--page-inset) + 4rem);
  text-align: center;
}

.donate__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 28px;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--page-text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.donate__back:hover {
  color: var(--page-text);
}

.donate__title {
  margin: 0 0 10px;
  font-size: clamp(2rem, 5vw, 2.5rem);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.donate__subtitle {
  margin: 0 0 32px;
  font-size: 1.0625rem;
  font-weight: 300;
  line-height: 1.45;
  color: var(--page-text-muted);
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}

.donate__card {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 32px 28px 28px;
  border-radius: 16px;
  outline: 1.5px solid var(--preview-border);
  outline-offset: -1.5px;
  background: var(--preview-bg);
  transition:
    outline-color 0.3s ease,
    background-color 0.3s ease;
}

.donate__card-title {
  margin: 0 0 8px;
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.donate__card-text {
  margin: 0 0 24px;
  font-size: 0.9375rem;
  font-weight: 300;
  line-height: 1.55;
  color: var(--page-text-muted);
}

.donate__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.donate__cta {
  width: 100%;
  max-width: 280px;
}

.donate__fineprint {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 300;
  line-height: 1.45;
  color: var(--fineprint-muted);
  position: relative;
  z-index: 1;
}

.donate__checkout:not([hidden]) ~ .donate__fineprint {
  margin-top: 8px;
}

.donate__loading {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 300;
  color: var(--page-text-muted);
}

.donate__loading[hidden] {
  display: none;
}

.donate__checkout {
  width: 100%;
  min-height: 360px;
  margin-bottom: 4px;
  padding-bottom: 20px;
  border-radius: 12px;
  overflow: visible;
  background: var(--preview-bg);
  color: var(--page-text);
  isolation: isolate;
}

.donate__checkout[hidden] {
  display: none;
}

.donate__fallback[hidden] {
  display: none;
}

.donate__fallback {
  width: 100%;
  display: flex;
  justify-content: center;
}

.donate__thanks {
  display: none;
  margin: 0 0 24px;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--page-surface);
  border: 1.5px solid var(--preview-border);
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--page-text);
}

.donate__thanks.is-visible {
  display: block;
}

.donate__thanks strong {
  color: var(--page-accent);
  font-weight: 500;
}

.donate__setup {
  display: none;
  margin: 0;
  font-size: 0.875rem;
  color: #f87171;
}

.donate__setup.is-visible {
  display: block;
}

.donate .footer {
  position: relative;
  bottom: auto;
  margin-top: auto;
  padding-top: 24px;
  padding-bottom: calc(var(--page-inset) + 8px);
}

@media (max-width: 480px) {
  .donate__main {
    padding-bottom: calc(var(--page-inset) + 3rem);
  }

  .donate__card {
    padding: 28px 20px 24px;
  }
}
