/* Scope all overrides to the existing supplier invitation component. */
.egp-wrap .egp-hero h1,
.egp-wrap .egp-hero .egp-invite-card h2,
.egp-wrap .egp-dark h2,
.egp-wrap .egp-dark h3,
.egp-wrap .egp-cta h2 {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    opacity: 1 !important;
    visibility: visible !important;
    text-shadow: none !important;
}
.egp-wrap .egp-hero .egp-lead,
.egp-wrap .egp-hero .egp-invite-card p,
.egp-wrap .egp-hero .egp-invite-card p strong,
.egp-wrap .egp-dark p,
.egp-wrap .egp-cta p {
    color: #edf5f1 !important;
    -webkit-text-fill-color: #edf5f1 !important;
    opacity: 1 !important;
    visibility: visible !important;
}
.egp-wrap .egp-hero .egp-kicker,
.egp-wrap .egp-hero .egp-invite-card > span,
.egp-wrap .egp-hero .egp-mini b {
    color: #ddbc7c !important;
    -webkit-text-fill-color: #ddbc7c !important;
    opacity: 1 !important;
}
.egp-wrap .egp-hero .egp-mini span { color: #fff !important; -webkit-text-fill-color: #fff !important; }
.egp-wrap .egp-hero .egp-btn-ghost {color: #fff !important; -webkit-text-fill-color: #fff !important;}
/* The existing brand lockup is dark green and disappears against the hero. */
.egp-wrap .egp-hero .egp-logo {
    background: #f5f1e8 !important;
    padding: 12px 16px !important;
    border-radius: 12px !important;
    max-width: min(280px, 100%) !important;
    max-height: none !important;
    height: auto !important;
    opacity: 1 !important;
    filter: none !important;
}
@media (max-width: 620px) {
    .egp-wrap .egp-hero h1 {font-size: clamp(32px, 9vw, 42px) !important; line-height: 1.12 !important;}
    .egp-wrap .egp-hero .egp-lead {font-size: 17px !important; line-height: 1.55 !important;}
}


/* ==========================================================
   INVITATION PAGE ONLY — v1.1.0 layout refinements.
   The invitation's own language links retain ?ref= and
   ?eom_lang=; hide only the separate site-wide switcher.
   ========================================================== */
body.egil-invite-page {
    overflow-x: clip;
}
body.egil-invite-page .egir-language-bar {
    display: none !important;
}

/* The personalised invitation has its own H1; omit the
   duplicated generic page heading above it. */
body.egil-invite-page .wp-block-post-title,
body.egil-invite-page h1.entry-title,
body.egil-invite-page .page-header > .page-title {
    display: none !important;
}
body.egil-invite-page .wp-block-post-content,
body.egil-invite-page .entry-content {
    margin-block-start: 0 !important;
    padding-block-start: 0 !important;
}

/* Header: retain branding and List Your Business, but don't
   expose the wide desktop navigation on a small screen. */
@media (max-width: 900px) {
    body.egil-invite-page .etd-global-header-wrap {
        width: min(100% - 24px, 100%) !important;
    }
    body.egil-invite-page .etd-global-brand-nav {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        gap: 12px !important;
        align-items: center !important;
        padding: 12px 14px !important;
        margin: 10px 0 18px !important;
        border-radius: 18px !important;
        min-width: 0 !important;
    }
    body.egil-invite-page .etd-global-brand-nav .etd-brand-nav-links {
        display: none !important;
    }
    body.egil-invite-page .etd-global-brand-nav .etd-brand-nav-logo {
        min-width: 0 !important;
    }
    body.egil-invite-page .etd-global-brand-nav .etd-brand-nav-logo img {
        display: block !important;
        width: min(100%, 205px) !important;
        max-width: 205px !important;
        height: auto !important;
        max-height: 58px !important;
        object-fit: contain !important;
        object-position: left center !important;
    }
    body.egil-invite-page .etd-global-brand-nav .etd-nav-cta {
        white-space: normal !important;
        max-width: 145px !important;
        min-height: 42px !important;
        padding: 10px 12px !important;
        text-align: center !important;
        line-height: 1.2 !important;
        font-size: 13px !important;
    }
}

/* Calm the invitation's top region without touching actions. */
body.egil-invite-page .egp-wrap {
    max-width: 100vw;
    overflow-wrap: break-word;
}
body.egil-invite-page .egp-wrap .egp-hero {
    padding: clamp(28px, 5vw, 62px) 0 clamp(36px, 5vw, 64px);
}
body.egil-invite-page .egp-wrap .egp-hero-grid {
    gap: clamp(18px, 4vw, 42px);
}
body.egil-invite-page .egp-wrap .egp-hero h1 {
    text-wrap: balance;
    overflow-wrap: break-word;
    hyphens: auto;
}
body.egil-invite-page .egp-wrap .egp-hero .egp-logo {
    max-width: min(235px, 100%) !important;
    margin-bottom: 24px !important;
    padding: 10px 14px !important;
    border-radius: 13px !important;
    box-shadow: 0 8px 26px rgba(0, 0, 0, .10);
}
body.egil-invite-page .egp-wrap .egp-hero .egp-lead {
    margin-bottom: 0;
}
body.egil-invite-page .egp-wrap .egp-invite-card {
    min-width: 0;
}
body.egil-invite-page .egp-wrap .egp-invite-card h2 {
    overflow-wrap: anywhere;
}

/* Compact, accessible and fully visible invitation-language pills. */
body.egil-invite-page .egp-wrap .egp-language-switcher {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 10px 0 12px !important;
    max-width: 100%;
}
body.egil-invite-page .egp-wrap .egp-language-switcher a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 44px;
    min-height: 35px;
    padding: 6px 9px !important;
    font-size: 11px !important;
    line-height: 1.1 !important;
    white-space: nowrap;
    text-decoration: none !important;
}
body.egil-invite-page .egp-wrap .egp-language-switcher a:focus-visible {
    outline: 3px solid #b38c3f !important;
    outline-offset: 2px !important;
}
body.egil-invite-page .egp-wrap .egp-section,
body.egil-invite-page .egp-wrap .egp-cta {
    overflow-wrap: break-word;
}

@media (max-width: 620px) {
    body.egil-invite-page .egp-wrap .egp-shell {
        width: calc(100% - 32px) !important;
    }
    body.egil-invite-page .egp-wrap .egp-hero {
        padding: 32px 0 40px !important;
    }
    body.egil-invite-page .egp-wrap .egp-hero h1 {
        font-size: clamp(30px, 8.25vw, 39px) !important;
        line-height: 1.09 !important;
        letter-spacing: -.03em !important;
        margin-bottom: 15px !important;
    }
    body.egil-invite-page .egp-wrap .egp-kicker {
        letter-spacing: 1.7px !important;
        font-size: 11px !important;
    }
    body.egil-invite-page .egp-wrap .egp-hero .egp-lead {
        font-size: 16px !important;
        line-height: 1.56 !important;
    }
    body.egil-invite-page .egp-wrap .egp-hero .egp-logo {
        max-width: min(216px, 100%) !important;
        margin-bottom: 22px !important;
    }
    body.egil-invite-page .egp-wrap .egp-invite-card {
        padding: 20px !important;
    }
    body.egil-invite-page .egp-wrap .egp-invite-card h2 {
        font-size: 24px !important;
        line-height: 1.18 !important;
    }
    body.egil-invite-page .egp-wrap .egp-section {
        padding: 42px 0 !important;
    }
    body.egil-invite-page .egp-wrap .egp-section h2,
    body.egil-invite-page .egp-wrap .egp-cta h2 {
        font-size: clamp(29px, 8vw, 38px) !important;
        line-height: 1.12 !important;
        overflow-wrap: anywhere;
    }
    body.egil-invite-page .egp-wrap .egp-cta {
        padding: 50px 0 76px !important;
    }
    body.egil-invite-page .egp-wrap .egp-btn {
        min-height: 45px;
        align-content: center;
    }
    body.egil-invite-page .egp-wrap .egp-language-switcher a {
        min-height: 34px;
        padding: 6px 8px !important;
    }

    /* Minimise the visual obstruction of opt-in utility bubbles.
       Detection is limited to actual fixed-position utility controls. */
    body.egil-invite-page .egil-cookie-floater {
        left: 8px !important;
        right: auto !important;
        bottom: calc(78px + env(safe-area-inset-bottom, 0px)) !important;
        max-width: 136px !important;
        transform: none !important;
        opacity: .90;
    }
    body.egil-invite-page .egil-cookie-floater button,
    body.egil-invite-page button.egil-cookie-floater,
    body.egil-invite-page .egil-cookie-floater a,
    body.egil-invite-page a.egil-cookie-floater {
        font-size: 11px !important;
        line-height: 1.2 !important;
        min-height: 34px !important;
        padding: 6px 9px !important;
    }
    body.egil-invite-page .egil-help-floater {
        right: 8px !important;
        left: auto !important;
        bottom: calc(78px + env(safe-area-inset-bottom, 0px)) !important;
        max-width: 49px !important;
        max-height: 49px !important;
        transform: none !important;
        opacity: .92;
    }
    body.egil-invite-page .egil-help-floater button,
    body.egil-invite-page button.egil-help-floater,
    body.egil-invite-page .egil-help-floater a,
    body.egil-invite-page a.egil-help-floater {
        max-width: 49px !important;
        max-height: 49px !important;
        min-width: 44px !important;
        min-height: 44px !important;
    }
}
@media (max-width: 360px) {
    body.egil-invite-page .etd-global-brand-nav .etd-brand-nav-logo img {
        max-width: 160px !important;
    }
    body.egil-invite-page .etd-global-brand-nav .etd-nav-cta {
        font-size: 11px !important;
        max-width: 128px !important;
        padding-inline: 9px !important;
    }
}
