/**
 * WooCommerce Video Courses - Main Styles
 * Version: 4.3
 * Static CSS implementation
 */

/* ==========================================
   ROOT VARIABLES
   ========================================== */
:root {
    --wvc-primary: #0073aa;
    --wvc-secondary: #005a87;
    --wvc-accent: #28a745;
    --wvc-danger: #dc3545;
    --wvc-warning: #ffc107;
    --wvc-info: #17a2b8;
    --wvc-light: #f8f9fa;
    --wvc-dark: #343a40;
    --wvc-text: #333333;
    --wvc-text-muted: #6c757d;
    --wvc-border: #dee2e6;
    --wvc-shadow: rgba(0,0,0,0.1);
    --wvc-radius: 6px;
    --wvc-transition: all 0.3s ease;
}

/* ==========================================
   MY COURSES GRID
   ========================================== */
.wvc-my-courses-container {
    margin: 30px 0;
}

.wvc-my-courses-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.wvc-my-courses-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Course Card */
.wvc-course-card {
    background: #ffffff;
    border: 1px solid var(--wvc-border);
    border-radius: var(--wvc-radius);
    padding: 20px;
    box-shadow: 0 2px 4px var(--wvc-shadow);
    transition: var(--wvc-transition);
    text-decoration: none;
    display: block;
}

.wvc-course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: var(--wvc-primary);
}

.wvc-course-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 15px;
}

.wvc-course-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--wvc-text);
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.wvc-course-excerpt {
    font-size: 14px;
    color: var(--wvc-text-muted);
    line-height: 1.6;
    margin-bottom: 15px;
}

.wvc-course-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--wvc-border);
}

.wvc-course-btn,
.wvc-btn {
    background: var(--wvc-primary);
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: var(--wvc-transition);
}

.wvc-course-btn:hover,
.wvc-btn:hover {
    background: var(--wvc-secondary);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* ==========================================
   NO COURSES MESSAGE
   ========================================== */
.wvc-no-courses {
    text-align: center;
    padding: 60px 20px;
    background: var(--wvc-light);
    border-radius: var(--wvc-radius);
    max-width: 600px;
    margin: 40px auto;
}

.wvc-no-courses h3 {
    font-size: 24px;
    color: var(--wvc-text);
    margin-bottom: 15px;
}

.wvc-no-courses p {
    font-size: 16px;
    color: var(--wvc-text-muted);
    margin-bottom: 25px;
    line-height: 1.6;
}

.wvc-no-courses .wvc-btn {
    font-size: 16px;
    padding: 12px 28px;
}

/* ==========================================
   ACCESS MESSAGES
   ========================================== */
.wvc-access-denied,
.wvc-login-required {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-left: 4px solid #f39c12;
    border-radius: var(--wvc-radius);
    padding: 20px;
    margin: 20px 0;
    max-width: 800px;
}

.wvc-access-denied h3,
.wvc-login-required h2 {
    color: #856404;
    font-size: 20px;
    margin-bottom: 10px;
}

.wvc-access-denied p,
.wvc-login-required p {
    color: #856404;
    margin-bottom: 15px;
}

.wvc-purchase-btn,
.wvc-login-btn {
    background: var(--wvc-warning);
    color: var(--wvc-text);
    border: 1px solid #ffc107;
}

.wvc-purchase-btn:hover,
.wvc-login-btn:hover {
    background: #e0a800;
    border-color: #d39e00;
}

/* My Courses Login Required */
.wvc-mc-login-required {
    background: #e3f2fd;
    border: 1px solid #90caf9;
    border-left: 4px solid #2196f3;
    text-align: center;
    padding: 40px;
    border-radius: var(--wvc-radius);
}

.wvc-mc-login-required h3 {
    color: #1565c0;
    font-size: 24px;
    margin-bottom: 15px;
}

.wvc-mc-login-required p {
    color: #1565c0;
    font-size: 16px;
    margin-bottom: 20px;
}

/* ==========================================
   VARIABLE PRODUCT ACCESS
   ========================================== */
.wvc-variable-access-container {
    padding: 30px;
    background: var(--wvc-light);
    border-radius: var(--wvc-radius);
    margin: 20px 0;
}

.wvc-variable-access-container h2 {
    font-size: 28px;
    color: var(--wvc-text);
    margin-bottom: 10px;
}

.wvc-variable-access-container > p {
    font-size: 18px;
    color: var(--wvc-text-muted);
    margin-bottom: 30px;
}

.wvc-variation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.wvc-variation-card {
    background: white;
    border: 2px solid var(--wvc-border);
    border-radius: var(--wvc-radius);
    padding: 20px;
    text-align: center;
    transition: var(--wvc-transition);
}

.wvc-variation-card:hover {
    border-color: var(--wvc-primary);
    transform: translateY(-5px);
    box-shadow: 0 4px 12px var(--wvc-shadow);
}

.wvc-duration-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--wvc-text);
    margin-bottom: 10px;
}

