/* Hope For Paws – shared donation widget styles. Used with js/hfp-donate-widget.js */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@600;700;800;900&display=swap');

.hfp, .hfp-sheet {
  --hfp-blue: #0a6fd1;
  --hfp-blue-dark: #0a4f96;
  --hfp-blue-tint: #eaf4ff;
  --hfp-blue-track: #e6eef8;
  --hfp-line: #d6e2f2;
  --hfp-line-strong: #c9d6e8;
  --hfp-bg: #f4f8fc;
  --hfp-ink: #1b1b1b;
  --hfp-muted: #4f5966;
  --hfp-orange: #d4570f;
  --hfp-orange-ink: #b1460a;
  --hfp-orange-deep: #8f3807;
  --hfp-orange-tint: #fff4ee;
  --hfp-orange-soft: #fde7da;
  --hfp-orange-line: #f3c9b0;
  --hfp-green-tint: #d7f5b8;
  --hfp-green-ink: #1f4d07;
  --hfp-error: #c4161c;
  font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--hfp-ink);
}
.hfp *, .hfp-sheet * { box-sizing: border-box; }
.hfp {
  max-width: 480px;
  margin: 0 auto;
  background: var(--hfp-bg);
  border: 1px solid #e3eaf3;
  border-radius: 16px;
  overflow: clip;
}
.hfp button { font-family: inherit; }
.hfp :focus-visible, .hfp-sheet :focus-visible { outline: 2px solid var(--hfp-blue); outline-offset: 2px; }
.hfp [hidden], .hfp-sheet[hidden], .hfp-sheet [hidden] { display: none !important; }

