/* HalalMed Donate: header button, quick-donate bar, donate page panel. */
:root {
  --hmd-accent: #fcb900;       /* HalalMed logo yellow (the pill in the logo) */
  --hmd-accent-hover: #e8a900;
  --hmd-accent-line: #e0a600;
  --hmd-on-accent: #1a1a1a;    /* dark text on yellow: 10:1 contrast */
  --hmd-bar-h: 64px;           /* real height is set by donate.js */
  --hmd-green: #2d802f;
  --hmd-ink: #151616;
  --hmd-line: #e3e6e3;
}

/* ---------- Header Donate button (Astra header button 1) — only with switch "button_style" (body.hmd-btn) ---------- */
body.hmd-btn .ast-header-button-1 .ast-custom-button {
  background: var(--hmd-accent) !important;
  color: var(--hmd-on-accent) !important;
  border: 0 !important;
  border-radius: 6px !important;
  padding: 11px 20px !important;
  font-weight: 700 !important;
  font-size: 15px !important;
  line-height: 1 !important;
  letter-spacing: .01em;
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,.12);
  transition: background-color .15s ease;
  white-space: nowrap;
}
body.hmd-btn .ast-header-button-1 .ast-custom-button::before {
  content: "";
  width: 16px; height: 16px; flex: none;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7.5-4.6-9.6-9.3C1 8.5 3 5 6.6 5c2.1 0 3.6 1.2 4.4 2.5h2C13.8 6.2 15.3 5 17.4 5 21 5 23 8.5 21.6 11.7 19.5 16.4 12 21 12 21z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7.5-4.6-9.6-9.3C1 8.5 3 5 6.6 5c2.1 0 3.6 1.2 4.4 2.5h2C13.8 6.2 15.3 5 17.4 5 21 5 23 8.5 21.6 11.7 19.5 16.4 12 21 12 21z'/%3E%3C/svg%3E") center/contain no-repeat;
}
body.hmd-btn .ast-header-button-1 .ast-custom-button:hover,
body.hmd-btn .ast-header-button-1 .ast-custom-button:focus-visible {
  background: var(--hmd-accent-hover) !important;
  color: var(--hmd-on-accent) !important;
}
body.hmd-btn .ast-header-button-1 .ast-custom-button:focus-visible { outline: 3px solid var(--hmd-ink); outline-offset: 2px; }
body.hmd-btn #ast-mobile-header .ast-header-button-1 .ast-custom-button { padding: 10px 14px !important; font-size: 15px !important; gap: 6px; }
body.hmd-btn #ast-mobile-header .ast-builder-layout-element.ast-header-button-1 { padding: 0 6px 0 0; }
/* Phones: logo + Donate + search + menu must fit in one row (no sideways scroll). */
@media (max-width: 544px) {
  body.hmd-btn #ast-mobile-header .site-header-primary-section-right > .ast-builder-layout-element,
  body.hmd-btn #ast-mobile-header .site-header-primary-section-right > .ast-builder-menu { padding-left: 2px; padding-right: 2px; }
  body.hmd-btn #ast-mobile-header .custom-logo-link img,
  body.hmd-btn #ast-mobile-header .custom-logo { max-width: 140px !important; height: auto; }
  body.hmd-btn #ast-mobile-header .ast-header-button-1 .ast-custom-button { padding: 10px 12px !important; }
}
@media (max-width: 360px) {
  body.hmd-btn #ast-mobile-header .custom-logo-link img,
  body.hmd-btn #ast-mobile-header .custom-logo { max-width: 118px !important; }
  body.hmd-btn #ast-mobile-header .ast-header-button-1 .ast-custom-button::before { display: none; }
}

/* ---------- I4: GiveWP form page (/donations/…) collapsed to 1px ---------- */
body.hmd-formfix.single-give_forms .ast-container > .root-data-givewp-embed {
  width: 100%;
  max-width: 820px;
  margin: 40px auto;
}

