/* ========================================
   BMP POPUP FRONTEND STYLES — v2
   Premium design with glass morphism,
   smooth animations, and micro-interactions
   ======================================== */

/* ═══════════════════════════════════════
   THEME ISOLATION RESET
   Neutralize ALL inherited theme styles
   so the popup looks the same on every theme
   ═══════════════════════════════════════ */
/* Reset the popup container and structural elements only */
.bmp-popup,
.bmp-popup .bmp-popup-inner,
.bmp-popup .bmp-popup-close {
    box-sizing: border-box;
    text-decoration: none;
    text-transform: none;
    letter-spacing: normal;
    text-shadow: none;
    float: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
/* Reset theme styles on close button specifically */
.bmp-popup .bmp-popup-close,
.bmp-popup .bmp-popup-close:hover,
.bmp-popup .bmp-popup-close:focus,
.bmp-popup .bmp-popup-close:active {
    box-shadow: none;
    outline: none;
}
/* Reset theme button/link styles ONLY on structural elements, NOT on content */
.bmp-popup .bmp-popup-post-btn,
.bmp-popup .bmp-popup-post-btn:hover,
.bmp-popup .bmp-popup-post-btn:focus {
    box-shadow: none;
    outline: none;
    text-decoration: none;
}
/* ── Isolate popup HTML content from theme ──
   Theme sets h1,h2{color:var(--dp-ink)} which overrides inherited colors.
   We use 'unset' (= inherit for color) with higher specificity to beat
   the theme rule, so elements inherit the auto text color set on .bmp-popup-inner
   (white on dark bg, dark on light bg). Inline styles still win. ── */
.bmp-popup .bmp-popup-html h1,
.bmp-popup .bmp-popup-html h2,
.bmp-popup .bmp-popup-html h3,
.bmp-popup .bmp-popup-html h4,
.bmp-popup .bmp-popup-html h5,
.bmp-popup .bmp-popup-html h6,
.bmp-popup .bmp-popup-html p,
.bmp-popup .bmp-popup-html span,
.bmp-popup .bmp-popup-html div,
.bmp-popup .bmp-popup-html li,
.bmp-popup .bmp-popup-html strong,
.bmp-popup .bmp-popup-html em {
    color: unset;
    font-family: unset;
    letter-spacing: unset;
}
.bmp-popup .bmp-popup-html a {
    color: unset;
}

/* Restore essential styles after reset — no forced color, let inline styles win */
.bmp-popup-inner {
    font-size: 16px;
    line-height: 1.5;
    font-weight: 400;
}
.bmp-popup a {
    color: #2563eb;
    cursor: pointer;
}
.bmp-popup a:hover {
    opacity: 0.85;
}
.bmp-popup img {
    max-width: 100%;
    height: auto;
    display: block;
    border: none;
}
.bmp-popup button {
    cursor: pointer;
    font-family: inherit;
}
.bmp-popup h1, .bmp-popup h2, .bmp-popup h3, .bmp-popup h4 {
    font-weight: 700;
    line-height: 1.3;
}
.bmp-popup p {
    margin: 0;
    line-height: 1.6;
}

/* ── Overlay ── */
.bmp-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 99997;
    opacity: 0;
    transition: opacity 350ms ease;
}
.bmp-popup-overlay.is-visible {
    opacity: 1;
}

/* ── Base popup ── */
.bmp-popup {
    position: fixed;
    z-index: 99998;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    -webkit-font-smoothing: antialiased;
}

.bmp-popup-inner {
    position: relative;
    background: #fff;
    overflow: hidden;
}

.bmp-popup-content {
    width: 100%;
}

.bmp-popup-content img {
    display: block;
    max-width: 100%;
    height: auto;
}

.bmp-popup-html {
    padding: 28px 24px;
}

