/**
 * VIDEO TAB ENHANCED v2 — Scene 5 Styles
 * video-tab-enhanced.css
 * Include after step5-styles.css
 */

/* ═══════════════════════════════════════════════════════════════
   UPLOAD ZONE
════════════════════════════════════════════════════════════════ */
.vte-upload-zone {
    border: 2px dashed rgba(242,130,32,0.38);
    border-radius: var(--sj-radius-md, 10px);
    background: rgba(242,130,32,0.025);
    cursor: pointer;
    transition: border-color 0.22s, background 0.22s, box-shadow 0.22s;
    position: relative;
    overflow: hidden;
    outline: none;
}

    .vte-upload-zone input[type="file"] {
        position: absolute;
        inset: 0;
        opacity: 0;
        pointer-events: none;
        z-index: -1;
    }

    .vte-upload-zone:hover,
    .vte-upload-zone.vte-drag-over {
        border-color: var(--sj-orange, #F28220);
        background: rgba(242,130,32,0.06);
        box-shadow: 0 0 0 3px rgba(242,130,32,0.14);
    }

    .vte-upload-zone:focus-visible {
        box-shadow: 0 0 0 3px rgba(242,130,32,0.38);
        outline: none;
    }

.vte-upload-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 22px 18px 18px;
    gap: 7px;
}

.vte-upload-icon-wrap {
    position: relative;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
}

.vte-upload-icon {
    font-size: 2rem;
    color: var(--sj-orange, #F28220);
    position: relative;
    z-index: 1;
}

.vte-upload-pulse {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(242,130,32,0.2) 0%, transparent 70%);
    animation: vtePulse 2.6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes vtePulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.7;
    }

    50% {
        transform: scale(1.5);
        opacity: 0;
    }
}

.vte-upload-title {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--sj-text, #1A1D20);
}

.vte-upload-sub {
    font-size: 0.67rem;
    color: var(--sj-muted, #6B7280);
    line-height: 1.45;
}

.vte-upload-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    justify-content: center;
    margin-top: 2px;
}