/* Title + breadcrumbs */
.hfp-top { background: #fff; border-bottom: 1px solid #e3eaf3; padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 12px; }
.hfp-titlerow { display: flex; align-items: center; gap: 4px; min-height: 44px; }
.hfp-title { margin: 0; font-size: 22px; line-height: 1.2; font-weight: 900; text-align: left; }
.hfp-back { width: 44px; height: 44px; margin-left: -12px; flex-shrink: 0; border: 0; background: transparent; color: var(--hfp-ink); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.hfp-crumbs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.hfp-crumb { width: 100%; min-height: 44px; padding: 0; border: 0; background: transparent; text-align: left; display: flex; flex-direction: column; align-items: stretch; gap: 6px; -webkit-appearance: none; appearance: none; cursor: default; color: var(--hfp-muted); }
.hfp-crumb.is-past { cursor: pointer; }
/* width/flex are explicit: Safari collapses an empty flex item inside a <button> to 0 width, hiding the bar */
.hfp-crumb-bar { display: block; width: 100%; height: 5px; flex: 0 0 5px; align-self: stretch; border-radius: 3px; background: var(--hfp-line); }
.hfp-crumb.is-past .hfp-crumb-bar, .hfp-crumb.is-current .hfp-crumb-bar { background: var(--hfp-blue); }
.hfp-crumb.is-past, .hfp-crumb.is-current { color: var(--hfp-ink); }
.hfp-crumb-label { font-size: 12px; font-weight: 800; }
.hfp-crumb-sub { margin-top: -4px; font-size: 12px; font-weight: 800; color: var(--hfp-blue); text-decoration: underline; }

/* Steps */
.hfp-step { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.hfp-h { margin: 0; font-size: 18px; font-weight: 900; }

.hfp-freq { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; background: var(--hfp-blue-track); border-radius: 999px; }
.hfp-freq button { height: 44px; border: 0; border-radius: 999px; background: transparent; color: var(--hfp-blue); font-size: 15px; font-weight: 800; cursor: pointer; }
.hfp-freq button[aria-checked="true"] { background: var(--hfp-blue); color: #fff; }

.hfp-ladder { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 8px; margin-bottom: 2px; }
.hfp-amt { position: relative; height: 52px; border: 2px solid var(--hfp-line); border-radius: 12px; background: #fff; color: var(--hfp-blue); font-size: 19px; font-weight: 900; cursor: pointer; }
.hfp-amt[aria-checked="true"] { background: var(--hfp-blue); border-color: var(--hfp-blue); color: #fff; }
.hfp-tag { position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%); padding: 1px 8px; border-radius: 999px; background: var(--hfp-green-tint); color: var(--hfp-green-ink); font-size: 11px; font-weight: 800; white-space: nowrap; pointer-events: none; }

.hfp-label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.hfp-label small { font-size: 14px; font-weight: 600; color: var(--hfp-muted); }
.hfp-custom { display: flex; align-items: center; gap: 6px; height: 52px; padding: 0 14px; background: #fff; border: 2px solid var(--hfp-line); border-radius: 12px; }
.hfp-custom.is-active { background: var(--hfp-blue-tint); border-color: var(--hfp-blue); }
.hfp-custom-cur { font-size: 19px; font-weight: 900; color: var(--hfp-blue); }
.hfp-custom input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 19px; font-weight: 900; color: var(--hfp-blue); }
/* Site theme input styles add their own border/outline inside the box; the wrapper already draws it. */
.hfp .hfp-custom input,
.hfp .hfp-custom input:focus { border: 0 !important; outline: 0 !important; box-shadow: none !important; background: transparent !important; height: auto !important; padding: 0 !important; margin: 0 !important; border-radius: 0 !important; }
.hfp-custom input::placeholder { color: #7a8594; font-weight: 700; }
.hfp-custom:focus-within { outline: 2px solid var(--hfp-blue); outline-offset: 1px; }
.hfp-per { font-size: 14px; font-weight: 700; color: var(--hfp-muted); white-space: nowrap; }

.hfp-nudge { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #fff; border: 1.5px solid var(--hfp-line-strong); border-radius: 12px; }
.hfp-nudge-copy { flex: 1; font-size: 14px; line-height: 1.35; }
.hfp-nudge-copy strong { display: block; font-weight: 800; }
.hfp-nudge-copy span { color: var(--hfp-muted); }
.hfp-nudge button { flex-shrink: 0; height: 44px; padding: 0 14px; border: 2px solid var(--hfp-blue); border-radius: 999px; background: #fff; color: var(--hfp-blue); font-size: 14px; font-weight: 800; cursor: pointer; }

.hfp-check { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.4; cursor: pointer; }
.hfp-check input { width: 20px; height: 20px; margin: 0; flex-shrink: 0; accent-color: var(--hfp-blue); }
.hfp-check > span { flex: 1; }
.hfp-check strong { font-weight: 800; }

.hfp-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hfp-input { width: 100%; height: 50px; border: 1.5px solid var(--hfp-line-strong); border-radius: 10px; padding: 0 12px; font: inherit; font-size: 16px; color: var(--hfp-ink); background: #fff; }
.hfp-input[aria-invalid="true"] { border-color: var(--hfp-error); }
select.hfp-input { cursor: pointer; }

/* Billing address */
.hfp-address { display: flex; flex-direction: column; gap: 12px; }
.hfp-address-h { margin-bottom: -4px; font-weight: 800; }
/* align-items: end keeps the inputs in one line when a label wraps (e.g. "State / Province (optional)") */
.hfp-grid3 { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 10px; align-items: end; }
.hfp-grid3 .hfp-label small { white-space: nowrap; }
@media (max-width: 420px) {
  .hfp-grid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hfp-grid3 > :first-child { grid-column: 1 / -1; }
}
.hfp-optins { display: flex; flex-direction: column; gap: 12px; padding: 14px; background: #fff; border: 1px solid #e3eaf3; border-radius: 12px; }
.hfp-fine { margin: 0; font-size: 12px; line-height: 1.45; color: var(--hfp-muted); }
.hfp-fine a, .hfp-sheet a { color: var(--hfp-blue); }

.hfp-methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; padding: 4px; background: var(--hfp-blue-track); border-radius: 12px; }
.hfp-methods button { height: 44px; border: 0; border-radius: 9px; background: transparent; color: var(--hfp-muted); font-size: 15px; font-weight: 800; cursor: pointer; }
.hfp-methods button[aria-checked="true"] { background: #fff; color: var(--hfp-blue-dark); }
.hfp-stripe-box { padding: 15px 12px; border: 1.5px solid var(--hfp-line-strong); border-radius: 10px; background: #fff; }
.hfp-bank-connect { display: flex; align-items: center; width: 100%; height: 50px; padding: 0 14px; border: 2px dashed #9fb6d4; border-radius: 12px; background: #fff; color: var(--hfp-blue); font-size: 15px; font-weight: 800; cursor: pointer; text-align: left; }
.hfp-bank-connect span { margin-left: auto; }
.hfp-bank-connected { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 2px solid var(--hfp-blue); background: var(--hfp-blue-tint); border-radius: 12px; }
.hfp-bank-connected div { flex: 1; min-width: 0; font-size: 14px; }
.hfp-bank-connected strong { display: block; font-weight: 800; }
.hfp-bank-connected button { border: 0; background: transparent; color: var(--hfp-blue); font-weight: 800; cursor: pointer; min-height: 44px; }
.hfp-note { padding: 10px 12px; border-radius: 10px; background: var(--hfp-blue-tint); color: var(--hfp-blue-dark); font-size: 13px; font-weight: 600; line-height: 1.4; }
.hfp-error { margin: 0; font-size: 13px; font-weight: 700; color: var(--hfp-error); }
.hfp-error:empty { display: none; }
.hfp .recaptcha-v2-holder { justify-content: center; }
/* Google's checkbox is a fixed 304px; shrink it on small phones so it doesn't overflow the form */
@media (max-width: 360px) {
  .hfp .recaptcha-v2-slot { transform: scale(.85); transform-origin: center top; height: 66px; }
}

/* Footers */
.hfp-footer { position: sticky; bottom: 0; z-index: 2; padding: 10px 16px 12px; background: #fff; border-top: 1px solid #e3eaf3; display: flex; flex-direction: column; gap: 8px; }
.hfp-total-row { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; font-weight: 800; color: var(--hfp-muted); }
.hfp-total-row strong { font-size: 15px; font-weight: 900; color: var(--hfp-ink); }
/* Not hidden while empty: Stripe measures the wallet buttons at mount, and a display:none container leaves them 0px tall. noWallet() hides it when no wallet is available. */
.hfp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; border-radius: 999px; cursor: pointer; font-weight: 900; }
.hfp-btn--primary { height: 56px; border: 0; background: var(--hfp-orange); color: #fff; font-size: 19px; }
.hfp-btn--surgery { min-height: 50px; padding: 6px 8px; border: 2px solid var(--hfp-orange-line); background: #fff; color: var(--hfp-orange-ink); font-size: 15px; }
.hfp-btn--surgery .hfp-ico { width: 32px; height: 32px; flex-shrink: 0; border-radius: 50%; background: var(--hfp-orange-soft); display: flex; align-items: center; justify-content: center; }
.hfp-btn--surgery .hfp-txt { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hfp-btn--surgery .hfp-pill { flex-shrink: 0; padding: 6px 10px; border-radius: 999px; background: var(--hfp-orange-soft); color: var(--hfp-orange-deep); }
.hfp-btn[disabled] { opacity: .7; cursor: not-allowed; }
.hfp-spin { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.6); border-top-color: #fff; animation: hfp-spin .7s linear infinite; }
@keyframes hfp-spin { to { transform: rotate(360deg); } }
.hfp-secure { display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 12px; font-weight: 700; color: var(--hfp-muted); }
/* Very small phones (iPhone SE 1st gen, small Androids) */
@media (max-width: 360px) {
  .hfp-top, .hfp-step, .hfp-footer { padding-left: 12px; padding-right: 12px; }
  .hfp-title { font-size: 20px; }
  .hfp-ladder { gap: 12px 6px; }
  .hfp-amt { font-size: 17px; }
  .hfp-btn--primary { font-size: 17px; }
  .hfp-btn--surgery { font-size: 14px; }
}
/* No wallet available: card/bank becomes the primary action */
.hfp.no-wallet .hfp-express, .hfp.no-wallet .hfp-total-label { display: none; }

/* Surgery bottom sheet */
.hfp-sheet { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: flex-end; justify-content: center; }
.hfp-sheet-backdrop { position: absolute; inset: 0; background: rgba(20, 33, 61, .45); }
.hfp-sheet-panel { position: relative; width: 100%; max-width: 480px; padding: 10px 16px calc(18px + env(safe-area-inset-bottom, 0px)); background: #fff; border-radius: 20px 20px 0 0; box-shadow: 0 -8px 30px rgba(20, 33, 61, .18); display: flex; flex-direction: column; gap: 14px; animation: hfp-up .22s ease-out; }
@keyframes hfp-up { from { transform: translateY(24px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .hfp-sheet-panel { animation: none; } .hfp-spin { animation-duration: 2s; } }
.hfp-grab { width: 40px; height: 5px; border-radius: 3px; background: var(--hfp-line); align-self: center; }
.hfp-sheet-head { display: flex; align-items: flex-start; gap: 12px; }
.hfp-sheet-head .hfp-ico { width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; background: var(--hfp-orange-soft); color: var(--hfp-orange-ink); display: flex; align-items: center; justify-content: center; }
.hfp-sheet-head h3 { margin: 0; font-size: 19px; font-weight: 900; }
.hfp-sheet-head p { margin: 4px 0 0; font-size: 15px; line-height: 1.5; color: var(--hfp-muted); }
.hfp-sheet-close { width: 44px; height: 44px; margin: -8px -10px 0 auto; flex-shrink: 0; border: 0; background: transparent; color: var(--hfp-muted); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.hfp-sheet-sum { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 14px; background: var(--hfp-orange-tint); border-radius: 12px; font-size: 14px; font-weight: 700; color: var(--hfp-muted); }
.hfp-sheet-sum strong { font-size: 22px; font-weight: 900; color: var(--hfp-ink); }
.hfp-sheet .hfp-btn--primary { font-family: inherit; }
.hfp-sheet-alt { font-size: 13px; line-height: 1.4; color: var(--hfp-muted); text-align: center; margin: 0; }