/* ── Close button — glass effect, fully theme-independent ── */
.bmp-popup .bmp-popup-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    text-align: center;
    cursor: pointer;
    transition: all 250ms cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    min-width: 36px;
    min-height: 36px;
    max-width: 36px;
    max-height: 36px;
    text-decoration: none;
    text-transform: none;
    letter-spacing: normal;
    font-family: -apple-system, sans-serif;
    font-weight: 400;
    box-shadow: none;
    outline: none;
}
.bmp-popup .bmp-popup-close svg {
    display: block;
    flex-shrink: 0;
}
.bmp-popup .bmp-popup-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.15) rotate(90deg);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: none;
    outline: none;
    text-decoration: none;
}
.bmp-popup .bmp-popup-close:active {
    transform: scale(0.95);
}
.bmp-popup .bmp-popup-close:focus {
    outline: none;
    box-shadow: none;
}

/* Dark close button for light content */
.bmp-popup .bmp-popup-html ~ .bmp-popup-close,
.bmp-popup .bmp-popup-content:not(:has(img)) ~ .bmp-popup-close {
    background: rgba(0, 0, 0, 0.06);
    color: #374151;
    border-color: rgba(0, 0, 0, 0.08);
    text-shadow: none;
}
.bmp-popup .bmp-popup-html ~ .bmp-popup-close:hover {
    background: rgba(0, 0, 0, 0.12);
    color: #111;
}

/* ═══════════════════════════════════════
   POSITION: CENTER (modal)
   Premium glass morphism design
   ═══════════════════════════════════════ */
.bmp-popup-pos-center {
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.bmp-popup-pos-center.is-visible {
    display: flex;
}
.bmp-popup-pos-center .bmp-popup-inner {
    border-radius: 16px;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.04),
        0 8px 16px rgba(0, 0, 0, 0.08),
        0 24px 64px rgba(0, 0, 0, 0.16);
    max-height: 90vh;
    overflow-y: auto;
    opacity: 0;
    transform: scale(0.92) translateY(20px);
    transition: all 400ms cubic-bezier(0.16, 1, 0.3, 1);
}
.bmp-popup-pos-center.is-visible .bmp-popup-inner {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* Scrollbar styling for modal */
.bmp-popup-pos-center .bmp-popup-inner::-webkit-scrollbar {
    width: 6px;
}
.bmp-popup-pos-center .bmp-popup-inner::-webkit-scrollbar-track {
    background: transparent;
}
.bmp-popup-pos-center .bmp-popup-inner::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 3px;
}

/* Center sizes */
.bmp-popup-size-small .bmp-popup-inner { max-width: 400px; }
.bmp-popup-size-medium .bmp-popup-inner { max-width: 560px; }
.bmp-popup-size-large .bmp-popup-inner { max-width: 720px; }
.bmp-popup-size-fullscreen { padding: 0; }
.bmp-popup-size-fullscreen .bmp-popup-inner {
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
}

/* ═══════════════════════════════════════
   POSITION: RIGHT (slide-in panel)
   ═══════════════════════════════════════ */
.bmp-popup-pos-right {
    top: 0;
    right: 0;
    bottom: 0;
    width: 400px;
    max-width: 100vw;
}
.bmp-popup-pos-right .bmp-popup-inner {
    height: 100%;
    overflow-y: auto;
    box-shadow:
        -1px 0 0 rgba(0, 0, 0, 0.06),
        -8px 0 24px rgba(0, 0, 0, 0.12);
    transform: translateX(100%);
    transition: transform 450ms cubic-bezier(0.16, 1, 0.3, 1);
}
.bmp-popup-pos-right.is-visible .bmp-popup-inner {
    transform: translateX(0);
}

/* ═══════════════════════════════════════
   POSITION: LEFT (slide-in panel)
   ═══════════════════════════════════════ */
.bmp-popup-pos-left {
    top: 0;
    left: 0;
    bottom: 0;
    width: 400px;
    max-width: 100vw;
}
.bmp-popup-pos-left .bmp-popup-inner {
    height: 100%;
    overflow-y: auto;
    box-shadow:
        1px 0 0 rgba(0, 0, 0, 0.06),
        8px 0 24px rgba(0, 0, 0, 0.12);
    transform: translateX(-100%);
    transition: transform 450ms cubic-bezier(0.16, 1, 0.3, 1);
}
.bmp-popup-pos-left.is-visible .bmp-popup-inner {
    transform: translateX(0);
}

/* ═══════════════════════════════════════
   POSITION: BOTTOM (notification bar)
   Modern floating bar with rounded corners
   ═══════════════════════════════════════ */
