.bkbg-ep-wrap {
    max-width: 100%;
    margin: 0 auto;
    border-radius: inherit;
    overflow: hidden;
}

.bkbg-ep-container {
    position: relative;
    overflow: hidden;
    background: #1e293b;
}

/* Aspect ratio variants */
.bkbg-ep-container.ratio-16-9 { padding-bottom: 56.25%; height: 0; }
.bkbg-ep-container.ratio-4-3  { padding-bottom: 75%;    height: 0; }
.bkbg-ep-container.ratio-1-1  { padding-bottom: 100%;   height: 0; }
.bkbg-ep-container.ratio-3-2  { padding-bottom: 66.67%; height: 0; }
.bkbg-ep-container.ratio-21-9 { padding-bottom: 42.86%; height: 0; }

/* Fills the padded container for ratio modes */
.bkbg-ep-container.ratio-16-9 > *,
.bkbg-ep-container.ratio-4-3  > *,
.bkbg-ep-container.ratio-1-1  > *,
.bkbg-ep-container.ratio-3-2  > *,
.bkbg-ep-container.ratio-21-9 > * {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.bkbg-ep-thumbnail {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bkbg-ep-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    user-select: none;
    box-sizing: border-box;
}

.bkbg-ep-overlay:hover .bkbg-ep-cta {
    opacity: 0.9;
    transform: scale(1.04);
}

.bkbg-ep-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 13px;
    color: #fff;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.bkbg-ep-title {
    font-family: var(--bkbg-ep-ttl-font-family, inherit);
    font-size: var(--bkbg-ep-ttl-font-size-d, 18px);
    font-weight: var(--bkbg-ep-ttl-font-weight, 700);
    line-height: var(--bkbg-ep-ttl-line-height-d, 1.3);
    font-style: var(--bkbg-ep-ttl-font-style, normal);
    text-decoration: var(--bkbg-ep-ttl-text-decoration, none);
    text-transform: var(--bkbg-ep-ttl-text-transform, none);
    letter-spacing: var(--bkbg-ep-ttl-letter-spacing-d, normal);
    word-spacing: var(--bkbg-ep-ttl-word-spacing-d, normal);
    margin: 0;
}

.bkbg-ep-description {
    font-family: var(--bkbg-ep-dsc-font-family, inherit);
    font-size: var(--bkbg-ep-dsc-font-size-d, 14px);
    font-weight: var(--bkbg-ep-dsc-font-weight, 400);
    line-height: var(--bkbg-ep-dsc-line-height-d, 1.55);
    font-style: var(--bkbg-ep-dsc-font-style, normal);
    text-decoration: var(--bkbg-ep-dsc-text-decoration, none);
    text-transform: var(--bkbg-ep-dsc-text-transform, none);
    letter-spacing: var(--bkbg-ep-dsc-letter-spacing-d, normal);
    word-spacing: var(--bkbg-ep-dsc-word-spacing-d, normal);
    margin: 0;
    max-width: 520px;
}

.bkbg-ep-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    font-family: var(--bkbg-ep-cta-font-family, inherit);
    font-size: var(--bkbg-ep-cta-font-size-d, 14px);
    font-weight: var(--bkbg-ep-cta-font-weight, 600);
    line-height: var(--bkbg-ep-cta-line-height-d, 1);
    font-style: var(--bkbg-ep-cta-font-style, normal);
    text-transform: var(--bkbg-ep-cta-text-transform, none);
    letter-spacing: var(--bkbg-ep-cta-letter-spacing-d, normal);
    word-spacing: var(--bkbg-ep-cta-word-spacing-d, normal);
    border-radius: 8px;
    cursor: pointer;
    transition: opacity 0.18s, transform 0.18s;
    border: 2px solid transparent;
    white-space: nowrap;
}

.bkbg-ep-cta.style-outline {
    background: transparent !important;
}

.bkbg-ep-cta.style-ghost {
    background: transparent !important;
    border-color: transparent !important;
}

.bkbg-ep-privacy {
    position: absolute;
    bottom: 10px;
    font-size: 11px;
    opacity: 0.8;
    margin: 0;
}

.bkbg-ep-iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Loading bar */
.bkbg-ep-loading {
    position: absolute;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    border-radius: 0 2px 2px 0;
    animation: bkbg-ep-load 2s ease-out forwards;
    pointer-events: none;
    z-index: 10;
}

