/* =====================================================
   Video Course Player — Public Styles
   Diseño elegante, profesional y moderno
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700&display=swap');

/* ── CSS VARS (overridden by plugin settings inline) ── */
:root {
    --vcp-primary:     #1565C0;
    --vcp-secondary:   #0D47A1;
    --vcp-accent:      #42A5F5;
    --vcp-bg-dark:     #0A0E1A;
    --vcp-bg-panel:    #111827;
    --vcp-bg-card:     #1A2235;
    --vcp-bg-card-alt: #232F46;
    --vcp-text:        #FFFFFF;
    --vcp-text-muted:  #94A3B8;
    --vcp-sidebar-w:   340px;
    --vcp-player-h:    480px;
    --vcp-radius:      14px;
    --vcp-transition:  .25s cubic-bezier(.4,0,.2,1);
}

/* ── WRAP ─────────────────────────────────────────── */
.vcp-wrap {
    font-family: 'Sora', -apple-system, sans-serif;
    background: var(--vcp-bg-dark);
    border-radius: var(--vcp-radius);
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0,0,0,0.55);
    border: 1px solid rgba(255,255,255,0.05);
    max-width: 100%;
    color: var(--vcp-text);
}

/* ── HEADER ───────────────────────────────────────── */
.vcp-header {
    background: linear-gradient(135deg, var(--vcp-primary) 0%, var(--vcp-secondary) 100%);
    padding: 18px 24px;
    position: relative;
    overflow: hidden;
}
.vcp-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}
.vcp-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    position: relative;
}

.vcp-course-title {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 2px;
    line-height: 1.2;
}
.vcp-course-subtitle {
    font-size: 13px;
    color: rgba(255,255,255,0.75);
    margin: 0;
}

.vcp-header-stats {
    display: flex;
    gap: 20px;
}
.vcp-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.vcp-stat-icon { font-size: 16px; opacity: 0.8; }
.vcp-stat-num { font-size: 18px; font-weight: 700; color: #fff; line-height: 1; }
.vcp-stat-label { font-size: 10px; color: rgba(255,255,255,0.65); text-transform: uppercase; letter-spacing: .5px; }

/* ── MODULES BAR ──────────────────────────────────── */
.vcp-modules-bar {
    display: flex;
    align-items: stretch;
    background: var(--vcp-bg-panel);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    position: relative;
}

.vcp-modules-arrow {
    background: rgba(255,255,255,0.04);
    border: none;
    color: var(--vcp-text-muted);
    padding: 0 14px;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    transition: var(--vcp-transition);
    flex-shrink: 0;
}
.vcp-modules-arrow:hover { background: rgba(255,255,255,0.08); color: var(--vcp-text); }

.vcp-modules-track-wrap {
    flex: 1;
    overflow: hidden;
    position: relative;
}
.vcp-modules-track {
    display: flex;
    gap: 2px;
    padding: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-behavior: smooth;
}
.vcp-modules-track::-webkit-scrollbar { display: none; }

.vcp-module-tab {
    flex-shrink: 0;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 10px 16px;
    cursor: pointer;
    transition: var(--vcp-transition);
    min-width: 160px;
    max-width: 200px;
    position: relative;
}
.vcp-module-tab:hover { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.12); }
.vcp-module-tab.active {
    background: var(--vcp-primary);
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.vcp-module-tab-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--vcp-text);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.vcp-module-tab-sub {
    font-size: 11px;
    color: var(--vcp-text-muted);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.vcp-module-tab.active .vcp-module-tab-sub { color: rgba(255,255,255,0.75); }
.vcp-module-tab-meta {
    font-size: 11px;
    color: var(--vcp-text-muted);
    display: flex;
    gap: 4px;
}
.vcp-module-tab.active .vcp-module-tab-meta { color: rgba(255,255,255,0.7); }

/* ── BODY (player + sidebar) ──────────────────────── */
.vcp-body {
    display: flex;
    height: var(--vcp-player-h);
    min-height: 360px;
}

/* ── PLAYER AREA ──────────────────────────────────── */
.vcp-player-area {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: var(--vcp-bg-dark);
}

.vcp-video-wrap {
    flex: 1;
    position: relative;
    background: #000;
    overflow: hidden;
}
.vcp-video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.vcp-video-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity var(--vcp-transition);
}
.vcp-video-overlay.hidden { opacity: 0; pointer-events: none; }