.bmp-popup-pos-bottom {
    bottom: 16px;
    left: 16px;
    right: 16px;
}
.bmp-popup-pos-bottom .bmp-popup-inner {
    border-radius: 12px;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.04),
        0 4px 12px rgba(0, 0, 0, 0.08),
        0 16px 48px rgba(0, 0, 0, 0.12);
    transform: translateY(calc(100% + 32px));
    transition: transform 500ms cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 640px;
    margin: 0 auto;
}
.bmp-popup-pos-bottom.is-visible .bmp-popup-inner {
    transform: translateY(0);
}
.bmp-popup-pos-bottom .bmp-popup-close {
    top: 50%;
    transform: translateY(-50%);
    right: 14px;
    width: 28px;
    height: 28px;
    font-size: 16px;
    background: rgba(0, 0, 0, 0.06);
    color: #374151;
    border-color: transparent;
}
.bmp-popup-pos-bottom .bmp-popup-close:hover {
    background: rgba(0, 0, 0, 0.12);
    transform: translateY(-50%) scale(1.1);
}
.bmp-popup-pos-bottom .bmp-popup-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 14px 52px 14px 20px;
}
.bmp-popup-pos-bottom .bmp-popup-content img {
    max-height: 64px;
    width: auto;
    border-radius: 8px;
}

/* ═══════════════════════════════════════
   POSITION: TOP (announcement bar)
   Floating bar with accent border
   ═══════════════════════════════════════ */
.bmp-popup-pos-top {
    top: 16px;
    left: 16px;
    right: 16px;
}
.bmp-popup-pos-top .bmp-popup-inner {
    border-radius: 12px;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.04),
        0 4px 12px rgba(0, 0, 0, 0.08),
        0 16px 48px rgba(0, 0, 0, 0.12);
    transform: translateY(calc(-100% - 32px));
    transition: transform 500ms cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 640px;
    margin: 0 auto;
    border-top: 3px solid #ffc45e;
}
.bmp-popup-pos-top.is-visible .bmp-popup-inner {
    transform: translateY(0);
}
.bmp-popup-pos-top .bmp-popup-close {
    top: 50%;
    transform: translateY(-50%);
    right: 14px;
    width: 28px;
    height: 28px;
    font-size: 16px;
    background: rgba(0, 0, 0, 0.06);
    color: #374151;
    border-color: transparent;
}
.bmp-popup-pos-top .bmp-popup-close:hover {
    background: rgba(0, 0, 0, 0.12);
    transform: translateY(-50%) scale(1.1);
}
.bmp-popup-pos-top .bmp-popup-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 14px 52px 14px 20px;
}
.bmp-popup-pos-top .bmp-popup-content img {
    max-height: 64px;
    width: auto;
    border-radius: 8px;
}

/* ═══════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════ */
@media (max-width: 768px) {
    .bmp-popup-pos-right,
    .bmp-popup-pos-left {
        width: 100vw;
    }

    .bmp-popup-pos-center {
        padding: 12px;
    }
    .bmp-popup-size-small .bmp-popup-inner,
    .bmp-popup-size-medium .bmp-popup-inner,
    .bmp-popup-size-large .bmp-popup-inner {
        max-width: 95vw;
    }

    .bmp-popup-pos-bottom,
    .bmp-popup-pos-top {
        left: 8px;
        right: 8px;
    }
    .bmp-popup-pos-bottom { bottom: 8px; }
    .bmp-popup-pos-top { top: 8px; }

    .bmp-popup-pos-bottom .bmp-popup-inner,
    .bmp-popup-pos-top .bmp-popup-inner {
        max-width: none;
    }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .bmp-popup-overlay,
    .bmp-popup-inner,
    .bmp-popup-close {
        transition: none !important;
    }
    .bmp-popup-pos-center .bmp-popup-inner {
        transform: none;
    }
}

/* ── Image styling ── */
.bmp-popup-img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* ── Links ── */
.bmp-popup-content a {
    display: block;
    text-decoration: none;
    transition: opacity 200ms;
}
.bmp-popup-content a:hover {
    opacity: 0.92;
}