/* ---------- Sticky quick-donate bar ---------- */
.hmd-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9990;
  background: var(--hmd-accent);
  border-top: 1px solid var(--hmd-accent-line);
  box-shadow: 0 -2px 10px rgba(0,0,0,.10);
  font-size: 15px;
  color: var(--hmd-ink);
}
.hmd-bar__inner {
  max-width: 1240px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 20px;
}
.hmd-bar__label { font-weight: 700; color: var(--hmd-on-accent); white-space: nowrap; }
.hmd-bar__toggles { display: flex; gap: 8px; }
.hmd-bar__toggles[hidden] { display: none; }
.hmd-bar__amounts { display: flex; gap: 8px; margin-left: auto; }
.hmd-seg { display: inline-flex; border: 1px solid var(--hmd-accent-line); border-radius: 6px; overflow: hidden; }
.hmd-seg button, .hmd-amt {
  font: inherit; cursor: pointer; margin: 0;
  background: #fff; color: var(--hmd-ink);
  border: 0; padding: 9px 12px; line-height: 1;
}
.hmd-seg button + button { border-left: 1px solid var(--hmd-line); }
.hmd-amt { border: 1px solid var(--hmd-accent-line); border-radius: 6px; min-width: 64px; font-weight: 600; }
.hmd-seg button[aria-pressed="true"], .hmd-amt[aria-pressed="true"] {
  background: var(--hmd-green); color: #fff; border-color: var(--hmd-green);
}
.hmd-seg button:hover, .hmd-amt:hover { border-color: var(--hmd-green); }
.hmd-seg button:focus-visible, .hmd-amt:focus-visible, .hmd-bar__go:focus-visible { outline: 3px solid var(--hmd-ink); outline-offset: 2px; }
.hmd-bar__go {
  background: #fff; color: var(--hmd-on-accent) !important;
  border: 2px solid var(--hmd-on-accent);
  font-weight: 700; text-decoration: none !important;
  border-radius: 6px; padding: 9px 18px; line-height: 1; white-space: nowrap;
}
.hmd-bar__go:hover { background: var(--hmd-on-accent); color: #fff !important; }

/* Room for the bar at the end of the page: inside the footer, so its own grey fills it (no white strip). */
html.hmd-has-bar #colophon, html.hmd-has-bar .site-footer { padding-bottom: var(--hmd-bar-h); }
/* Astra's back-to-top button sits above the bar instead of under it. */
html.hmd-has-bar #ast-scroll-top { bottom: calc(var(--hmd-bar-h) + 14px) !important; }

@media (max-width: 921px) {
  .hmd-bar__inner { padding: 8px 12px; gap: 8px; flex-wrap: wrap; }
  .hmd-bar__label { display: none; }
  .hmd-bar__toggles { order: 0; width: 100%; justify-content: center; }
  .hmd-bar__amounts { margin-left: 0; flex: 1; gap: 6px; }
  .hmd-amt { min-width: 0; flex: 1; padding: 11px 4px; }
  .hmd-amt:nth-child(n+4) { display: none; }
  .hmd-bar__go { padding: 10px 12px; }
}

/* ---------- Donate page: monthly / US dollar panel and statement ---------- */
.hmd-alt {
  max-width: 820px; margin: 32px auto 0; padding: 24px;
  border: 1px solid var(--hmd-line); border-radius: 10px; background: #fff;
}
.hmd-alt h2 { font-size: 22px; margin: 0 0 6px; }
.hmd-alt h3 { font-size: 16px; margin: 18px 0 8px; }
.hmd-alt__btns { display: flex; flex-wrap: wrap; gap: 8px; }
.hmd-alt__btn {
  display: inline-block; padding: 10px 16px; border-radius: 6px;
  border: 1px solid var(--hmd-green); color: var(--hmd-green) !important;
  font-weight: 600; text-decoration: none !important;
}
.hmd-alt__btn:hover { background: var(--hmd-green); color: #fff !important; }
.hmd-alt__statement, .hmd-statement { font-size: 14px; color: #4a4f4a; margin-top: 18px; }

/* Hide the bar while a mobile menu / Astra popup is open. */
body[class*="-mobile-open"] .hmd-bar,
html[class*="off-canvas-open"] .hmd-bar,
body.ast-main-header-nav-open .hmd-bar,
body.ast-popup-nav-open .hmd-bar { display: none; }
