/* Video Banners V2 — Generated video preview */

/* video wrapper */
.is-video-v2 .v2-video-wrap {
    position: relative;
    border-radius: 8px;
    overflow: visible;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
}
.is-video-v2 .v2-video-wrap.preview-size-hidden { display: none; }

.is-video-v2 .v2-preview-video {
    border-radius: 8px;
    background: #f0f0f0;
}

/* video area (contains video + loading overlay, excludes accessories) */
.is-video-v2 .v2-video-area {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

/* generation loading overlay — covers only the video area */
.is-video-v2 .v2-gen-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(240,240,240,.92);
    border-radius: 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
    z-index: 2;
}
.is-video-v2 .v2-gen-loading.active {
    opacity: 1;
    pointer-events: auto;
}

.v2-gen-spinner {
    width: 36px; height: 36px;
    border: 3px solid #e0e0e0;
    border-top-color: #242424;
    border-radius: 50%;
    animation: v2spin .8s linear infinite;
    margin-bottom: 10px;
}
@keyframes v2spin { to { transform: rotate(360deg); } }

.v2-gen-text {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

/* size buttons */
.is-video-v2 .desktop-size-select { margin-top: 16px; }
.is-video-v2 .size-select-label { font-size: 13px; color: #666; font-weight: 500; margin-bottom: 8px; }
.is-video-v2 .size-btn-group { display: flex; flex-wrap: wrap; gap: 8px; }
.is-video-v2 .size-btn {
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
    transition: all .2s;
    display: flex; flex-direction: column; align-items: center; gap: 2px;
}
.is-video-v2 .size-btn:hover { border-color: #242424; background: #fafafa; }
.is-video-v2 .size-btn.active { border-color: #242424; background: #242424; color: #fff; }
.is-video-v2 .size-btn .size-dim { font-size: 11px; opacity: .6; }
.is-video-v2 .size-btn.active .size-dim { opacity: .8; }

@media (max-width: 768px) {
    .is-video-v2 { flex-direction: column; }
    .is-video-v2 .left-col,
    .is-video-v2 .right-col { width: 100% !important; }
    .is-video-v2 .right-col { margin-top: 20px; }
    .is-video-v2 .size-btn-group { justify-content: center; }
}

/* Preview video accessories (play/pause + progress bar) */
.is-video-v2 .v2-video-wrap .accessories {
    display: flex;
    gap: 13px;
    width: 100%;
    align-items: center;
    padding: 10px 0 4px;
}
.is-video-v2 .v2-video-wrap .accessories .close-play {
    width: 24px;
    height: 24px;
    position: relative;
    flex-shrink: 0;
}
.is-video-v2 .v2-video-wrap .accessories .close-play div {
    position: absolute;
    left: 0;
    top: 0;
    cursor: pointer;
}
.is-video-v2 .v2-video-wrap .accessories .close-play div svg {
    font-size: 24px;
    transition: all 0.2s;
}
.is-video-v2 .v2-video-wrap .accessories .close-play div:hover svg {
    opacity: 0.7;
}
.is-video-v2 .v2-video-wrap .accessories .close-play .click-play {
    display: none;
}
.is-video-v2 .v2-video-wrap .accessories .close-play .click-close {
    display: block;
}
.is-video-v2 .v2-video-wrap .accessories .progress-bar {
    width: calc(100% - 37px);
    height: 1px;
    background-color: #e8e8e8;
    cursor: pointer;
    position: relative;
}
.is-video-v2 .v2-video-wrap .accessories .progress {
    height: 5px;
    background-color: #242424;
    width: 0%;
    position: absolute;
    left: 0;
    top: -2px;
}

/* Result view — title-row layout */
.v2-step-result .title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
}
.v2-step-result .title-row .title-row-left {
    display: flex;
    align-items: center;
    gap: 8px;
}
.v2-step-result .title-row .title-row-left h4,
.v2-step-result .title-row .title-row-left p {
    margin: 0;
}

/* Fullscreen button */
.v2-fullscreen-btn {
    background: none;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
    flex-shrink: 0;
}
.v2-fullscreen-btn:hover {
    border-color: #242424;
    background: #fafafa;
}
.v2-fullscreen-btn svg {
    width: 18px;
    height: 18px;
}

/* Result view — loading overlay */
.v2-step-result .video-box {
    position: relative;
}
.v2-result-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(240,240,240,.95);
    border-radius: 8px;
    z-index: 2;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s;
}
.v2-result-loading.active {
    opacity: 1;
    pointer-events: auto;
}