/* ── HTML content styling — defaults only, inline styles take priority ── */
.bmp-popup-html h1, .bmp-popup-html h2, .bmp-popup-html h3 {
    margin-top: 0;
}
.bmp-popup-html p {
    line-height: 1.6;
}
.bmp-popup-html a {
    color: #2563eb;
    display: inline;
}

/* ── Entry animation for images ── */
.bmp-popup-pos-center .bmp-popup-img {
    animation: bmpImgReveal 600ms cubic-bezier(0.16, 1, 0.3, 1) 200ms both;
}
@keyframes bmpImgReveal {
    from { opacity: 0; transform: scale(1.02); }
    to { opacity: 1; transform: scale(1); }
}

/* ═══════════════════════════════════════
   POST CARD — Article type popup
   ═══════════════════════════════════════ */
.bmp-popup-post-card {
    overflow: hidden;
}

.bmp-popup-post-thumb {
    position: relative;
    overflow: hidden;
    max-height: 220px;
}
.bmp-popup-post-thumb img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 400ms ease;
}
.bmp-popup-post-card:hover .bmp-popup-post-thumb img {
    transform: scale(1.03);
}

.bmp-popup-post-body {
    padding: 24px 28px 28px;
}

.bmp-popup-post-card .bmp-popup-post-body,
.bmp-popup-post-full .bmp-popup-post-body {
    color: #111827;
}

.bmp-popup-post-title {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.3;
    color: #111827;
    letter-spacing: -0.02em;
}

.bmp-popup-post-excerpt {
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.65;
    color: #6b7280;
}

.bmp-popup .bmp-popup-post-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #111827;
    color: #fff;
    padding: 11px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 200ms cubic-bezier(0.16, 1, 0.3, 1);
    border: none;
    outline: none;
    box-shadow: none;
    text-transform: none;
    letter-spacing: normal;
    line-height: 1.4;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.bmp-popup .bmp-popup-post-btn:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: #fff;
    border: none;
    outline: none;
}
.bmp-popup .bmp-popup-post-btn:focus {
    outline: none;
    box-shadow: none;
}

/* Side panels — post card adjusts */
.bmp-popup-pos-right .bmp-popup-post-thumb,
.bmp-popup-pos-left .bmp-popup-post-thumb {
    max-height: 180px;
}
.bmp-popup-pos-right .bmp-popup-post-body,
.bmp-popup-pos-left .bmp-popup-post-body {
    padding: 20px 24px 24px;
}
.bmp-popup-pos-right .bmp-popup-post-title,
.bmp-popup-pos-left .bmp-popup-post-title {
    font-size: 18px;
}

