/* ══════════════════════════════════════════════
   TFH Stripe Donate — Styles
   Palette: #2f467a / #81c5bf / #c21600
   Fonts:  Roboto Condensed (headings) / Gothic A1 (body)
   ══════════════════════════════════════════════ */

.tfh-donate-widget,
.tfh-donate-widget *,
.tfh-donate-widget *::before,
.tfh-donate-widget *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.tfh-donate-widget {
  --navy: #2f467a;
  --navy-dark: #243660;
  --teal: #81c5bf;
  --teal-light: #e6f4f2;
  --teal-dark: #5fada6;
  --red: #c21600;
  --red-hover: #a81200;
  --ink: #2c2c2c;
  --ink-soft: #5a5a5a;
  --ink-muted: #8a8a8a;
  --white: #ffffff;
  --gray-border: #dde0e6;
  --sand: #f0ece6;
  --radius: 10px;
  --shadow: 0 6px 28px rgba(47,70,122,0.12);

  font-family: 'Gothic A1', Helvetica, Arial, sans-serif;
  color: var(--ink);
  line-height: 1.6;
  font-weight: 400;
  max-width: 800px;
  margin: 0 auto;
  background: var(--white);
  border-radius: 16px;
  overflow: clip;
  box-shadow: var(--shadow);
  animation: tfhFadeIn 0.5s ease-out;
}

@keyframes tfhFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Top Accent Bar ─────────────────────────── */

.tfh-donate-widget .tfh-accent-bar {
  height: 5px;
  background: linear-gradient(90deg, var(--navy) 0%, var(--teal) 60%, var(--red) 100%);
}

/* ── Body ───────────────────────────────────── */

.tfh-donate-widget .tfh-body {
  padding: 28px 28px 24px;
}

.tfh-donate-widget .tfh-org-name {
  font-family: 'Roboto Condensed', Helvetica, Arial, sans-serif;
  font-size: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--navy);
  margin-bottom: 6px;
  line-height: 1.2;
}

.tfh-donate-widget .tfh-headline {
  font-family: 'Roboto Condensed', Helvetica, Arial, sans-serif;
  font-size: 17px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--teal-dark);
  line-height: 1.35;
  margin-bottom: 16px;
}

.tfh-donate-widget .tfh-mission {
  font-family: 'Gothic A1', Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: #000000;
  line-height: 1.7;
  margin-bottom: 22px;
  font-weight: 400;
}

.tfh-donate-widget .tfh-mission strong {
  color: var(--navy);
  font-weight: 600;
}

/* ── Amount Card ────────────────────────────── */

.tfh-donate-widget .tfh-amount-card {
  background: #bb1403;
  border: 1.5px solid rgb(187, 19, 3);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  transition: border-color 0.2s;
}

.tfh-donate-widget .tfh-amount-card:hover {
  border-color: rgb(160, 16, 2);
}

.tfh-donate-widget .tfh-vaccine-icon {
  width: 46px; height: 46px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: none;
}

.tfh-donate-widget .tfh-vaccine-icon svg { width: 22px; height: 22px; }

.tfh-donate-widget .tfh-amount-label {
  font-family: 'Roboto Condensed', Helvetica, Arial, sans-serif;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #ffffff;
  font-weight: 600;
  margin-bottom: 2px;
}

.tfh-donate-widget .tfh-amount-value {
  font-family: 'Roboto Condensed', Helvetica, Arial, sans-serif;
  font-size: 33px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1;
}

.tfh-donate-widget .tfh-amount-desc {
  font-family: 'Gothic A1', Helvetica, Arial, sans-serif;
  font-size: 15px;
  color: #ffffff;
  margin-top: 2px;
  font-weight: 600;
}

/* ── Express Payment Buttons ────────────────── */

.tfh-donate-widget .tfh-express-payments {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 4px;
}

.tfh-donate-widget .tfh-express-btn {
  width: 100%;
  padding: 13px 16px;
  border: none;
  border-radius: 8px;
  font-family: 'Gothic A1', Helvetica, Arial, sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s, transform 0.1s;
  line-height: 1;
}