.vcp-big-play {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: transform .2s;
}
.vcp-big-play:hover { transform: scale(1.1); }
.vcp-big-play svg { width: 72px; height: 72px; filter: drop-shadow(0 4px 20px rgba(0,0,0,0.5)); }

/* ── CONTROLS ─────────────────────────────────────── */
.vcp-controls {
    background: var(--vcp-bg-panel);
    padding: 10px 16px 10px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.vcp-progress-wrap {
    position: relative;
    height: 18px;
    display: flex;
    align-items: center;
    margin-bottom: 6px;
    cursor: pointer;
}
.vcp-progress-bg {
    position: absolute;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255,255,255,0.12);
    border-radius: 2px;
    overflow: hidden;
    transition: height .15s;
}
.vcp-progress-wrap:hover .vcp-progress-bg { height: 6px; }

.vcp-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--vcp-primary), var(--vcp-accent));
    border-radius: 2px;
    transition: width .1s linear;
}
.vcp-progress-thumb {
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--vcp-accent);
    border-radius: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    top: 50%;
    opacity: 0;
    transition: opacity .15s, transform .15s;
    pointer-events: none;
    box-shadow: 0 0 8px rgba(66,165,245,0.5);
}
.vcp-progress-wrap:hover .vcp-progress-thumb { opacity: 1; }

.vcp-progress-range {
    position: absolute;
    left: 0; right: 0;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    margin: 0;
    width: 100%;
}

.vcp-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.vcp-controls-left,
.vcp-controls-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.vcp-btn {
    background: none;
    border: none;
    color: var(--vcp-text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 15px;
    transition: color .15s, background .15s;
    font-family: inherit;
}
.vcp-btn:hover { color: var(--vcp-text); background: rgba(255,255,255,0.06); }
.vcp-btn.vcp-play { font-size: 16px; }

.vcp-vol-wrap { display: flex; align-items: center; gap: 4px; }
.vcp-vol-range {
    -webkit-appearance: none;
    width: 64px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255,255,255,0.15);
    outline: none;
    cursor: pointer;
}
.vcp-vol-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--vcp-accent);
    cursor: pointer;
}

.vcp-time {
    font-size: 12px;
    color: var(--vcp-text-muted);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* ── VIDEO INFO ───────────────────────────────────── */
.vcp-video-info {
    padding: 12px 16px;
    background: var(--vcp-bg-panel);
    border-top: 1px solid rgba(255,255,255,0.04);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.vcp-current-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--vcp-text);
    margin: 0 0 2px;
}
.vcp-current-sub {
    font-size: 12px;
    color: var(--vcp-text-muted);
    margin: 0;
}

.vcp-docs-area {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex-shrink: 0;
}
.vcp-doc-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(66,165,245,0.1);
    border: 1px solid rgba(66,165,245,0.2);
    color: var(--vcp-accent);
    text-decoration: none;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    transition: var(--vcp-transition);
}
.vcp-doc-link:hover {
    background: rgba(66,165,245,0.2);
    border-color: var(--vcp-accent);
    color: var(--vcp-accent);
    transform: translateY(-1px);
}

/* ── SIDEBAR ──────────────────────────────────────── */
.vcp-sidebar {
    width: var(--vcp-sidebar-w);
    flex-shrink: 0;
    background: var(--vcp-bg-panel);
    border-left: 1px solid rgba(255,255,255,0.06);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.vcp-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    flex-shrink: 0;
}
.vcp-sidebar-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: var(--vcp-text-muted);
}
.vcp-sidebar-count {
    font-size: 12px;
    color: var(--vcp-text-muted);
    background: rgba(255,255,255,0.05);
    padding: 2px 8px;
    border-radius: 10px;
}

