:root { --mhlb-bar-h: 0px; }

/* ---------- bottom announcement bar ---------- */
.mhlb-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 9990;
    display: flex; align-items: center; justify-content: center; gap: 16px;
    padding: 12px 56px 12px 20px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    background: #0B0322; color: #fff;
    font: 500 15px/22px Manrope, sans-serif;
    box-shadow: 0 -6px 24px rgba(11, 3, 34, .18);
}
.mhlb-bar[hidden] { display: none; }
.mhlb-bar__msg { margin: 0; color: #fff; }
.mhlb-bar__msg strong { color: #fff; }
.mhlb-bar__btn {
    flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 40px;
    padding: 9px 20px; border-radius: 40px;
    background: linear-gradient(90deg, #C115EC, #000DFF);
    color: #fff !important; font: 600 14px/1 Manrope, sans-serif; text-decoration: none; white-space: nowrap;
}
.mhlb-bar__btn:hover { filter: brightness(1.1); }
.mhlb-bar__close {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    width: 40px; height: 40px; border: 0; border-radius: 50%;
    background: transparent; color: #B9B3D8; font-size: 26px; line-height: 1; cursor: pointer;
}
.mhlb-bar__close:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.mhlb-bar a:focus-visible, .mhlb-bar button:focus-visible, .mhlb-cta:focus-visible { outline: 3px solid #C115EC; outline-offset: 2px; }

/* keep page-bottom content (footer, back-to-top) clear of the bar */
body.mhlb-bar-open { padding-bottom: var(--mhlb-bar-h); }

/* ---------- sticky phone CTA ---------- */
.mhlb-cta { display: none; }
@media (max-width: 767px) {
    .mhlb-bar { flex-direction: column; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 20px; padding-right: 48px; }
    .mhlb-bar__close { top: 8px; transform: none; }
    .mhlb-cta {
        display: inline-flex; align-items: center; min-height: 48px;
        position: fixed; z-index: 9991; left: 16px;
        bottom: calc(16px + var(--mhlb-bar-h, 0px) + env(safe-area-inset-bottom, 0px));
        padding: 12px 22px; border-radius: 40px;
        background: linear-gradient(90deg, #C115EC, #000DFF);
        color: #fff !important; font: 700 15px/1 Outfit, sans-serif; text-decoration: none;
        box-shadow: 0 8px 24px rgba(0, 13, 255, .28);
        opacity: 0; transform: translateY(12px); pointer-events: none;
        transition: opacity .25s ease, transform .25s ease;
    }
    .mhlb-cta[hidden] { display: none; }
    .mhlb-cta.is-visible { opacity: 1; transform: none; pointer-events: auto; }
}
@media (prefers-reduced-motion: reduce) {
    .mhlb-cta { transition: none; }
}
@media print { .mhlb-bar, .mhlb-cta { display: none !important; } }

/* The Explab child theme applies a !important "rise + tilt" transform to every button:hover,
   which would knock the close button off its centering. Keep ours put. */
.mhlb-bar .mhlb-bar__close,
.mhlb-bar .mhlb-bar__close:hover,
.mhlb-bar .mhlb-bar__close:focus,
.mhlb-bar .mhlb-bar__close:active { transform: translateY(-50%) !important; box-shadow: none !important; }
@media (max-width: 767px) {
    .mhlb-bar .mhlb-bar__close,
    .mhlb-bar .mhlb-bar__close:hover,
    .mhlb-bar .mhlb-bar__close:focus,
    .mhlb-bar .mhlb-bar__close:active { transform: none !important; }
}