.wvc-price {
    font-size: 24px;
    color: var(--wvc-primary);
    font-weight: 700;
    margin-bottom: 15px;
}

.wvc-variation-btn {
    background: var(--wvc-accent);
    color: white;
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    transition: var(--wvc-transition);
}

.wvc-variation-btn:hover {
    background: #218838;
}

/* ==========================================
   VIDEO PLAYER
   ========================================== */
.wvc-course-videos {
    margin: 40px 0;
}

.wvc-course-videos h3 {
    font-size: 24px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--wvc-border);
}

.wvc-video-container {
    position: relative;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    margin-bottom: 20px;
    background: #000;
    border-radius: var(--wvc-radius);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.wvc-video-container iframe,
.wvc-video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.wvc-video-wrapper {
    margin-bottom: 20px;
    border-radius: var(--wvc-radius);
    overflow: hidden;
}

.wvc-video-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.wvc-video-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: var(--wvc-light);
    margin-bottom: 10px;
    border-radius: var(--wvc-radius);
    transition: var(--wvc-transition);
}

.wvc-video-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.wvc-video-thumbnail {
    width: 120px;
    height: 67px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 15px;
}

.wvc-video-info {
    flex: 1;
}

.wvc-video-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.wvc-video-duration {
    color: var(--wvc-text-muted);
    font-size: 14px;
}

.wvc-video-progress {
    width: 100%;
    height: 4px;
    background: var(--wvc-border);
    border-radius: 2px;
    margin-top: 8px;
    overflow: hidden;
}

.wvc-video-progress-bar {
    height: 100%;
    background: var(--wvc-accent);
    transition: width 0.3s ease;
}

/* ==========================================
   MESSAGE BOXES
   ========================================== */
.wvc-message-box {
    padding: 20px;
    border-radius: var(--wvc-radius);
    margin: 20px 0;
}

.wvc-message-box.info {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    color: #1565c0;
}

.wvc-message-box.success {
    background: #e8f5e8;
    border-left: 4px solid #4caf50;
    color: #2e7d32;
}

.wvc-message-box.warning {
    background: #fff3cd;
    border-left: 4px solid #ff9800;
    color: #856404;
}

.wvc-message-box.error {
    background: #ffebee;
    border-left: 4px solid #f44336;
    color: #c62828;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */
@media (max-width: 1024px) {
    .wvc-my-courses-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .wvc-variation-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .wvc-my-courses-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .wvc-variation-grid {
        grid-template-columns: 1fr;
    }
    
    .wvc-course-card {
        padding: 15px;
    }
    
    .wvc-video-item {
        flex-direction: column;
        text-align: center;
    }
    
    .wvc-video-thumbnail {
        width: 100%;
        height: auto;
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    .wvc-no-courses {
        padding: 40px 15px;
    }
    
    .wvc-course-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .wvc-course-btn,
    .wvc-btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .wvc-course-title {
        font-size: 16px;
    }
    
    .wvc-course-excerpt {
        font-size: 13px;
    }
    
    .wvc-my-courses-container {
        margin: 15px 0;
    }
    
    .wvc-access-denied,
    .wvc-login-required {
        padding: 15px;
    }
}

/* ==========================================
   UTILITY CLASSES
   ========================================== */
.wvc-text-center { text-align: center; }
.wvc-text-left { text-align: left; }
.wvc-text-right { text-align: right; }

.wvc-mt-0 { margin-top: 0; }
.wvc-mt-1 { margin-top: 10px; }
.wvc-mt-2 { margin-top: 20px; }
.wvc-mt-3 { margin-top: 30px; }

.wvc-mb-0 { margin-bottom: 0; }
.wvc-mb-1 { margin-bottom: 10px; }
.wvc-mb-2 { margin-bottom: 20px; }
.wvc-mb-3 { margin-bottom: 30px; }

.wvc-p-0 { padding: 0; }
.wvc-p-1 { padding: 10px; }
.wvc-p-2 { padding: 20px; }
.wvc-p-3 { padding: 30px; }

.wvc-hidden { display: none; }
.wvc-visible { display: block; }

/* ==========================================
   ANIMATIONS
   ========================================== */
@keyframes wvc-fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes wvc-slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@keyframes wvc-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.wvc-animate-fadeIn {
    animation: wvc-fadeIn 0.5s ease;
}

.wvc-animate-slideIn {
    animation: wvc-slideIn 0.3s ease;
}

.wvc-animate-pulse {
    animation: wvc-pulse 2s infinite;
}

/* ==========================================
   THEME COMPATIBILITY
   ========================================== */
.wvc-course-videos *,
.wvc-my-courses-container *,
.wvc-access-denied *,
.wvc-login-required *,
.wvc-variable-access-container * {
    box-sizing: border-box;
}

/* Reset theme styles that might interfere */
.wvc-course-videos ul,
.wvc-course-videos ol {
    margin-left: 0;
    padding-left: 0;
    list-style-position: inside;
}

.wvc-course-videos a {
    text-decoration: none;
}

.wvc-course-videos img {
    max-width: 100%;
    height: auto;
}