/* ============================================================
   CodeYogi USA — Donate + Status pages
   Adapted from the India site's style.css (self-contained: the US
   bucket only ships the contents of us/).
   ============================================================ */

:root {
  --navy:        #1c2b4b;
  --navy-deep:   #172440;
  --navy-card:   #243554;
  --navy-border: #3a4d70;
  --amber:       #f5a623;
  --amber-dark:  #e39a2c;
  --navy-ink:    #1a2e50;
  --text-light:  #ffffff;
  --text-muted:  #c9d1e0;
  --text-dim:    #8f9bb3;
  --ink:         #141414;
  --error:       #ff7b7b;

  --font-sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Cormorant Garamond", "Playfair Display", Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* .btn etc. set their own display, so [hidden] needs to win */
[hidden] { display: none !important; }

body {
  font-family: var(--font-sans);
  background: var(--navy);
  color: var(--text-light);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }

/* Logo ---------------------------------------------------- */
.page-top { background: var(--navy-deep); padding-bottom: 40px; }

.page-logo { display: flex; justify-content: center; padding-top: 40px; }

.logo { display: flex; align-items: center; gap: 9px; color: #fff; }

.logo-icon { display: block; width: 34px; height: 44px; flex: none; }

.logo-text {
  display: flex;
  flex-direction: column;
  font-family: "Poppins", var(--font-sans);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.logo-name { font-weight: 700; font-size: 16.5px; }
.logo-sub  { font-weight: 600; font-size: 14px; }

/* Buttons -------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
  font-weight: 600;
  border: 0;
  cursor: pointer;
  transition: background .2s, transform .15s;
}

.btn-primary {
  background: var(--amber);
  color: var(--ink);
  font-size: 16px;
  padding: 17px 34px;
  border-radius: 999px;
}

.btn-primary:hover { background: var(--amber-dark); transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  font-size: 15px;
  padding: 15px 30px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.btn-ghost:hover { color: #fff; border-color: rgba(255, 255, 255, 0.4); }

/* Page ----------------------------------------------------- */
.donate-page { background: var(--navy); min-height: 100vh; padding-bottom: 80px; }

.panel-inner {
  width: min(552px, 100% - 32px);
  margin-inline: auto;
  padding-top: 48px;
}

.panel-inner.center { text-align: center; width: min(600px, 100% - 32px); }

.eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 30px;
}

.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }

.eyebrow .line { flex: 0 0 130px; height: 1px; background: rgba(255, 255, 255, 0.18); }

.eyebrow-text {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.heading {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 54px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: #fff;
  margin-bottom: 26px;
}

.heading em { font-style: italic; font-weight: 500; color: var(--amber); }
.heading em.is-failed { color: var(--error); }

.lead { font-size: 18px; line-height: 1.6; color: var(--text-muted); margin-bottom: 20px; }

.org-line { font-size: 13px; line-height: 1.55; color: var(--text-dim); margin-bottom: 48px; }

.center .lead { max-width: 500px; margin-inline: auto; margin-bottom: 30px; }

/* Form ----------------------------------------------------- */
.donate-form { display: flex; flex-direction: column; gap: 32px; }

.fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }

.legend,
.field-label {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.7);
}

.legend { display: block; margin-bottom: 14px; }

.field { display: flex; flex-direction: column; gap: 6px; }

.field-label { margin-bottom: 2px; }

.field-row { display: grid; grid-template-columns: 1fr; gap: 20px; }

@media (min-width: 640px) {
  .field-row { grid-template-columns: 1fr 1fr; }
}

/* Frequency segmented control (radio group) */
.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.segment { position: relative; }

.segment input { position: absolute; opacity: 0; pointer-events: none; }

.segment span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  transition: background .25s, color .25s;
}