.vte-tag {
    font-size: 0.59rem;
    font-weight: 600;
    background: rgba(242,130,32,0.1);
    color: var(--sj-orange, #F28220);
    padding: 2px 8px;
    border-radius: 20px;
    border: 1px solid rgba(242,130,32,0.2);
    letter-spacing: 0.02em;
}

.vte-upload-divider {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 290px;
    margin: 4px 0 2px;
    color: var(--sj-muted, #9CA3AF);
    font-size: 0.63rem;
    font-weight: 500;
}

    .vte-upload-divider::before,
    .vte-upload-divider::after {
        content: '';
        flex: 1;
        height: 1px;
        background: rgba(0,0,0,0.1);
    }

/* ── External source buttons ────────────────────────────────── */
.vte-upload-sources {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}

.vte-source-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: var(--sj-surface, #fff);
    border: 1.5px solid rgba(0,0,0,0.1);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 0.67rem;
    font-weight: 600;
    color: var(--sj-text, #1A1D20);
    cursor: pointer;
    transition: border-color 0.18s, background 0.18s, box-shadow 0.18s, transform 0.14s;
    white-space: nowrap;
}

    .vte-source-btn i {
        font-size: 0.82rem;
    }

    .vte-source-btn:hover {
        border-color: var(--sj-orange, #F28220);
        background: rgba(242,130,32,0.06);
        box-shadow: 0 2px 8px rgba(242,130,32,0.14);
        transform: translateY(-1px);
    }

    .vte-source-btn[data-source="youtube"] i {
        color: #FF0000;
    }

    .vte-source-btn[data-source="gdrive"] i {
        color: #4285F4;
    }

    .vte-source-btn[data-source="dropbox"] i {
        color: #0061FF;
    }

    .vte-source-btn[data-source="onedrive"] i {
        color: #0078D4;
    }

    .vte-source-btn[data-source="s3"] i {
        color: #FF9900;
    }

/* ═══════════════════════════════════════════════════════════════
   PROGRESS AREA
════════════════════════════════════════════════════════════════ */
.vte-progress-area {
    padding: 2px 0;
}

.vte-progress-wrap {
    background: var(--sj-surface, #fff);
    border: 1.5px solid rgba(0,0,0,0.08);
    border-radius: var(--sj-radius-md, 10px);
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.vte-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.vte-progress-filename {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--sj-text, #1A1D20);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 75%;
}

.vte-progress-pct {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--sj-orange, #F28220);
    min-width: 36px;
    text-align: right;
    flex-shrink: 0;
}

.vte-progress-bar-track {
    width: 100%;
    height: 5px;
    background: rgba(0,0,0,0.07);
    border-radius: 99px;
    overflow: hidden;
}

.vte-progress-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--sj-orange, #F28220), #FFB347);
    border-radius: 99px;
    transition: width 0.22s ease;
}

.vte-progress-bar-fill--done {
    background: linear-gradient(90deg, #10B981, #34D399);
}

.vte-progress-bar-fill--error {
    background: linear-gradient(90deg, #EF4444, #F87171);
}

.vte-progress-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.64rem;
    color: var(--sj-muted, #6B7280);
}

.vte-progress-state {
    font-weight: 500;
    color: var(--sj-text-soft, #374151);
}

.vte-progress-retry {
    align-self: flex-start;
    background: rgba(239,68,68,0.07);
    border: 1.5px solid rgba(239,68,68,0.32);
    color: #EF4444;
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 0.68rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.16s, transform 0.13s;
}

    .vte-progress-retry:hover {
        background: rgba(239,68,68,0.13);
        transform: translateY(-1px);
    }

.vte-hidden {
    display: none !important;
}

/* ═══════════════════════════════════════════════════════════════
   PLAYER WRAP — two-column grid (desktop) / stacked (mobile)
════════════════════════════════════════════════════════════════ */
/* ═══════════════════════════════════════════════════════════════
   PLAYER WRAP — layout: video -25% width, +20% height, no scroll
   Grid: player column (75% max) + fixed thumbnail panel (148px).
   Combined layout always fits in one viewport without scrollbars.
════════════════════════════════════════════════════════════════ */
.vte-player-wrap {
    display: flex;
    flex-direction: row;
    gap: 12px;
    align-items: flex-start;
    /* Prevent any overflow at the wrapper level */
    max-height: calc(100vh - 120px);
    overflow: hidden;
    padding: 0;
}

@media (max-width: 640px) {
    .vte-player-wrap {
        flex-direction: column;
        max-height: none;
        overflow: visible;
    }
}

/* ── Player column: 75% of available width (–25% from 100%) ─── */
.vte-player-col {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
    /* Reduce width by 25% relative to original full-width fill */
    flex: 0 0 75%;
    max-width: 75%;
}

@media (max-width: 640px) {
    .vte-player-col {
        flex: 1 1 auto;
        max-width: 100%;
    }
}

/* ── Player stage: aspect-ratio 16/9 with +20% height cap ──── */
.vte-player-stage {
    position: relative;
    width: 100%;
    /* 16:9 ratio preserved; max-height set to roughly viewport-safe value */
    aspect-ratio: 16 / 9;
    /* +20% height: allow up to 60% of viewport height (was ~50%) */
    max-height: 60vh;
    background: #0c0d10;
    border-radius: var(--sj-radius-md, 10px);
    overflow: hidden;
}

@media (min-width: 641px) {
    .vte-player-stage {
        /* Desktop: cap absolute height so combined UI never scrolls */
        max-height: min(60vh, 340px);
    }
}

@media (max-width: 640px) {
    .vte-player-stage {
        /* Mobile: full column width, capped at 56vw to keep 16:9 in viewport */
        max-height: 56vw;
    }
}

.vte-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: inherit;
}

/* ── Big play overlay ───────────────────────────────────────── */
.vte-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.22);
    transition: opacity 0.2s;
    pointer-events: auto;
}

    .vte-play-overlay.hidden {
        opacity: 0;
        pointer-events: none;
    }

.vte-big-play {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: rgba(242,130,32,0.9);
    border: none;
    color: #fff;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(242,130,32,0.45);
    transition: transform 0.16s, background 0.16s;
}

    .vte-big-play:hover {
        transform: scale(1.1);
        background: var(--sj-orange, #F28220);
    }

/* ── Meta overlays (hover reveal) ──────────────────────────── */
.vte-meta-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 10px 14px;
    background: linear-gradient(to bottom, rgba(0,0,0,0.54) 0%, transparent 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.22s;
}

.vte-meta-bottom {
    position: absolute;
    bottom: 46px;
    left: 0;
    right: 0;
    padding: 6px 14px;
    background: linear-gradient(to top, rgba(0,0,0,0.42) 0%, transparent 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.22s;
}

.vte-player-stage:hover .vte-meta-top,
.vte-player-stage:hover .vte-meta-bottom {
    opacity: 1;
}

.vte-meta-title {
    font-size: 0.76rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.6);
}

.vte-meta-location {
    font-size: 0.61rem;
    color: rgba(255,255,255,0.78);
    margin-top: 2px;
}

.vte-verified {
    font-size: 0.6rem;
    font-weight: 600;
    color: #34D399;
    display: flex;
    align-items: center;
    gap: 3px;
}

.vte-quality-badge {
    font-size: 0.58rem;
    font-weight: 700;
    background: rgba(242,130,32,0.88);
    color: #fff;
    padding: 2px 7px;
    border-radius: 4px;
}

/* ── Controls bar ───────────────────────────────────────────── */
.vte-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 5px 10px 7px;
    background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 100%);
}

.vte-progress-track {
    padding: 0 2px 3px;
}

.vte-seek {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255,255,255,0.24);
    border-radius: 99px;
    cursor: pointer;
    outline: none;
}

    .vte-seek:hover {
        background: rgba(255,255,255,0.4);
    }

    .vte-seek::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 11px;
        height: 11px;
        border-radius: 50%;
        background: var(--sj-orange, #F28220);
        cursor: pointer;
    }

.vte-ctrl-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vte-ctrl-left, .vte-ctrl-right {
    display: flex;
    align-items: center;
    gap: 3px;
}

.vte-ctrl-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 0.82rem;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.14s;
    white-space: nowrap;
    padding: 0 4px;
}

    .vte-ctrl-btn:hover {
        background: rgba(255,255,255,0.14);
    }

.vte-ctrl-btn--remove {
    gap: 4px;
    width: auto;
    padding: 0 8px;
}

    .vte-ctrl-btn--remove:hover {
        background: rgba(239,68,68,0.3);
    }

.vte-remove-label {
    font-size: 0.6rem;
    font-weight: 600;
}

.vte-ctrl-btn.muted {
    color: rgba(255,255,255,0.45);
}

.vte-time {
    font-size: 0.6rem;
    color: rgba(255,255,255,0.82);
    min-width: 68px;
    padding-left: 4px;
}

/* ── YouTube player stage ───────────────────────────────────── */
.vte-yt-wrap {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
}

.vte-yt-iframe {
    flex: 1;
    width: 100%;
    border: 0;
    display: block;
}

.vte-yt-remove-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 12px;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
    display: flex;
    justify-content: flex-end;
    opacity: 0;
    transition: opacity 0.22s;
}

.vte-player-stage:hover .vte-yt-remove-bar {
    opacity: 1;
}

.vte-yt-remove-btn {
    background: rgba(239,68,68,0.85);
    border: none;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.16s, transform 0.13s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

    .vte-yt-remove-btn:hover {
        background: #EF4444;
        transform: translateY(-1px);
    }

/* ── YouTube overlay fallback controls ──────────────────────── */
.vte-yt-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px 12px;
    background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 100%);
    display: flex;
    justify-content: flex-end;
}

