/* ============================================================================
   Donor-branding footer (SIMP admin) — the SINGLE site footer.

   Self-contained, app-level stylesheet. Deliberately NOT reusing the
   `.app-footer` class (owned by SIMP.UI/kendo-theme-bridge.css). Normal
   document flow only — no position:fixed — so it never overlays page
   content or Kendo grids; it always sits BELOW the scrollable main.
   Class prefix `simp-brand-footer-*` avoids collisions with any other CSS.

   Layout structure:
     <footer.simp-brand-footer>
       <div.simp-brand-footer__inner>   logos | divider | disclaimer
       <div.simp-brand-footer__meta>    status · quick-search · version
   The optional meta row replaces the old, separate slim
   `<footer class="app-footer">`; folding it in here removes the
   double-stacked-footer look (one band, one internal separator).
   ========================================================================== */

.simp-brand-footer {
    /* normal flow, full width, sits at the bottom of the page after <main> */
    box-sizing: border-box;
    width: 100%;
    margin: 0;
    /* More breathing room: branding block sits slightly lower and the
       footer frees extra vertical space (the slim meta line was removed). */
    padding: 34px clamp(18px, 4vw, 44px) 30px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    color: #5b6675;
    /* keep it visually distinct from the app content above it */
    box-shadow: 0 -1px 0 rgba(15, 47, 92, 0.02);
}

.simp-brand-footer * {
    box-sizing: border-box;
}

.simp-brand-footer__inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: clamp(22px, 3.8vw, 54px);
}

/* Logos grouped on the left, disclaimer text fills the remaining space. */
.simp-brand-footer__logos {
    display: flex;
    align-items: center;
    gap: clamp(26px, 3vw, 34px);
    flex: 0 0 auto;
}

/* ----------------------------------------------------------------------------
   BUG-1 HARDENING. The legacy Midone/preflight bundle (`dist/css/app.css`,
   loaded in <head> on the authenticated admin layout) ships:

       img, video { max-width: 100%; height: auto; }

   On the admin AUTHENTICATED layout that bundle is present (it is NOT on the
   standalone login page nor on most Portal pages), and depending on
   stylesheet load order / browser cache state its `height: auto` can win the
   cascade over a plain `.simp-brand-footer__logo--eu { height: 56px }`,
   collapsing the intrinsic-ratio images to ~0 height — the footer then shows
   "text only", exactly the reported symptom. Pinning the height with an
   explicit, higher-specificity rule + `!important` (and neutralising
   `max-width`) makes the logo dimensions unconditional, so they render at a
   consistent height on every page regardless of what else is loaded.
   -------------------------------------------------------------------------- */
.simp-brand-footer .simp-brand-footer__logos img {
    display: block;
    width: auto !important;
    max-width: none !important;
    object-fit: contain;
    flex: 0 0 auto;
    /* consistent optical height across both lockups */
}

.simp-brand-footer .simp-brand-footer__logos img.simp-brand-footer__logo--eu {
    height: 82px !important;
    min-height: 82px;
}

.simp-brand-footer .simp-brand-footer__logos img.simp-brand-footer__logo--gdc {
    height: 66px !important;
    min-height: 66px;
}

.simp-brand-footer__divider {
    align-self: stretch;
    width: 1px;
    background: #e2e8f0;
    flex: 0 0 auto;
}

.simp-brand-footer__text {
    margin: 0;
    max-width: 780px;
    font-size: 10px;
    line-height: 1.45;
    color: #5b6675;
    font-weight: 400;
    /* keep umlauts crisp */
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Two-sentence layout: one line per sentence, tight gap between. */
.simp-brand-footer__line {
    margin: 0;
}

.simp-brand-footer__line + .simp-brand-footer__line {
    margin-top: 6px;
}

/* Only the donor/programme names are emphasised. Explicit weight + a
   slightly darker ink so 10px bold actually reads against the muted body
   colour, and so the legacy Midone preflight can't flatten <strong>. */
.simp-brand-footer__text strong {
    font-weight: 700;
    color: #3a4658;
}

/* ----------------------------------------------------------------------------
   Thin meta row — folded-in replacement for the old slim .app-footer.
   A subtle hairline separates it from the branding row above so the whole
   thing reads as ONE footer unit, not two stacked bars.
   -------------------------------------------------------------------------- */
.simp-brand-footer__meta {
    max-width: 1280px;
    margin: 14px auto 0;
    padding-top: 12px;
    border-top: 1px solid #eef1f5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-size: 11px;
    line-height: 1.4;
    color: #8793a7;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.simp-brand-footer__status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.simp-brand-footer__dot {
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    background: #1f9d57;
    box-shadow: 0 0 0 3px rgba(31, 157, 87, 0.16);
    flex: 0 0 auto;
}

.simp-brand-footer__hint {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.simp-brand-footer__kbd {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: 11px;
    line-height: 1;
    padding: 3px 6px;
    border: 1px solid #d8dee8;
    border-bottom-width: 2px;
    border-radius: 6px;
    background: #f7f9fc;
    color: #5b6675;
}

.simp-brand-footer__ver {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    flex: 0 0 auto;
    text-align: right;
}

.simp-brand-footer__ver-name {
    font-weight: 600;
    color: #5b6675;
}

.simp-brand-footer__ver-org {
    opacity: 0.7;
}

/* Tablet / narrow desktop — let the text wrap under the logos. */
@media (max-width: 900px) {
    .simp-brand-footer__inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .simp-brand-footer__divider {
        display: none;
    }
}

/* Phone — stack the two logos, keep everything readable at ~420px. */
@media (max-width: 520px) {
    .simp-brand-footer {
        padding: 18px 16px 16px;
    }

    .simp-brand-footer__logos {
        flex-wrap: wrap;
        gap: 16px 20px;
    }

    .simp-brand-footer .simp-brand-footer__logos img.simp-brand-footer__logo--eu {
        height: 64px !important;
        min-height: 64px;
    }

    .simp-brand-footer .simp-brand-footer__logos img.simp-brand-footer__logo--gdc {
        height: 52px !important;
        min-height: 52px;
    }

    .simp-brand-footer__text {
        font-size: 9.75px;
        line-height: 1.45;
    }

    /* Meta row stacks so it never overflows the narrow viewport. */
    .simp-brand-footer__meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .simp-brand-footer__ver {
        text-align: left;
    }
}