/* Bottom/Top bars — post card inline */
.bmp-popup-pos-bottom .bmp-popup-post-card,
.bmp-popup-pos-top .bmp-popup-post-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 50px 12px 12px;
}
.bmp-popup-pos-bottom .bmp-popup-post-thumb,
.bmp-popup-pos-top .bmp-popup-post-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    max-height: none;
    border-radius: 8px;
    overflow: hidden;
}
.bmp-popup-pos-bottom .bmp-popup-post-thumb img,
.bmp-popup-pos-top .bmp-popup-post-thumb img {
    width: 80px;
    height: 80px;
    object-fit: cover;
}
.bmp-popup-pos-bottom .bmp-popup-post-body,
.bmp-popup-pos-top .bmp-popup-post-body {
    padding: 0;
    flex: 1;
}
.bmp-popup-pos-bottom .bmp-popup-post-title,
.bmp-popup-pos-top .bmp-popup-post-title {
    font-size: 15px;
    margin-bottom: 4px;
}
.bmp-popup-pos-bottom .bmp-popup-post-excerpt,
.bmp-popup-pos-top .bmp-popup-post-excerpt {
    font-size: 12px;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.bmp-popup-pos-bottom .bmp-popup-post-btn,
.bmp-popup-pos-top .bmp-popup-post-btn {
    padding: 6px 14px;
    font-size: 12px;
}

@media (max-width: 768px) {
    .bmp-popup-post-body { padding: 20px; }
    .bmp-popup-post-title { font-size: 18px; }
    .bmp-popup-pos-bottom .bmp-popup-post-card,
    .bmp-popup-pos-top .bmp-popup-post-card {
        flex-direction: column;
        text-align: center;
    }
    .bmp-popup-pos-bottom .bmp-popup-post-thumb,
    .bmp-popup-pos-top .bmp-popup-post-thumb {
        width: 100%;
        height: 120px;
    }
    .bmp-popup-pos-bottom .bmp-popup-post-thumb img,
    .bmp-popup-pos-top .bmp-popup-post-thumb img {
        width: 100%;
        height: 120px;
    }
}

/* ── Close button style variants ── */

/* Light circle: white bg + dark cross (for dark backgrounds) */
.bmp-popup .bmp-popup-close.bmp-close-light {
    background: rgba(255, 255, 255, 0.9);
    color: #1f2937;
    border-color: rgba(255, 255, 255, 0.95);
    text-shadow: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.bmp-popup .bmp-popup-close.bmp-close-light:hover {
    background: #fff;
    color: #000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Dark circle: dark bg + white cross (for light backgrounds) */
.bmp-popup .bmp-popup-close.bmp-close-dark {
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    border-color: rgba(0, 0, 0, 0.8);
    text-shadow: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.bmp-popup .bmp-popup-close.bmp-close-dark:hover {
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Minimal: no circle, just the × symbol */
.bmp-popup .bmp-popup-close.bmp-close-minimal {
    background: none;
    border: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    color: #6b7280;
    font-size: 24px;
    text-shadow: none;
    box-shadow: none;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    max-width: 32px;
    max-height: 32px;
}
.bmp-popup .bmp-popup-close.bmp-close-minimal:hover {
    color: #111827;
    background: none;
    transform: scale(1.2);
    box-shadow: none;
}

/* Text "Close" style */
.bmp-popup .bmp-popup-close.bmp-close-text {
    width: auto;
    max-width: none;
    min-width: auto;
    height: auto;
    min-height: auto;
    max-height: none;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: #374151;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    text-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    letter-spacing: 0.02em;
}
.bmp-popup .bmp-popup-close.bmp-close-text:hover {
    background: rgba(0, 0, 0, 0.12);
    color: #111;
    transform: none;
    box-shadow: none;
}

/* Outline circle: transparent bg with visible border */
.bmp-popup .bmp-popup-close.bmp-close-outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.6);
    color: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}
.bmp-popup .bmp-popup-close.bmp-close-outline:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: none;
}

/* Custom color — set via inline style, just reset base */
.bmp-popup .bmp-popup-close.bmp-close-custom {
    text-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.bmp-popup .bmp-popup-close.bmp-close-custom:hover {
    filter: brightness(0.85);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ── Full post content mode ── */
.bmp-popup-post-full .bmp-popup-post-body {
    padding: 28px 32px 32px;
}
.bmp-popup-post-full .bmp-popup-post-content {
    font-size: 15px;
    line-height: 1.8;
    color: #374151;
}
.bmp-popup-post-full .bmp-popup-post-content p {
    margin-bottom: 16px;
}
.bmp-popup-post-full .bmp-popup-post-content h2,
.bmp-popup-post-full .bmp-popup-post-content h3 {
    color: #111827;
    margin: 24px 0 12px;
}
.bmp-popup-post-full .bmp-popup-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 16px 0;
}
.bmp-popup-post-full .bmp-popup-post-content a {
    color: #2563eb;
    display: inline;
}
.bmp-popup-post-full .bmp-popup-post-content ul,
.bmp-popup-post-full .bmp-popup-post-content ol {
    padding-left: 24px;
    margin-bottom: 16px;
}
.bmp-popup-post-full .bmp-popup-post-content blockquote {
    border-left: 4px solid #ffc45e;
    padding: 12px 20px;
    margin: 16px 0;
    background: #fffbeb;
    border-radius: 0 8px 8px 0;
}

/* Side panels — full content scrollable */
.bmp-popup-pos-right .bmp-popup-post-full .bmp-popup-post-body,
.bmp-popup-pos-left .bmp-popup-post-full .bmp-popup-post-body {
    padding: 24px;
    overflow-y: auto;
}

/* ═══════════════════════════════════════
   VISUAL TEMPLATES — Base Styles
   8 professional templates with BEM naming
   ═══════════════════════════════════════ */

/* ── Theme isolation for visual templates ── */
.bmp-popup .bmp-visual h1,
.bmp-popup .bmp-visual h2,
.bmp-popup .bmp-visual h3,
.bmp-popup .bmp-visual p,
.bmp-popup .bmp-visual span,
.bmp-popup .bmp-visual div,
.bmp-popup .bmp-visual blockquote,
.bmp-popup .bmp-visual strong,
.bmp-popup .bmp-visual em {
    color: unset;
    font-family: unset;
    letter-spacing: unset;
}

/* ── Shared base ── */
.bmp-visual {
    overflow: hidden;
}

.bmp-visual__media {
    position: relative;
    overflow: hidden;
    max-height: 240px;
}

.bmp-visual__img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 400ms ease;
}
.bmp-visual:hover .bmp-visual__img {
    transform: scale(1.03);
}

.bmp-visual__content {
    padding: 24px 28px 28px;
}

.bmp-visual__heading {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.bmp-visual__body {
    margin: 0 0 20px;
    font-size: 15px;
    line-height: 1.65;
    opacity: 0.75;
}
.bmp-visual__body p {
    margin: 0 0 8px;
}
.bmp-visual__body p:last-child {
    margin-bottom: 0;
}

.bmp-popup .bmp-visual__cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #111827;
    color: #fff;
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 200ms cubic-bezier(0.16, 1, 0.3, 1);
    border: none;
    outline: none;
    box-shadow: none;
    cursor: pointer;
    line-height: 1.4;
}
.bmp-popup .bmp-visual__cta:hover {
    filter: brightness(1.15);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-decoration: none;
    color: #fff;
}

/* Animated CTA — subtle pulse glow */
.bmp-popup .bmp-visual__cta.bmp-cta-animated,
.bmp-popup .bmp-popup-post-btn.bmp-cta-animated {
    animation: bmpCtaPulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
.bmp-popup .bmp-visual__cta.bmp-cta-animated:hover,
.bmp-popup .bmp-popup-post-btn.bmp-cta-animated:hover {
    animation: none;
}
@keyframes bmpCtaPulse {
    0%, 100% {
        filter: brightness(1);
        box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.15);
    }
    50% {
        filter: brightness(1.12);
        box-shadow: 0 0 20px 4px rgba(0, 0, 0, 0.12);
    }
}

/* ── SVG icons shared ── */
.bmp-visual__icon svg,
.bmp-visual__quote-icon {
    display: block;
    margin: 0 auto 16px;
}

/* ═══════════════════════════════════════
   TEMPLATE: Flash Sale
   Hero image + urgency badge + CTA
   ═══════════════════════════════════════ */
.bmp-visual--flash-sale .bmp-visual__badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: #ef4444;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    animation: bmpBadgePulse 2s ease-in-out infinite;
}
@keyframes bmpBadgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ═══════════════════════════════════════
   TEMPLATE: Lead Magnet
   Two-column: image left 40% + content right 60%
   ═══════════════════════════════════════ */
.bmp-visual--lead-magnet {
    display: flex;
    align-items: stretch;
}
.bmp-visual--lead-magnet .bmp-visual__media {
    flex: 0 0 40%;
    max-height: none;
}
.bmp-visual--lead-magnet .bmp-visual__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.bmp-visual--lead-magnet .bmp-visual__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 28px 32px;
}

