/* ───────────────────────────────────────────────
   Banner Manager – Frontend Styles
──────────────────────────────────────────────── */

/* ── Base ─────────────────────────────────────── */
.bm-banner { box-sizing: border-box; }
.bm-banner img { max-width: 100%; height: auto; display: block; }
.bm-inner { position: relative; }

/* ── Header banner ────────────────────────────── */
.bm-header-banner {
    width: 100%;
    text-align: center;
    background: #f5f5f5;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}
.bm-header-banner .bm-inner { display: inline-block; }

/* ── Footer banner ────────────────────────────── */
.bm-footer-banner {
    width: 100%;
    text-align: center;
    background: #f5f5f5;
    padding: 10px 0;
    border-top: 1px solid #e0e0e0;
}
.bm-footer-banner .bm-inner { display: inline-block; }

/* ── Inline banner ────────────────────────────── */
.bm-inline-banner {
    margin: 24px 0;
    text-align: center;
}

/* ── Sidebar / widget ─────────────────────────── */
.bm-widget-banner { text-align: center; }

/* ── Shortcode ────────────────────────────────── */
.bm-shortcode-banner { text-align: center; margin: 16px 0; }

/* ── Text content ─────────────────────────────── */
.bm-text-content,
a.bm-text-link {
    display: block;
    padding: 16px 24px;
    border-radius: 6px;
    text-align: center;
    font-weight: 600;
    font-size: 1.1em;
    text-decoration: none;
    transition: opacity .2s;
}
a.bm-text-link:hover { opacity: .85; }

/* ── Popup / overlay ──────────────────────────── */
.bm-popup-banner {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bm-popup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    backdrop-filter: blur(2px);
    cursor: pointer;
}

.bm-popup-inner {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    max-width: 560px;
    width: calc(100% - 40px);
    box-shadow: 0 24px 60px rgba(0,0,0,.3);
    animation: bmPopIn .25s cubic-bezier(.34,1.56,.64,1) both;
    text-align: center;
}

@keyframes bmPopIn {
    from { transform: scale(.85); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

/* ── Non-popup triggered banners (delay/scroll/exit/first_visit)
       when position ≠ popup — shown as floating bottom bar ────── */
.bm-banner:not(.bm-popup-banner).bm-mode-delay,
.bm-banner:not(.bm-popup-banner).bm-mode-scroll,
.bm-banner:not(.bm-popup-banner).bm-mode-exit_intent,
.bm-banner:not(.bm-popup-banner).bm-mode-first_visit {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: #fff;
    border-top: 2px solid #2271b1;
    box-shadow: 0 -4px 20px rgba(0,0,0,.15);
    padding: 12px 20px;
    text-align: center;
}

/* ── Close button ─────────────────────────────── */
.bm-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #666;
    padding: 4px 6px;
    border-radius: 4px;
    transition: background .15s, color .15s;
    z-index: 2;
}
.bm-close:hover { background: #f0f0f0; color: #111; }

/* ── Responsive ───────────────────────────────── */
@media (max-width: 600px) {
    .bm-popup-inner { padding: 20px 16px; }
}