.segment span:hover { color: #fff; }

.segment input:checked + span {
  background: var(--amber);
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(242, 169, 59, 0.35);
}

.segment input:focus-visible + span { outline: 2px solid #fff; outline-offset: 2px; }

.note { margin-top: 10px; font-size: 13px; line-height: 1.5; color: var(--text-dim); }

/* Amount pills */
.amount-options { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }

.amount-pill { position: relative; }

.amount-pill input { position: absolute; opacity: 0; pointer-events: none; }

.amount-pill span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1.5px solid rgba(245, 166, 35, 0.3);
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .24s ease, border-color .24s ease, color .24s ease, transform .2s ease;
}

.amount-pill span:hover {
  background: rgba(245, 166, 35, 0.1);
  border-color: rgba(245, 166, 35, 0.55);
  color: #fff;
}

.amount-pill span:active { transform: scale(.96); }

.amount-pill input:focus-visible + span { outline: 2px solid var(--amber); outline-offset: 2px; }

.amount-pill input:checked + span {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--navy-ink);
}

/* Text inputs */
.input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  line-height: 1.5;
  outline: none;
  transition: border-color .24s ease, background .24s ease;
}

.input::placeholder { color: rgba(255, 255, 255, 0.35); }

.input:focus { border-color: rgba(245, 166, 35, 0.5); background: rgba(255, 255, 255, 0.08); }

.input[aria-invalid="true"] { border-color: var(--error); }

.input[type="number"]::-webkit-inner-spin-button,
.input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.input[type="number"] { -moz-appearance: textfield; }

.field-error { font-size: 13px; line-height: 1.4; color: var(--error); min-height: 0; }
.field-error:empty { display: none; }
.fieldset .field-error { margin-top: 8px; }

/* Submit */
.submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  align-self: flex-start;
  padding: 16px 36px;
  border: 0;
  border-radius: 999px;
  background: var(--amber);
  color: var(--navy-ink);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 24px 48px -16px rgba(245, 166, 35, 0.3);
  transition: transform .28s cubic-bezier(.2,.8,.2,1), box-shadow .28s ease, background .28s ease;
}

.submit:hover { transform: translateY(-3px); background: #ffb940; }
.submit:active { transform: scale(.97); }
.submit:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.submit:disabled { opacity: .7; cursor: progress; transform: none; }

.submit svg { width: 18px; height: 18px; transition: transform .28s cubic-bezier(.2,.8,.2,1); }
.submit:hover:not(:disabled) svg { transform: translateX(4px); }

.donate-status { font-size: 14px; margin: 0; }
.donate-status:empty { display: none; }
.donate-status.is-error { color: var(--error); }

/* Info block under the form */
.info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px 24px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
}

.info a { color: var(--amber); text-decoration: underline; text-underline-offset: 2px; }

.fine-print { font-size: 13px; line-height: 1.55; color: var(--text-dim); text-align: center; }

/* Status page --------------------------------------------- */
.state { display: none; }
body[data-state="checking"]  .state-checking,
body[data-state="paid"]      .state-paid,
body[data-state="cancelled"] .state-cancelled,
body[data-state="error"]     .state-error { display: block; }

.status-icon {
  width: 88px;
  height: 88px;
  margin: 0 auto 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(242, 169, 59, 0.14);
  border: 1px solid rgba(242, 169, 59, 0.45);
  box-shadow: 0 0 0 10px rgba(242, 169, 59, 0.06);
}

.status-icon svg { width: 42px; height: 42px; }

.status-icon.is-failed {
  background: rgba(255, 123, 123, 0.12);
  border-color: rgba(255, 123, 123, 0.45);
  box-shadow: 0 0 0 10px rgba(255, 123, 123, 0.05);
}

.status-icon.is-muted {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: none;
}

.spinner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid rgba(242, 169, 59, 0.25);
  border-top-color: var(--amber);
  animation: spin 0.9s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; border-top-color: rgba(242, 169, 59, 0.25); }
}

.gift-summary {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 24px;
  margin-bottom: 26px;
  border-radius: 12px;
  background: var(--navy-card);
  border: 1px solid var(--navy-border);
}

.gift-amount { font-size: 28px; font-weight: 700; color: #fff; }
.gift-frequency { font-size: 14px; color: var(--text-muted); }

.status-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; }

/* Responsive ---------------------------------------------- */
@media (max-width: 600px) {
  .page-logo { padding-top: 28px; }
  .page-top { padding-bottom: 28px; }
  .heading { font-size: 40px; }
  .lead { font-size: 16px; }
  .org-line { margin-bottom: 36px; }
  .eyebrow .line { flex-basis: 60px; }
  .submit { align-self: stretch; }
  .info { padding: 18px; }
}