/* ═══════════════════════════════════════
   TEMPLATE: Newsletter
   Centered icon + text + CTA
   ═══════════════════════════════════════ */
.bmp-visual--newsletter {
    text-align: center;
}
.bmp-visual--newsletter .bmp-visual__icon {
    padding: 28px 28px 0;
}
.bmp-visual--newsletter .bmp-visual__icon svg {
    width: 48px;
    height: 48px;
    color: #6366f1;
}
.bmp-visual--newsletter .bmp-visual__content {
    padding: 16px 32px 32px;
}

/* ═══════════════════════════════════════
   TEMPLATE: Video Spotlight
   16:9 responsive iframe + content
   ═══════════════════════════════════════ */
.bmp-visual__video-wrap {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    max-height: none;
}
.bmp-visual__iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ═══════════════════════════════════════
   TEMPLATE: Coupon Code
   Dashed coupon box + copy button
   ═══════════════════════════════════════ */
.bmp-visual--coupon {
    text-align: center;
}
.bmp-visual--coupon .bmp-visual__content {
    padding: 32px;
}
.bmp-visual__coupon-box {
    display: inline-flex;
    align-items: center;
    gap: 0;
    margin: 0 0 24px;
    border: 2px dashed #d1d5db;
    border-radius: 10px;
    overflow: hidden;
    background: #f9fafb;
}
.bmp-visual__coupon-code {
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.12em;
    padding: 12px 20px;
    color: #111827;
    user-select: all;
}
.bmp-visual__coupon-copy {
    padding: 12px 18px;
    background: #111827;
    color: #fff;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 200ms;
    font-family: inherit;
}
.bmp-visual__coupon-copy:hover {
    background: #374151;
}
.bmp-visual__coupon-copy.is-copied {
    background: #059669;
}

