/* ======================================================
 * WooCommerce Course Video Player – Frontend Player CSS
 * ====================================================== */

/* ── Variables ───────────────────────────────────────── */

:root {
    --wcvp-primary: #FF0D9A;
    --wcvp-primary-hover: #4338ca;
    --wcvp-bg-dark: #0f172a;
    --wcvp-bg-sidebar: #1a1a1a;
    --wcvp-bg-module: #334155;
    --wcvp-text-light: #f1f5f9;
    --wcvp-text-muted: #94a3b8;
    --wcvp-border: #334155;
    --wcvp-accent-green: #22c55e;
    --wcvp-accent-amber: #f59e0b;
    --wcvp-radius: 10px;
    --wcvp-transition: 0.2s ease;
}

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

.wcvp-player-wrapper {
    width: 100%;
    margin: 0 auto;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Grid layout ─────────────────────────────────────── */

.wcvp-course-player {
    display: grid;
    grid-template-columns: 70% 30%;
    gap: 0;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    background: var(--wcvp-bg-dark);
}

/* ── Video area ──────────────────────────────────────── */

.wcvp-video-area {
    background: rgba(15, 15, 15, 0.92);
    display: flex;
    flex-direction: column;
}

.wcvp-video-container {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    /* 16:9 */
    background: #000;
}

.wcvp-video-container iframe,
.wcvp-video-container .wcvp-placeholder {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.wcvp-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--wcvp-text-muted);
    gap: 8px;
}

.wcvp-placeholder .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
}

.wcvp-lesson-title-display {
    padding: 18px 24px;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--wcvp-text-light);
    border-top: 1px solid var(--wcvp-border);
}

/* ── Locked overlay ──────────────────────────────────── */

.wcvp-locked-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 15, 15, 0.92);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.wcvp-locked-content {
    text-align: center;
    color: var(--wcvp-text-light);
    padding: 30px;
}

.wcvp-lock-icon {
    font-size: 52px;
    width: 52px;
    height: 52px;
    color: var(--wcvp-accent-amber);
    margin-bottom: 12px;
}
.wcvp-lock-icon svg{ 
    fill: var(--wcvp-accent-amber);
}

.wcvp-locked-content p {
    font-size: 15px;
    margin: 10px 0 22px;
    color: var(--wcvp-text-muted);
    max-width: 340px;
}

.wcvp-buy-btn {
    display: inline-block;
    padding: 12px 36px;
    background: linear-gradient(135deg, #eb0d8e, #FF0D9A);
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 50px;
    font-weight: 600;
    font-size: 15px;
    transition: transform var(--wcvp-transition), box-shadow var(--wcvp-transition);
}

.wcvp-buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px #ff0d9aa6;
}

/* ── Playlist sidebar ────────────────────────────────── */

.wcvp-playlist {
    background: var(--wcvp-bg-sidebar);
    overflow-y: auto;
    max-height: 80vh;
    scrollbar-width: thin;
    scrollbar-color: var(--wcvp-border) transparent;
}

.wcvp-playlist::-webkit-scrollbar {
    width: 6px;
}

.wcvp-playlist::-webkit-scrollbar-thumb {
    background: var(--wcvp-border);
    border-radius: 3px;
}

.wcvp-playlist-heading {
    padding: 20px 20px 16px;
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--wcvp-text-light);
    border-bottom: 1px solid var(--wcvp-border);
    position: sticky;
    top: 0;
    background: var(--wcvp-bg-sidebar);
    z-index: 2;
}

/* ── Module group ────────────────────────────────────── */

.wcvp-module-group {
    border-bottom: 1px solid var(--wcvp-border);
}

.wcvp-module-title {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--wcvp-text-light);
    cursor: pointer;
    transition: background var(--wcvp-transition);
    user-select: none;
}

.wcvp-module-title:hover {
    background: var(--wcvp-bg-module);
}

.wcvp-module-toggle {
    transition: transform var(--wcvp-transition);
    color: var(--wcvp-text-muted);
    font-size: 16px;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
}

.wcvp-module-title.collapsed .wcvp-module-toggle {
    transform: rotate(-90deg);
}

.wcvp-lesson-count {
    margin-left: auto;
    font-size: 12px;
    font-weight: 400;
    color: var(--wcvp-text-muted);
}

/* ── Lesson list ─────────────────────────────────────── */

.wcvp-lesson-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wcvp-lesson-item {
    margin: 0;
    padding: 0;
    transition: background var(--wcvp-transition), color var(--wcvp-transition);
    border-left: 3px solid transparent;
}

.wcvp-lesson-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 20px 11px 40px;
    font-size: 13.5px;
    color: var(--wcvp-text-muted) !important;
    text-decoration: none !important;
    transition: color var(--wcvp-transition);
    width: 100%;
}
.wcvp-locked .wcvp-lesson-link svg{
    fill: var(--wcvp-accent-amber);
}

.wcvp-lesson-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.wcvp-lesson-item:hover .wcvp-lesson-link {
    color: var(--wcvp-text-light) !important;
}

.wcvp-lesson-item.wcvp-active {
    background: rgba(79, 70, 229, 0.12);
    border-left-color: var(--wcvp-primary);
}

.wcvp-lesson-item.wcvp-active .wcvp-lesson-link {
    color: var(--wcvp-text-light) !important;
}

.wcvp-lesson-item.wcvp-locked {
    opacity: 0.65;
}

.wcvp-lesson-play-icon,
.wcvp-lesson-lock-icon {
    font-size: 16px;
    width: 25px;
    height: 25px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.wcvp-lesson-play-icon {
    color: var(--wcvp-primary);
}

.wcvp-lesson-lock-icon {
    color: var(--wcvp-accent-amber);
}

.wcvp-lesson-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Badges ──────────────────────────────────────────── */

.wcvp-badge {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 50px;
    flex-shrink: 0;
}

.wcvp-badge-free {
    background: rgba(34, 197, 94, 0.15);
    color: var(--wcvp-accent-green);
}

.wcvp-badge-private {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.wcvp-badge-enrolled {
    background: rgba(79, 70, 229, 0.15);
    color: #a5b4fc;
}

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

@media (max-width: 900px) {
    .wcvp-course-player {
        grid-template-columns: 1fr;
    }

    .wcvp-playlist {
        max-height: none;
    }
}

@media (max-width: 480px) {
    .wcvp-lesson-title-display {
        font-size: 15px;
        padding: 14px 16px;
    }

    .wcvp-lesson-item {
        padding-left: 28px;
        font-size: 13px;
    }
}