.tfh-donate-widget .tfh-express-btn:active {
  transform: scale(0.98);
}

.tfh-donate-widget .tfh-express-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.tfh-donate-widget .tfh-express-btn svg {
  flex-shrink: 0;
  display: block;
  position: relative;
  top: -1px;
}

/* Apple Pay */
.tfh-donate-widget .tfh-btn-applepay {
  background: #000;
  color: #fff;
}

.tfh-donate-widget .tfh-btn-applepay:hover:not(:disabled) {
  background: #1a1a1a;
}

/* Google Pay */
.tfh-donate-widget .tfh-btn-googlepay {
  background: #fff;
  color: #3c4043;
  border: 1.5px solid var(--gray-border);
}

.tfh-donate-widget .tfh-btn-googlepay:hover:not(:disabled) {
  background: #f8f9fa;
  border-color: #c0c4c8;
}

/* PayPal */
.tfh-donate-widget .tfh-btn-paypal {
  background: #ffc439;
  color: #111;
}

.tfh-donate-widget .tfh-btn-paypal:hover:not(:disabled) {
  background: #f0b92e;
}

/* ── Divider ────────────────────────────────── */

.tfh-donate-widget .tfh-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
}

.tfh-donate-widget .tfh-divider::before,
.tfh-donate-widget .tfh-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-border);
}

.tfh-donate-widget .tfh-divider span {
  font-family: 'Roboto Condensed', Helvetica, Arial, sans-serif;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  flex-shrink: 0;
}

/* ── Form Fields ────────────────────────────── */

.tfh-donate-widget .tfh-field-group {
  margin-bottom: 14px;
}

.tfh-donate-widget .tfh-label {
  display: block;
  font-family: 'Roboto Condensed', Helvetica, Arial, sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--ink);
  margin-bottom: 5px;
}

.tfh-donate-widget .tfh-input {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid var(--gray-border);
  border-radius: 8px;
  font-family: 'Gothic A1', Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: var(--ink);
  background: var(--white);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.tfh-donate-widget .tfh-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(129,197,191,0.2);
}

.tfh-donate-widget .tfh-input::placeholder {
  color: #666666;
  font-weight: 400;
}

/* Card field with icons */
.tfh-donate-widget .tfh-card-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}

.tfh-donate-widget .tfh-card-label-row .tfh-label {
  margin-bottom: 0;
}

.tfh-donate-widget .tfh-card-icons {
  display: block;
  height: 20px;
  width: auto;
}

/* Force the widget above any theme layers */
.tfh-donate-widget {
  position: relative;
  z-index: 99;
}

.tfh-donate-widget #tfh-card-element {
  padding: 12px 13px;
  border: 1.5px solid var(--gray-border);
  border-radius: 8px;
  background: var(--white);
  min-height: 44px;
  position: relative;
  z-index: 10;
  cursor: text;
}

/* Ensure Stripe iframe is tappable on mobile */
.tfh-donate-widget #tfh-card-element iframe {
  pointer-events: auto !important;
  touch-action: auto !important;
}

/* Force all form elements to be interactive on mobile */
.tfh-donate-widget .tfh-col-right {
  position: relative;
  z-index: 10;
}

.tfh-donate-widget .tfh-input,
.tfh-donate-widget #tfh-card-element,
.tfh-donate-widget .tfh-submit,
.tfh-donate-widget .tfh-express-btn {
  /* Prevent iOS zoom on focus + ensure tappability */
  font-size: 16px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(0,0,0,0.05);
}

.tfh-donate-widget #tfh-card-element.StripeElement--focus {
  border-color: var(--navy);
}

.tfh-donate-widget #tfh-card-element.StripeElement--invalid {
  border-color: var(--red);
}

/* ── Submit Button ──────────────────────────── */