/* ═══════════════════════════════════════
   TEMPLATE: Announcement
   Clean typography, no image
   ═══════════════════════════════════════ */
.bmp-visual--announcement {
    text-align: center;
}
.bmp-visual--announcement .bmp-visual__content {
    padding: 40px 36px;
}
.bmp-visual--announcement .bmp-visual__heading {
    font-size: 28px;
    margin-bottom: 14px;
}
.bmp-visual--announcement .bmp-visual__body {
    font-size: 16px;
    max-width: 480px;
    margin: 0 auto 24px;
}

/* ═══════════════════════════════════════
   TEMPLATE: Product Showcase
   Image + price badge + CTA
   ═══════════════════════════════════════ */
.bmp-visual--product .bmp-visual__price {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: #111827;
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    padding: 6px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ═══════════════════════════════════════
   TEMPLATE: Testimonial
   Quote + avatar + author
   ═══════════════════════════════════════ */
.bmp-visual--testimonial .bmp-visual__content {
    padding: 32px 36px;
    text-align: center;
}
.bmp-visual__quote {
    margin: 0 0 20px;
    padding: 0;
    border: none;
    background: none;
}
.bmp-visual__quote-icon {
    width: 36px;
    height: 36px;
    opacity: 0.15;
}
.bmp-visual--testimonial .bmp-visual__body {
    font-size: 17px;
    font-style: italic;
    line-height: 1.7;
    opacity: 0.85;
    max-width: 500px;
    margin: 0 auto 24px;
}
.bmp-visual__author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}
.bmp-visual__avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.bmp-visual__author-info {
    text-align: left;
}
.bmp-visual__author-name {
    display: block;
    font-size: 15px;
    font-weight: 700;
}
.bmp-visual__author-role {
    display: block;
    font-size: 13px;
    opacity: 0.6;
}

/* ═══════════════════════════════════════
   VISUAL TEMPLATES — Position Adaptations
   ═══════════════════════════════════════ */

/* ── Side panels (left/right) ── */
.bmp-popup-pos-right .bmp-visual__media,
.bmp-popup-pos-left .bmp-visual__media {
    max-height: 180px;
}
.bmp-popup-pos-right .bmp-visual__content,
.bmp-popup-pos-left .bmp-visual__content {
    padding: 20px 24px 24px;
}
.bmp-popup-pos-right .bmp-visual__heading,
.bmp-popup-pos-left .bmp-visual__heading {
    font-size: 20px;
}
/* Lead magnet stacks vertically in side panels */
.bmp-popup-pos-right .bmp-visual--lead-magnet,
.bmp-popup-pos-left .bmp-visual--lead-magnet {
    flex-direction: column;
}
.bmp-popup-pos-right .bmp-visual--lead-magnet .bmp-visual__media,
.bmp-popup-pos-left .bmp-visual--lead-magnet .bmp-visual__media {
    flex: none;
    max-height: 160px;
}

