/**
 * Video CTA Builder — Frontend Styles (v2)
 */

/* ── Player Container ──────────────────────────────────────── */

.vcb-player {
    position: relative;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--vcb-radius, 6px);
    overflow: hidden;
    background: #000;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    container-type: size;
    container-name: vcb-player;
}

/* ── Thumbnail ─────────────────────────────────────────────── */

.vcb-thumbnail {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-color: #1a1a2e;
    cursor: pointer;
    transition: opacity 0.3s;
}

.vcb-thumbnail.vcb-hidden {
    opacity: 0;
    pointer-events: none;
}

/* ── Play Button ───────────────────────────────────────────── */

.vcb-play-btn {
    width: 68px;
    height: 68px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s;
    backdrop-filter: blur(4px);
}

.vcb-play-btn svg {
    margin-left: 4px;
}

.vcb-thumbnail:hover .vcb-play-btn {
    transform: scale(1.08);
    background: rgba(0, 0, 0, 0.8);
}

/* ── Video Wrapper ─────────────────────────────────────────── */

.vcb-video-wrap {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.vcb-video-wrap video,
.vcb-video-wrap iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* ── CTA Overlay ───────────────────────────────────────────── */

.vcb-cta-overlay {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    overflow: hidden;
    background: var(--vcb-overlay-bg, rgba(0, 0, 0, 0.75));
    animation: vcb-fade-in 0.4s ease;
}

@keyframes vcb-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.vcb-cta-box {
    background: var(--vcb-box-bg, #ffffff);
    border-radius: var(--vcb-radius, 6px);
    padding: var(--vcb-padding, 40px);
    text-align: center;
    max-width: 85%;
    width: 460px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    animation: vcb-slide-up 0.4s ease;
}

/* Scale down CTA content when player is short */
@container (max-height: 300px) {
    .vcb-cta-box { padding: 12px 16px; }
    .vcb-cta-headline { font-size: 15px; margin-bottom: 4px; }
    .vcb-cta-text { font-size: 11px; margin-bottom: 10px; }
    .vcb-cta-btn { padding: 6px 14px; font-size: 12px; }
    .vcb-cta-close { font-size: 11px; margin-top: 6px; }
}

@keyframes vcb-slide-up {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.vcb-cta-headline {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #1e1e1e;
    line-height: 1.3;
}

.vcb-cta-text {
    font-size: 14px;
    color: #555;
    margin: 0 0 24px;
    line-height: 1.5;
}

/* ── CTA Buttons ───────────────────────────────────────────── */

.vcb-cta-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.vcb-cta-btn {
    display: inline-block;
    padding: 12px 28px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--vcb-radius, 6px);
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
    border: none;
    line-height: 1.4;
}

.vcb-cta-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.vcb-cta-btn-1 {
    background: var(--vcb-btn1-bg, #3858e9);
    color: var(--vcb-btn1-color, #ffffff);
}

.vcb-cta-btn-2 {
    background: var(--vcb-btn2-bg, #f0f0f1);
    color: var(--vcb-btn2-color, #1e1e1e);
}

/* ── Close Button ──────────────────────────────────────────── */

.vcb-cta-close {
    display: block;
    margin: 16px auto 0;
    background: none;
    border: none;
    color: #999;
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.15s;
    padding: 4px 8px;
}

.vcb-cta-close:hover {
    color: #666;
}

/* ── Privacy Notice ────────────────────────────────────────── */

.vcb-privacy-notice {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    pointer-events: auto;
}

.vcb-privacy-notice-inner {
    text-align: center;
    color: #fff;
    max-width: 380px;
    padding: 24px;
}

.vcb-privacy-notice-inner svg {
    color: #aaa;
    margin-bottom: 12px;
}

.vcb-privacy-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #fff;
}

.vcb-privacy-text {
    font-size: 13px;
    color: #ccc;
    margin: 0 0 16px;
    line-height: 1.5;
}

.vcb-privacy-btn {
    display: inline-block;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}

.vcb-privacy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

/* ── Responsive ────────────────────────────────────────────── */

@media (max-width: 480px) {
    .vcb-cta-box {
        padding: calc(var(--vcb-padding, 40px) * 0.6);
        max-width: 92%;
    }

    .vcb-cta-headline {
        font-size: 18px;
    }

    .vcb-cta-text {
        font-size: 13px;
    }

    .vcb-cta-btn {
        padding: 10px 20px;
        font-size: 13px;
    }

    .vcb-play-btn {
        width: 52px;
        height: 52px;
    }

    .vcb-play-btn svg {
        width: 22px;
        height: 22px;
    }
}
