/*
 * Global footer + sticky-actions rail — ported unchanged from
 * site.legacy.css, reassembled in original cascade order (base footer,
 * then the "vertical quick giving" pass, then the "premium footer"
 * redesign pass, then later refinement/responsive layers) so computed
 * styles match the approved static build exactly. Loaded globally since
 * footer.php renders on every template.
 */

/* --- Base footer (first pass) --- */
.site-footer { padding: 76px 0 28px; background: #061526; color: rgba(255,255,255,.7); }
.footer-brand img { width: 310px; margin-bottom: 25px; }
.footer-brand p { max-width: 430px; font-family: var(--serif); font-size: 1.15rem; line-height: 1.55; }
.site-footer h2 { margin-bottom: 19px; color: var(--white); font-family: var(--sans); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; }
.site-footer a { display: block; width: fit-content; margin: 8px 0; text-decoration: none; transition: color .2s; }
.site-footer a:hover { color: var(--white); }
.site-footer address { font-style: normal; }
.footer-phone { color: #9bcab7; font-weight: 800; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-top: 58px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.1); font-size: .8rem; }
.footer-bottom div { display: flex; gap: 22px; }
.footer-credit { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.55); }
.footer-credit .footer-credit-badge { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; width: fit-content; margin: 0; padding: 6px 14px 6px 6px; border-radius: 999px; background: rgba(255,255,255,.08); text-decoration: none; transition: background .2s; }
.footer-credit-badge:hover { background: rgba(255,255,255,.16); }
.footer-credit-badge img { flex-shrink: 0; width: 20px; height: 20px; border-radius: 50%; object-fit: cover; }
.footer-credit-badge span { color: #e9a93b; font-weight: 800; }

/* --- Vertical quick-giving rail + social controls (desktop default) --- */
.sticky-donate {
    top: 50%;
    padding: 17px 12px;
    border-radius: 0 18px 18px 0;
    background: linear-gradient(180deg,#a83b35,#ca574e);
    writing-mode: vertical-rl;
    transform: translateY(-50%) rotate(180deg);
}
.sticky-donate:hover { padding: 22px 12px 17px; box-shadow: 0 18px 42px rgba(168,59,53,.34); }
.sticky-donate .icon { transform: rotate(180deg); }
.sticky-connect { background: linear-gradient(165deg,#174e43,#5f9b85); border: 1px solid rgba(255,255,255,.18); }
.sticky-connect a { color: white; }
.sticky-connect a:hover { background: rgba(255,255,255,.94); color: var(--forest); }

/* --- Premium footer redesign (final cascade) --- */
.sticky-actions { position: fixed; z-index: 90; inset: 50% 0 auto; pointer-events: none; }
.sticky-donate, .sticky-connect { position: absolute; pointer-events: auto; box-shadow: var(--shadow-lg); }
.sticky-donate { left: 0; display: flex; align-items: center; gap: 9px; padding: 13px 17px 13px 13px; border-radius: 0 999px 999px 0; background: #a83b35; color: white; font-weight: 900; text-decoration: none; transition: .3s var(--ease); }
.sticky-donate:hover { padding-left: 20px; background: #bf473f; }
.sticky-donate .icon { width: 19px; height: 19px; }
/* One continuous rounded green pill holding all four icons (not
   separate square buttons). */
.sticky-connect { right: 0; display: flex; flex-direction: column; gap: 2px; padding: 6px; border-radius: 20px 0 0 20px; background: linear-gradient(165deg, #174e43, #5f9b85); border: 0; backdrop-filter: none; box-shadow: var(--shadow-lg); }
.sticky-connect a { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 14px; background: transparent; color: white; transition: .25s var(--ease); }
.sticky-connect a:hover { background: white; color: var(--forest); }
.sticky-connect .icon { width: 19px; height: 19px; }

.site-footer { position: relative; overflow: hidden; padding-top: 0; }
.footer-appeal { display: flex; align-items: center; justify-content: space-between; gap: 40px; padding-block: 70px; border-bottom: 1px solid rgba(255,255,255,.12); }
.footer-appeal h2 { max-width: 760px; color: white; }
.footer-appeal .eyebrow { color: #a9d6c4; }
.mega-footer-grid { display: grid; grid-template-columns: 1.5fr .7fr .85fr 1fr 1.25fr; gap: 42px; padding-block: 70px; }
.mega-footer-grid h2 { margin-bottom: 20px; color: white; font-family: var(--sans); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; }
.mega-footer-grid a { display: block; margin-top: 10px; color: rgba(255,255,255,.68); text-decoration: none; transition: color .2s; }
.mega-footer-grid a:hover { color: white; }
.footer-socials { display: flex; gap: 9px; margin-top: 26px; }
.footer-socials a { display: grid; width: 42px; height: 42px; place-items: center; margin: 0; border: 1px solid rgba(255,255,255,.17); border-radius: 50%; background: rgba(255,255,255,.08); color: white; transition: background .2s, transform .2s; }
.footer-socials a:hover { background: white; color: var(--navy); transform: translateY(-2px); }
.footer-socials .icon { width: 18px; height: 18px; }
.footer-map iframe { width: 100%; height: 210px; border: 0; border-radius: 20px; filter: saturate(.4) contrast(1.05); }

/* --- Contact information column (icon + address/phone/email rows) --- */
.footer-contact-row { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 18px; }
.footer-contact-row .icon { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 2px; color: #9bcab7; }
.footer-contact-row address, .footer-contact-row a { margin: 0; }

/* --- Newsletter signup panel (replaces the map in the last footer column) --- */
.newsletter-form { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 18px; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; background: rgba(255,255,255,.05); }
.newsletter-form input { flex: 1; min-width: 0; padding: 8px 0; border: 0; background: transparent; color: white; font-size: .88rem; }
.newsletter-form input::placeholder { color: rgba(255,255,255,.55); }
.newsletter-form input:focus { outline: 0; }
.newsletter-form button { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: white; cursor: pointer; transition: background .2s; }
.newsletter-form button:hover { background: rgba(255,255,255,.28); }
.newsletter-form button .icon { width: 16px; height: 16px; }
.newsletter-lead { margin: 16px 0 0; color: rgba(255,255,255,.72); font-size: .92rem; }
.newsletter-lead[data-status="success"] { color: #a9d6c4; font-weight: 700; }
.newsletter-lead[data-status="error"] { color: #e6a6a0; font-weight: 700; }
/* Bot-only honeypot field — a real visitor never sees or tabs into this,
   same technique and markup as the program-enquiry form's own
   .form-honeypot (programs.css), just made global here since this
   newsletter form appears in the sitewide footer, not one page. */
.form-honeypot { position: absolute !important; left: -9999px !important; }

.footer-badges { display: flex; align-items: stretch; gap: 10px; margin-top: 18px; }
/* Placeholder QR pattern, drawn with CSS (not a real scannable code) —
   a plain icon read as "generic graphic" rather than "QR code" at a
   glance; a checkerboard reads unmistakably as a QR placeholder. Swap
   for a real generated code once a target URL is decided. */
.badge-qr {
    width: 74px;
    height: 74px;
    flex: 0 0 auto;
    border: 6px solid white;
    border-radius: 10px;
    background: white;
    object-fit: contain;
    display: block;
}
.badge-pci-image { height: 74px; width: auto; border-radius: 14px; background: white; padding: 8px 14px; }

.footer-payments-image { max-width: 260px; height: auto; margin-top: 16px; }

.footer-tax-id { margin-top: 16px; color: rgba(255,255,255,.55); font-size: .78rem; }
.footer-tax-id strong { color: rgba(255,255,255,.8); }
.footer-signature { width: 100%; margin-bottom: -.08em; color: rgba(255,255,255,.42); font-family: var(--serif); font-size: clamp(4.2rem,13vw,12rem); font-weight: 900; line-height: .75; letter-spacing: -.075em; text-align: center; white-space: nowrap; }

/* Same vertical edge-rail treatment at every screen size, by request —
   rotated "Donate" text on the left edge, stacked circular social icons
   on the right edge, identical on mobile and desktop. Previously this
   switched to a horizontal bottom bar under 600px; that's intentionally
   removed now so mobile matches the desktop design exactly.
   Height is intentionally NOT fixed — each rail sizes to fit its own
   content (the rotated "Donate" text vs. .sticky-connect's 4 stacked
   icons) rather than both being stretched to a shared fixed height.
   translateY(-50%) still centers correctly either way, since it's a
   percentage of the element's own (now auto) height, not a fixed value. */
.sticky-actions { inset: 50% 0 auto; }
.sticky-donate, .sticky-connect { top: 0; transform: translateY(-50%); }
.sticky-donate { justify-content: center; padding: 16px 8px; border-radius: 0 18px 18px 0; writing-mode: vertical-rl; transform: translateY(-50%) rotate(180deg); }
.sticky-donate:hover { padding: 21px 8px 16px; transform: translateY(-50%) rotate(180deg) translateY(3px); }
.sticky-donate .icon { transform: rotate(180deg); }
.sticky-connect { justify-content: center; }

/* --- Later refinement pass: tighter vertical rhythm on shorter pages ---
   Moved above the responsive block below (was originally after it) —
   same selectors, equal specificity, so whichever comes LAST in source
   order wins regardless of the @media condition; left after the mobile
   breakpoint, this was silently overriding the mobile padding-block value
   back to 56px on every screen size, including phones. */
.footer-appeal { padding-block: 56px; }
.mega-footer-grid { padding-block: 56px; }

/* --- Responsive: mega-footer-grid + footer-appeal --- */
@media (max-width: 1120px) {
    .mega-footer-grid { grid-template-columns: 1.35fr repeat(3, 1fr); }
    .footer-map, .footer-newsletter { grid-column: 1/-1; }
}
@media (max-width: 820px) {
    .mega-footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand, .footer-map, .footer-newsletter { grid-column: 1/-1; }
}
@media (max-width: 600px) {
    .footer-appeal { align-items: flex-start; flex-direction: column; padding-block: 18px; gap: 16px; }
    .mega-footer-grid { grid-template-columns: 1fr; padding-block: 18px; gap: 24px; }
    .footer-brand, .footer-map, .footer-newsletter { grid-column: auto; }
    .footer-signature { font-size: 19vw; }
    /* .footer-bottom's base rule (flex, space-between) squeezes the
       copyright paragraph and the "Designed & Managed by" credit onto the
       same cramped row on a phone — stack them instead, credit on its
       own row below. */
    .footer-bottom { flex-direction: column; align-items: center; gap: 14px; text-align: center; }
    .site-footer { padding-bottom: 22px; }
}

/* --- Compact prayer utility and directional edge treatment --- */
.sticky-donate,
.sticky-donate:hover {
    left: 0;
    /* The rail is rotated for bottom-to-top text, so radii are assigned
       to the pre-rotation left side to render on the visual right side. */
    border-radius: 18px 0 0 18px;
}

/* --- Later refinement pass: tighter vertical rhythm on shorter pages --- */
.footer-bottom { margin-top: 24px; }
.footer-signature { margin-bottom: 0; font-size: clamp(2.2rem, 6vw, 5rem); }

.sticky-donate { background-color: #a83b35; }

/* --- Donate drawer (sticky-donate now opens this instead of navigating
   away) — blurred backdrop + a panel sliding in from the left containing
   the real DonateFlow donation panel. Sitewide since the sticky rail
   itself is sitewide (site-footer.php loads on every template). --- */
button.sticky-donate {
    border: 0;
    cursor: pointer;
    font: inherit;
}

.donate-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 998;
    background: rgba(8, 21, 38, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .35s ease, visibility .35s ease;
}
.donate-drawer-backdrop.is-open {
    opacity: 1;
    visibility: visible;
}

.donate-drawer {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 999;
    width: min(440px, 92vw);
    overflow-y: auto;
    padding: 56px 28px 40px;
    background: transparent;
    transform: translateX(-100%);
    transition: transform .4s cubic-bezier(.22, .61, .36, 1);
}
.donate-drawer.is-open {
    transform: translateX(0);
}

.donate-drawer-close {
    position: absolute;
    top: 16px;
    right: 16px;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .14);
    color: white;
    cursor: pointer;
    transition: background .2s;
}
.donate-drawer-close:hover {
    background: rgba(255, 255, 255, .24);
}
.donate-drawer-close .icon {
    width: 18px;
    height: 18px;
}

.donate-drawer-panel .dflow-panel {
    margin: 0;
    max-width: none;
}

/* The plugin's own .dflow-secure-badge defaults to white, correct for
   the homepage/Urgent Help panels (their --dflow-glass-surface is
   overridden to a much more transparent value there, so a dark
   background genuinely shows through). This drawer's panel uses the
   plugin's default, nearly-solid-white glass surface instead, so white
   text on it would be unreadable — scoped back to a dark color here. */
.donate-drawer-panel .dflow-secure-badge {
    color: var(--dflow-ink, #142521);
}

@media (prefers-reduced-motion: reduce) {
    .donate-drawer,
    .donate-drawer-backdrop {
        transition: none;
    }
}

/* --- Mobile only: the vertical social rail is replaced by
   .utility-social in the header's utility bar (see header.css) — site
   owner request to use the utility bar's empty left side instead of a
   rail floating over the hero. The Donate tab (.sticky-donate) is
   unaffected. */
@media (max-width: 820px) {
    .sticky-connect { display: none; }
}