/* ── Top/Bottom bars — horizontal layout ── */
.bmp-popup-pos-bottom .bmp-visual,
.bmp-popup-pos-top .bmp-visual {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 50px 12px 12px;
}
.bmp-popup-pos-bottom .bmp-visual__media,
.bmp-popup-pos-top .bmp-visual__media {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    max-height: none;
    border-radius: 8px;
    overflow: hidden;
}
.bmp-popup-pos-bottom .bmp-visual__img,
.bmp-popup-pos-top .bmp-visual__img {
    width: 80px;
    height: 80px;
    object-fit: cover;
}
.bmp-popup-pos-bottom .bmp-visual__content,
.bmp-popup-pos-top .bmp-visual__content {
    padding: 0;
    flex: 1;
    text-align: left;
}
.bmp-popup-pos-bottom .bmp-visual__heading,
.bmp-popup-pos-top .bmp-visual__heading {
    font-size: 15px;
    margin-bottom: 4px;
}
.bmp-popup-pos-bottom .bmp-visual__body,
.bmp-popup-pos-top .bmp-visual__body {
    font-size: 12px;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.bmp-popup-pos-bottom .bmp-visual__cta,
.bmp-popup-pos-top .bmp-visual__cta {
    padding: 6px 14px;
    font-size: 12px;
}
/* Hide heavy elements in bars */
.bmp-popup-pos-bottom .bmp-visual__badge,
.bmp-popup-pos-top .bmp-visual__badge,
.bmp-popup-pos-bottom .bmp-visual__price,
.bmp-popup-pos-top .bmp-visual__price,
.bmp-popup-pos-bottom .bmp-visual__video-wrap,
.bmp-popup-pos-top .bmp-visual__video-wrap,
.bmp-popup-pos-bottom .bmp-visual__quote-icon,
.bmp-popup-pos-top .bmp-visual__quote-icon,
.bmp-popup-pos-bottom .bmp-visual__icon,
.bmp-popup-pos-top .bmp-visual__icon {
    display: none;
}
/* Coupon inline in bars */
.bmp-popup-pos-bottom .bmp-visual__coupon-box,
.bmp-popup-pos-top .bmp-visual__coupon-box {
    margin: 0 0 8px;
}
.bmp-popup-pos-bottom .bmp-visual__coupon-code,
.bmp-popup-pos-top .bmp-visual__coupon-code {
    font-size: 14px;
    padding: 6px 12px;
}
.bmp-popup-pos-bottom .bmp-visual__coupon-copy,
.bmp-popup-pos-top .bmp-visual__coupon-copy {
    padding: 6px 10px;
    font-size: 11px;
}
/* Testimonial compact in bars */
.bmp-popup-pos-bottom .bmp-visual--testimonial .bmp-visual__body,
.bmp-popup-pos-top .bmp-visual--testimonial .bmp-visual__body {
    font-style: italic;
    font-size: 13px;
}
.bmp-popup-pos-bottom .bmp-visual__author,
.bmp-popup-pos-top .bmp-visual__author {
    margin-bottom: 8px;
    gap: 8px;
}
.bmp-popup-pos-bottom .bmp-visual__avatar,
.bmp-popup-pos-top .bmp-visual__avatar {
    width: 32px;
    height: 32px;
}

/* ── Visual templates responsive ── */
@media (max-width: 768px) {
    .bmp-visual--lead-magnet {
        flex-direction: column;
    }
    .bmp-visual--lead-magnet .bmp-visual__media {
        flex: none;
        max-height: 200px;
    }
    .bmp-visual__content {
        padding: 20px;
    }
    .bmp-visual__heading {
        font-size: 20px;
    }
    .bmp-visual--announcement .bmp-visual__heading {
        font-size: 22px;
    }
    .bmp-visual__coupon-code {
        font-size: 18px;
    }
    .bmp-popup-pos-bottom .bmp-visual,
    .bmp-popup-pos-top .bmp-visual {
        flex-direction: column;
        text-align: center;
        padding: 16px 40px 16px 16px;
    }
    .bmp-popup-pos-bottom .bmp-visual__media,
    .bmp-popup-pos-top .bmp-visual__media {
        width: 100%;
        height: 120px;
    }
    .bmp-popup-pos-bottom .bmp-visual__img,
    .bmp-popup-pos-top .bmp-visual__img {
        width: 100%;
        height: 120px;
    }
}