.vte-yt-remove {
    background: rgba(239,68,68,0.9);
    border-radius: 20px;
    padding: 5px 14px;
    width: auto;
    font-size: 0.68rem;
    font-weight: 600;
}

/* ── Cover-selected banner ──────────────────────────────────── */
.vte-cover-banner {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(16,185,129,0.92);
    color: #fff;
    font-size: 0.66rem;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.24s, transform 0.24s;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(16,185,129,0.4);
}

.vte-cover-banner--in {
    opacity: 1;
    transform: translateY(0);
}

/* Stage-level confirmation pulse — briefly outlines the player with
   a green ring when a cover thumbnail is selected, so the user sees
   the choice land on the actual preview (not just the banner).      */
.vte-stage-cover-pulse {
    animation: vte-stage-pulse 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes vte-stage-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }

    35% {
        box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.55), 0 0 26px rgba(16, 185, 129, 0.35);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .vte-stage-cover-pulse {
        animation: none;
    }
}

/* ── File / source info strip ───────────────────────────────── */
.vte-info-strip {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.62rem;
    color: var(--sj-muted, #6B7280);
    padding: 0 2px;
    flex-wrap: wrap;
}

    .vte-info-strip > i {
        color: var(--sj-orange, #F28220);
        flex-shrink: 0;
    }

.vte-info-filename {
    font-weight: 600;
    color: var(--sj-text, #1A1D20);
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vte-info-sep {
    opacity: 0.35;
}

.vte-optimised-badge {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 0.58rem;
    font-weight: 700;
    color: #10B981;
    background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.25);
    border-radius: 20px;
    padding: 1px 7px;
    margin-left: 2px;
}

    .vte-optimised-badge i {
        font-size: 0.7rem;
        color: #10B981;
    }

/* ═══════════════════════════════════════════════════════════════
   THUMBNAIL PANEL (right column)
════════════════════════════════════════════════════════════════ */
/* Thumbnail panel: fixed width so it never pushes the video wider */
.vte-thumb-panel {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 0 0 210px;
    max-width: 210px;
    min-width: 0;
    overflow: hidden;
}

@media (max-width: 640px) {
    .vte-thumb-panel {
        flex: 1 1 auto;
        max-width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
    }
}

.vte-thumb-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.71rem;
    font-weight: 700;
    color: var(--sj-text, #1A1D20);
}

    .vte-thumb-header i {
        color: var(--sj-orange, #F28220);
        font-size: 0.8rem;
    }

.vte-thumb-hint {
    font-size: 0.61rem;
    color: var(--sj-muted, #6B7280);
    line-height: 1.45;
}

.vte-thumb-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(3, auto);
    gap: 5px;
    /* No scrollbar — all 6 chips always visible */
    overflow: hidden;
}
/* Mobile: horizontal scroll strip */
@media (max-width: 640px) {
    .vte-thumb-list {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        gap: 8px;
        padding-bottom: 4px;
    }

    .vte-thumb-chip {
        flex-shrink: 0;
        width: 108px;
    }
}

.vte-thumb-generating {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.66rem;
    color: var(--sj-muted, #6B7280);
    padding: 10px 0;
}

.vte-thumb-spinner {
    width: 13px;
    height: 13px;
    border: 2px solid rgba(0,0,0,0.1);
    border-top-color: var(--sj-orange, #F28220);
    border-radius: 50%;
    animation: vteSpin 0.75s linear infinite;
    flex-shrink: 0;
}

@keyframes vteSpin {
    to {
        transform: rotate(360deg);
    }
}

.vte-thumb-err {
    font-size: 0.63rem;
    color: #EF4444;
    padding: 6px 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Thumbnail chip */
.vte-thumb-chip {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2.5px solid transparent;
    transition: border-color 0.17s, box-shadow 0.17s, transform 0.14s;
    background: #0c0d10;
    outline: none;
    user-select: none;
}

    .vte-thumb-chip:hover {
        border-color: rgba(242,130,32,0.5);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(242,130,32,0.18);
    }

    .vte-thumb-chip.selected {
        border-color: var(--sj-orange, #F28220);
        box-shadow: 0 0 0 3px rgba(242,130,32,0.22);
    }

    .vte-thumb-chip:focus-visible {
        box-shadow: 0 0 0 3px rgba(242,130,32,0.42);
    }

    .vte-thumb-chip img {
        display: block;
        width: 100%;
        aspect-ratio: 16 / 9;
        object-fit: cover;
        pointer-events: none;
    }

.vte-thumb-chip-label {
    position: absolute;
    top: 4px;
    left: 5px;
    font-size: 0.56rem;
    font-weight: 700;
    color: #fff;
    background: rgba(0,0,0,0.58);
    padding: 1px 5px;
    border-radius: 10px;
    pointer-events: none;
}

.vte-thumb-chip-time {
    position: absolute;
    bottom: 4px;
    right: 5px;
    font-size: 0.54rem;
    color: rgba(255,255,255,0.82);
    background: rgba(0,0,0,0.52);
    padding: 1px 5px;
    border-radius: 8px;
    pointer-events: none;
}

.vte-thumb-chip-check {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(242,130,32,0.22);
    opacity: 0;
    transition: opacity 0.17s;
    font-size: 1.25rem;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

.vte-thumb-chip.selected .vte-thumb-chip-check {
    opacity: 1;
}

/* Selected indicator below strip */
.vte-thumb-selected {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.63rem;
    font-weight: 600;
    color: #10B981;
    padding: 5px 0 0;
    border-top: 1px solid rgba(0,0,0,0.07);
    margin-top: 2px;
}

    .vte-thumb-selected i {
        font-size: 0.78rem;
    }

/* YouTube thumbnail note */
.vte-yt-thumb-note {
    font-size: 0.63rem;
    color: var(--sj-muted, #6B7280);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    background: rgba(255,0,0,0.04);
    border: 1px solid rgba(255,0,0,0.1);
    border-radius: 8px;
    line-height: 1.45;
}

/* ═══════════════════════════════════════════════════════════════
   EXTERNAL SOURCE MODAL
════════════════════════════════════════════════════════════════ */
.vte-ext-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.58);
    z-index: 9800;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.24s;
}

.vte-ext-overlay--in {
    opacity: 1;
}

.vte-ext-modal {
    background: var(--sj-bg, #fff);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.28);
    width: 100%;
    max-width: 500px;
    overflow: hidden;
    animation: vteModalPop 0.28s cubic-bezier(0.34,1.56,0.64,1) both;
}

@keyframes vteModalPop {
    from {
        transform: scale(0.88) translateY(18px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.vte-ext-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 12px;
    border-bottom: 1px solid rgba(0,0,0,0.07);
}

.vte-ext-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--sj-text, #1A1D20);
    display: flex;
    align-items: center;
    gap: 7px;
}

    .vte-ext-title i {
        color: var(--sj-orange, #F28220);
    }

.vte-ext-close {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(0,0,0,0.06);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: var(--sj-muted, #6B7280);
    transition: background 0.14s;
}

    .vte-ext-close:hover {
        background: rgba(0,0,0,0.12);
    }

.vte-ext-source-tabs {
    display: flex;
    overflow-x: auto;
    padding: 8px 14px 0;
    gap: 4px;
    border-bottom: 1px solid rgba(0,0,0,0.07);
    scrollbar-width: none;
}

    .vte-ext-source-tabs::-webkit-scrollbar {
        display: none;
    }

.vte-ext-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 7px 12px 8px;
    border: none;
    background: transparent;
    border-bottom: 2.5px solid transparent;
    cursor: pointer;
    font-size: 0.64rem;
    font-weight: 600;
    color: var(--sj-muted, #6B7280);
    border-radius: 6px 6px 0 0;
    flex-shrink: 0;
    transition: color 0.17s, border-color 0.17s, background 0.17s;
    white-space: nowrap;
}

    .vte-ext-tab i {
        font-size: 0.95rem;
    }

    .vte-ext-tab.active {
        color: var(--tab-color, var(--sj-orange, #F28220));
        border-bottom-color: var(--tab-color, var(--sj-orange, #F28220));
        background: rgba(0,0,0,0.022);
    }

.vte-ext-body {
    padding: 18px;
}

.vte-ext-panel {
    display: none;
    flex-direction: column;
    gap: 10px;
}

    .vte-ext-panel.active {
        display: flex;
        animation: vteFadeUp 0.2s ease;
    }

@keyframes vteFadeUp {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.vte-ext-source-icon {
    font-size: 1.8rem;
    text-align: center;
}

.vte-ext-source-name {
    font-size: 0.82rem;
    font-weight: 700;
    text-align: center;
}

.vte-ext-hint {
    font-size: 0.65rem;
    color: var(--sj-muted, #6B7280);
    text-align: center;
    line-height: 1.48;
    background: rgba(0,0,0,0.03);
    padding: 8px 10px;
    border-radius: 8px;
}

.vte-ext-input-row {
    display: flex;
    gap: 7px;
    margin-top: 2px;
}

.vte-ext-url-input {
    flex: 1;
    min-width: 0;
    border: 1.5px solid rgba(0,0,0,0.11);
    border-radius: 8px;
    padding: 9px 11px;
    font-size: 0.7rem;
    color: var(--sj-text, #1A1D20);
    background: var(--sj-bg, #fff);
    outline: none;
    transition: border-color 0.17s, box-shadow 0.17s;
}

    .vte-ext-url-input:focus {
        border-color: var(--sj-orange, #F28220);
        box-shadow: 0 0 0 3px rgba(242,130,32,0.14);
    }

.vte-ext-import-btn {
    background: var(--btn-color, var(--sj-orange, #F28220));
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 9px 14px;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: opacity 0.17s, transform 0.13s;
    flex-shrink: 0;
}

    .vte-ext-import-btn:hover {
        opacity: 0.87;
        transform: translateY(-1px);
    }

.vte-ext-error {
    font-size: 0.64rem;
    color: #EF4444;
    font-weight: 500;
    padding: 3px 0;
}

/* ═══════════════════════════════════════════════════════════════
   RELEVANCE WARNING DIALOG
════════════════════════════════════════════════════════════════ */
.vte-warn-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9900;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.22s;
}

.vte-warn-overlay--in {
    opacity: 1;
}

.vte-warn-modal {
    background: var(--sj-bg, #fff);
    border-radius: 14px;
    box-shadow: 0 20px 56px rgba(0,0,0,0.28);
    width: 100%;
    max-width: 400px;
    padding: 28px 24px 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
    animation: vteModalPop 0.26s cubic-bezier(0.34,1.56,0.64,1) both;
}

.vte-warn-icon {
    font-size: 2.2rem;
    color: #F59E0B;
}

.vte-warn-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--sj-text, #1A1D20);
}

.vte-warn-body {
    font-size: 0.72rem;
    color: var(--sj-muted, #374151);
    line-height: 1.55;
    max-width: 340px;
}

.vte-warn-actions {
    display: flex;
    gap: 10px;
    margin-top: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.vte-warn-btn {
    border-radius: 20px;
    padding: 9px 20px;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: opacity 0.17s, transform 0.13s;
}

    .vte-warn-btn:hover {
        opacity: 0.88;
        transform: translateY(-1px);
    }

.vte-warn-btn--cancel {
    background: rgba(0,0,0,0.06);
    color: var(--sj-text, #1A1D20);
    border: 1.5px solid rgba(0,0,0,0.1);
}

.vte-warn-btn--confirm {
    background: var(--sj-orange, #F28220);
    color: #fff;
}

/* ═══════════════════════════════════════════════════════════════
   FALLBACK TOAST
════════════════════════════════════════════════════════════════ */
.vte-toast {
    position: fixed;
    bottom: 26px;
    left: 50%;
    transform: translateX(-50%) translateY(14px);
    background: #1A1D20;
    color: #fff;
    font-size: 0.73rem;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 20px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.3);
    opacity: 0;
    transition: opacity 0.28s, transform 0.28s;
    z-index: 9999;
    pointer-events: none;
    white-space: nowrap;
}

.vte-toast--in {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.vte-toast--error {
    background: #EF4444;
}

.vte-toast--warn {
    background: #F59E0B;
}

/* ═══════════════════════════════════════════════════════════════
   VIDEO TIPS SLIDER — right panel carousel (10 rotating tips)
════════════════════════════════════════════════════════════════ */
.vte-tips-slider {
    display: flex;
    flex-direction: column;
    gap: 8px;
    user-select: none;
}

.vte-tips-viewport {
    overflow: hidden;
    border-radius: 8px;
    background: rgba(242,130,32,0.04);
    border: 1px solid rgba(242,130,32,0.12);
    min-height: 80px;
    display: flex;
    align-items: stretch;
}

.vte-tips-track {
    width: 100%;
    position: relative;
    min-height: 80px;
}

.vte-tips-slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 12px 10px;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.42s ease;
}

.vte-tips-slide--active {
    opacity: 1;
    pointer-events: auto;
    position: relative;
}

.vte-tip-icon {
    font-size: 1.35rem;
    color: var(--sj-orange, #F28220);
    flex-shrink: 0;
}

.vte-tip-text {
    font-size: 0.62rem;
    color: var(--sj-text, #1A1D20);
    line-height: 1.5;
    margin: 0;
}

    .vte-tip-text strong {
        color: var(--sj-orange, #F28220);
        font-weight: 700;
    }

/* Nav row: prev arrow · dots · next arrow */
.vte-tips-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    padding: 0 2px;
}

.vte-tips-arrow {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(242,130,32,0.1);
    border: 1px solid rgba(242,130,32,0.22);
    color: var(--sj-orange, #F28220);
    font-size: 1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.16s, transform 0.13s;
    padding: 0;
}

    .vte-tips-arrow:hover {
        background: rgba(242,130,32,0.2);
        transform: scale(1.1);
    }

.vte-tips-dots {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
    flex: 1;
}

.vte-tips-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(0,0,0,0.15);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.22s, transform 0.18s;
    flex-shrink: 0;
}

.vte-tips-dot--active {
    background: var(--sj-orange, #F28220);
    transform: scale(1.3);
}

.vte-tips-dot:hover {
    background: rgba(242,130,32,0.5);
}