.tfh-donate-widget .tfh-submit {
  width: 100%;
  padding: 15px 16px;
  background: #2f467a;
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-family: 'Roboto Condensed', Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
  position: relative;
  overflow: hidden;
  line-height: 1;
}

.tfh-donate-widget .tfh-submit:hover {
  background: #2f467a;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(47,70,122,0.35);
}

.tfh-donate-widget .tfh-submit:active {
  transform: translateY(0);
}

.tfh-donate-widget .tfh-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.tfh-donate-widget .tfh-btn-text {
  display: flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.2s;
}

.tfh-donate-widget .tfh-spinner {
  display: none;
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: tfhSpin 0.6s linear infinite;
}

.tfh-donate-widget .tfh-submit.is-loading .tfh-btn-text { opacity: 0; position: absolute; }
.tfh-donate-widget .tfh-submit.is-loading .tfh-spinner  { display: block; }

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

/* ── Error Message ──────────────────────────── */

.tfh-donate-widget .tfh-error {
  color: var(--red);
  font-size: 13px;
  margin-top: 6px;
  min-height: 18px;
  font-weight: 400;
}

/* ── Success State ──────────────────────────── */

.tfh-donate-widget .tfh-success {
  display: none;
  text-align: center;
  padding: 44px 28px;
  animation: tfhFadeUp 0.4s ease-out;
}

.tfh-donate-widget .tfh-success-icon {
  width: 60px; height: 60px;
  background: var(--teal-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}

.tfh-donate-widget .tfh-success-icon svg { width: 28px; height: 28px; }

.tfh-donate-widget .tfh-success h3 {
  font-family: 'Roboto Condensed', Helvetica, Arial, sans-serif;
  font-size: 24px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 8px;
}

.tfh-donate-widget .tfh-success p {
  font-family: 'Gothic A1', Helvetica, Arial, sans-serif;
  font-size: 14px;
  color: var(--ink-soft);
  max-width: 300px;
  margin: 0 auto;
  line-height: 1.65;
  font-weight: 300;
}

.tfh-donate-widget .tfh-success .tfh-redirect-msg {
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: 12px;
  font-weight: 400;
}

/* ── Footer ─────────────────────────────────── */

.tfh-donate-widget .tfh-footer {
  padding: 14px 28px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-top: 1px solid var(--sand);
}

.tfh-donate-widget .tfh-secure-badge {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tfh-donate-widget .tfh-footer span {
  font-size: 11px;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
  font-weight: 400;
}

.tfh-donate-widget .tfh-footer svg {
  opacity: 0.4;
}

/* ── Two-Column Layout (Desktop) ─────────────── */

.tfh-donate-widget .tfh-columns {
  display: flex;
  flex-direction: column;
}

.tfh-donate-widget .tfh-col-left {
  margin-bottom: 4px;
}

@media (min-width: 680px) {
  .tfh-donate-widget .tfh-columns {
    flex-direction: row;
    gap: 32px;
    align-items: flex-start;
  }

  .tfh-donate-widget .tfh-col-left {
    flex: 1 1 0%;
    min-width: 0;
    margin-bottom: 0;
    padding-top: 4px;
  }

  .tfh-donate-widget .tfh-col-right {
    flex: 1 1 0%;
    min-width: 0;
  }

  .tfh-donate-widget .tfh-body {
    padding: 32px 36px 28px;
  }

  .tfh-donate-widget .tfh-mission {
    margin-bottom: 18px;
  }

  .tfh-donate-widget .tfh-org-name {
    font-size: 24px;
    margin-bottom: 8px;
  }

  .tfh-donate-widget .tfh-headline {
    font-size: 19px;
    margin-bottom: 18px;
  }

  .tfh-donate-widget .tfh-success {
    padding: 56px 48px;
  }
}

/* ── Responsive (Mobile) ────────────────────── */

@media (max-width: 480px) {
  .tfh-donate-widget { border-radius: 12px; }
  .tfh-donate-widget .tfh-body { padding: 22px 20px 18px; }
  .tfh-donate-widget .tfh-org-name { font-size: 18px; }
}