@keyframes bkbg-ep-load {
    0%   { width: 0%; opacity: 1; }
    80%  { width: 90%; opacity: 1; }
    100% { width: 100%; opacity: 0; }
}

/* ── Responsive typography ── */
@media (max-width: 1024px) {
    .bkbg-ep-title {
        font-size: var(--bkbg-ep-ttl-font-size-t, var(--bkbg-ep-ttl-font-size-d, 18px));
        line-height: var(--bkbg-ep-ttl-line-height-t, var(--bkbg-ep-ttl-line-height-d, 1.3));
        letter-spacing: var(--bkbg-ep-ttl-letter-spacing-t, var(--bkbg-ep-ttl-letter-spacing-d, normal));
        word-spacing: var(--bkbg-ep-ttl-word-spacing-t, var(--bkbg-ep-ttl-word-spacing-d, normal));
    }
    .bkbg-ep-description {
        font-size: var(--bkbg-ep-dsc-font-size-t, var(--bkbg-ep-dsc-font-size-d, 14px));
        line-height: var(--bkbg-ep-dsc-line-height-t, var(--bkbg-ep-dsc-line-height-d, 1.55));
        letter-spacing: var(--bkbg-ep-dsc-letter-spacing-t, var(--bkbg-ep-dsc-letter-spacing-d, normal));
        word-spacing: var(--bkbg-ep-dsc-word-spacing-t, var(--bkbg-ep-dsc-word-spacing-d, normal));
    }
    .bkbg-ep-cta {
        font-size: var(--bkbg-ep-cta-font-size-t, var(--bkbg-ep-cta-font-size-d, 14px));
        line-height: var(--bkbg-ep-cta-line-height-t, var(--bkbg-ep-cta-line-height-d, 1));
        letter-spacing: var(--bkbg-ep-cta-letter-spacing-t, var(--bkbg-ep-cta-letter-spacing-d, normal));
        word-spacing: var(--bkbg-ep-cta-word-spacing-t, var(--bkbg-ep-cta-word-spacing-d, normal));
    }
}
@media (max-width: 767px) {
    .bkbg-ep-title {
        font-size: var(--bkbg-ep-ttl-font-size-m, var(--bkbg-ep-ttl-font-size-t, var(--bkbg-ep-ttl-font-size-d, 18px)));
        line-height: var(--bkbg-ep-ttl-line-height-m, var(--bkbg-ep-ttl-line-height-t, var(--bkbg-ep-ttl-line-height-d, 1.3)));
        letter-spacing: var(--bkbg-ep-ttl-letter-spacing-m, var(--bkbg-ep-ttl-letter-spacing-t, var(--bkbg-ep-ttl-letter-spacing-d, normal)));
        word-spacing: var(--bkbg-ep-ttl-word-spacing-m, var(--bkbg-ep-ttl-word-spacing-t, var(--bkbg-ep-ttl-word-spacing-d, normal)));
    }
    .bkbg-ep-description {
        font-size: var(--bkbg-ep-dsc-font-size-m, var(--bkbg-ep-dsc-font-size-t, var(--bkbg-ep-dsc-font-size-d, 14px)));
        line-height: var(--bkbg-ep-dsc-line-height-m, var(--bkbg-ep-dsc-line-height-t, var(--bkbg-ep-dsc-line-height-d, 1.55)));
        letter-spacing: var(--bkbg-ep-dsc-letter-spacing-m, var(--bkbg-ep-dsc-letter-spacing-t, var(--bkbg-ep-dsc-letter-spacing-d, normal)));
        word-spacing: var(--bkbg-ep-dsc-word-spacing-m, var(--bkbg-ep-dsc-word-spacing-t, var(--bkbg-ep-dsc-word-spacing-d, normal)));
    }
    .bkbg-ep-cta {
        font-size: var(--bkbg-ep-cta-font-size-m, var(--bkbg-ep-cta-font-size-t, var(--bkbg-ep-cta-font-size-d, 14px)));
        line-height: var(--bkbg-ep-cta-line-height-m, var(--bkbg-ep-cta-line-height-t, var(--bkbg-ep-cta-line-height-d, 1)));
        letter-spacing: var(--bkbg-ep-cta-letter-spacing-m, var(--bkbg-ep-cta-letter-spacing-t, var(--bkbg-ep-cta-letter-spacing-d, normal)));
        word-spacing: var(--bkbg-ep-cta-word-spacing-m, var(--bkbg-ep-cta-word-spacing-t, var(--bkbg-ep-cta-word-spacing-d, normal)));
    }
}