.vcp-sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.1) transparent;
}
.vcp-sidebar-body::-webkit-scrollbar { width: 4px; }
.vcp-sidebar-body::-webkit-scrollbar-track { background: transparent; }
.vcp-sidebar-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* ── VIDEO ITEMS ──────────────────────────────────── */
.vcp-video-item {
    background: var(--vcp-bg-card);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: 10px;
    padding: 12px 14px;
    cursor: pointer;
    transition: var(--vcp-transition);
    margin-bottom: 6px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.vcp-video-item:nth-child(even) { background: var(--vcp-bg-card-alt); }
.vcp-video-item:hover {
    border-color: rgba(66,165,245,0.25);
    transform: translateX(-2px);
}
.vcp-video-item.active {
    background: rgba(21,101,192,0.25);
    border-color: var(--vcp-primary);
    box-shadow: inset 3px 0 0 var(--vcp-accent);
}

.vcp-item-num {
    width: 24px;
    height: 24px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--vcp-text-muted);
    flex-shrink: 0;
    margin-top: 1px;
}
.vcp-video-item.active .vcp-item-num {
    background: var(--vcp-primary);
    color: #fff;
}

.vcp-item-body { flex: 1; min-width: 0; }

.vcp-item-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--vcp-text);
    margin: 0 0 2px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.vcp-item-sub {
    font-size: 11px;
    color: var(--vcp-text-muted);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.vcp-item-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}
.vcp-item-duration {
    font-size: 11px;
    color: var(--vcp-text-muted);
    font-variant-numeric: tabular-nums;
}
.vcp-item-docs {
    font-size: 11px;
    color: var(--vcp-accent);
    opacity: 0.7;
}

.vcp-play-icon {
    font-size: 16px;
    color: var(--vcp-text-muted);
    flex-shrink: 0;
    margin-top: 3px;
    transition: color var(--vcp-transition);
}
.vcp-video-item.active .vcp-play-icon { color: var(--vcp-accent); }

/* ── EMPTY STATE ──────────────────────────────────── */
.vcp-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 12px;
    padding: 40px 20px;
    text-align: center;
}
.vcp-empty-state .vcp-empty-icon {
    font-size: 32px;
    opacity: 0.2;
    color: var(--vcp-accent);
}
.vcp-empty-state p {
    font-size: 13px;
    color: var(--vcp-text-muted);
    margin: 0;
    line-height: 1.5;
}

/* ── RESPONSIVE ───────────────────────────────────── */
@media (max-width: 768px) {
    .vcp-body {
        flex-direction: column;
        height: auto;
    }
    .vcp-sidebar {
        width: 100%;
        border-left: none;
        border-top: 1px solid rgba(255,255,255,0.06);
        max-height: 300px;
    }
    .vcp-video-wrap { min-height: 220px; }
    .vcp-header-stats { display: none; }
    .vcp-course-title { font-size: 17px; }
}
@media (max-width: 480px) {
    .vcp-vol-wrap .vcp-vol-range { display: none; }
}

/* ── VIDEO LOADER ─────────────────────────────────── */
.vcp-video-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 13, 22, 0.7);
    backdrop-filter: blur(2px);
    z-index: 10;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    border-radius: inherit;
}
.vcp-video-loader.visible {
    opacity: 1;
    pointer-events: all;
}
.vcp-spinner {
    width: 52px;
    height: 52px;
    color: var(--vcp-primary, #3B82F6);
    animation: vcp-spin 0.9s linear infinite;
    filter: drop-shadow(0 0 10px rgba(59,130,246,0.5));
}
.vcp-spinner svg {
    width: 100%;
    height: 100%;
}
@keyframes vcp-spin {
    to { transform: rotate(360deg); }
}
