/* Plugin Core Styles - Modern 2 Column Layout */

:root {
    --ead-bg: #f8fafc;
    --ead-white: #ffffff;
    --ead-text-main: #1e293b;
    --ead-text-muted: #64748b;
    --ead-primary: #2563eb;
    --ead-primary-hover: #1d4ed8;
    --ead-success: #10b981;
    --ead-border: #e2e8f0;
    --ead-font: 'Inter', -apple-system, blinkmacsystemfont, 'Segoe UI', roboto, sans-serif;
    --premium-glass: rgba(255, 255, 255, 0.7);
    --premium-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
}

body.single-ead_lesson,
body.single-ead_course {
    background-color: var(--ead-bg);
}

.ead-layout {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100% !important;
    margin: 0;
    font-family: var(--ead-font);
    padding: 0;
    overflow-x: hidden;
    background: var(--ead-bg);
}

/* TOP SECTION (Video area - 100vw Breakout) */
.ead-lesson-top {
    display: flex !important;
    flex-wrap: nowrap !important;
    width: 100vw !important;
    position: relative !important;
    left: 50% !important;
    right: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    background: var(--ead-white) !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    max-width: none !important;
    overflow: hidden !important;
}

.ead-lesson-top .ead-main-content {
    flex: 1 !important;
    background: #000;
    min-width: 0 !important;
    /* Removed display: flex to prevent video collapse */
}

.ead-lesson-top .ead-sidebar {
    width: 380px !important;
    flex: 0 0 380px !important;
    background: var(--ead-white);
    border-left: 1px solid var(--ead-border);
    height: 100%;
    max-height: 100%;
    overflow-y: auto;
    color: var(--ead-text-main);
}

/* BOTTOM SECTION (Centered at 1140px) */
.ead-content-below-video {
    max-width: 1140px !important;
    margin: 0 auto !important;
    width: 100% !important;
    padding: 40px 20px !important;
    box-sizing: border-box !important;
}

@media (min-width: 1140px) {
    .ead-content-below-video,
    .ead-course-header,
    .ead-course-main {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}

.ead-course-header,
.ead-course-main {
    max-width: 1140px;
    margin: 30px auto;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
}

.ead-course-main {
    display: flex;
    gap: 40px;
}

.ead-course-content {
    flex: 1;
    min-width: 0;
}

.ead-course-sidebar {
    width: 350px;
    flex: 0 0 350px;
}

.ead-sidebar-card {
    background: #fff;
    border: 1px solid var(--ead-border);
    border-radius: 12px;
    padding: 25px;
    position: sticky;
    top: 100px;
}

@media (max-width: 991px) {
    .ead-layout {
        flex-direction: column;
        padding: 0;
    }

    .ead-lesson-top {
        flex-direction: column;
    }

    .ead-lesson-top .ead-sidebar {
        width: 100%;
        flex: none;
        max-height: none;
        border-left: none;
        border-top: 1px solid var(--ead-border);
    }

    .ead-course-main {
        flex-direction: column;
        gap: 20px;
    }

    .ead-course-sidebar {
        width: 100%;
        flex: none;
    }
    
    .ead-sidebar-card {
        position: static;
    }
}

/* Breadcrumbs */
.ead-breadcrumbs {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: var(--ead-text-muted);
    margin-bottom: 20px;
}

.ead-breadcrumbs a {
    color: var(--ead-primary);
    text-decoration: none;
    font-weight: 500;
}

.ead-breadcrumbs .material-symbols-outlined {
    font-size: 16px;
    margin: 0 5px;
}

/* Video */
.ead-video-container {
    background: transparent;
    border-radius: 0;
    overflow: hidden;
    margin-bottom: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    width: 100% !important;
}

.ead-video-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9; /* Proper modern aspect ratio */
    max-height: 600px; /* Cap height on large screens */
    background: #000;
    overflow: hidden;
}

.ead-video-wrapper iframe,
.ead-video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    object-fit: cover;
}



.ead-video-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 100px 20px;
    background: #2a2a2a;
    color: #fff;
    text-align: center;
    border-radius: 0;
}

/* Video Overlay for Next Lesson */
.ead-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border-radius: 0;
}

.ead-video-overlay.active {
    opacity: 1;
    visibility: visible;
}

.ead-video-overlay .overlay-content {
    text-align: center;
    color: #fff;
}

.ead-video-overlay h3 {
    color: #fff;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 24px;
}

.ead-video-overlay .ead-mark-btn {
    margin-top: 0;
    /* Override default btn margin */
}

/* Header & Actions */
.ead-lesson-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.ead-lesson-header h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    color: var(--ead-text-main);
    flex: 1;
}

.ead-btn-download {
    display: inline-flex;
    align-items: center;
    background: var(--ead-primary);
    color: var(--ead-white);
    padding: 10px 20px;
    border-radius: 0;
    text-decoration: none;
    transition: background 0.3s;
}

.ead-btn-download:hover {
    background: var(--ead-primary-hover);
    color: var(--ead-white);
}

.ead-btn-download .material-symbols-outlined {
    margin-right: 15px;
    font-size: 24px;
}

.ead-btn-download .btn-text {
    display: flex;
    flex-direction: column;
    font-size: 12px;
    line-height: 1.2;
}

.ead-btn-download .btn-text strong {
    font-size: 14px;
}

/* Premium Tabs & Content Section */
.ead-tabs-container-premium {
    background: var(--ead-white);
    border-radius: 24px;
    padding: 30px;
    box-shadow: var(--premium-shadow);
    border: 1px solid var(--ead-border);
    margin-top: 20px;
    max-width: 100%;
    box-sizing: border-box;
}

.ead-tabs {
    display: flex;
    gap: 15px;
    background: transparent !important;
    padding: 0;
    margin-bottom: 35px;
    border: none;
    flex-wrap: wrap;
}

.ead-tab {
    background: var(--ead-primary);
    border: none;
    padding: 10px 24px;
    font-size: 13px;
    font-weight: 700;
    color: #fff !important;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ead-tab .material-symbols-outlined {
    font-size: 18px;
}

@media (max-width: 768px) {
    .ead-tabs-container-premium {
        padding: 15px 10px;
    }

    .ead-tabs {
        gap: 8px;
        margin-bottom: 25px;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        justify-content: center;
    }
    .ead-tabs::-webkit-scrollbar { display: none; }

    .ead-tab {
        padding: 6px 10px;
        font-size: 10px;
        border-radius: 6px;
        gap: 4px;
        white-space: nowrap;
    }

    .ead-tab .material-symbols-outlined {
        font-size: 14px;
    }
}

.ead-tab:hover {
    background: var(--ead-primary-hover);
    filter: brightness(1.1);
}

.ead-tab.active {
    background: var(--ead-primary);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.ead-tab-content {
    display: none;
}

.ead-tab-content.active {
    display: block;
}

/* Completion Premium Styles */
.ead-lesson-completion-premium {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--ead-border);
}

.ead-mark-btn-premium {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #fff;
    border: none;
    padding: 16px 35px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.3);
}

.ead-mark-btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -5px rgba(37, 99, 235, 0.4);
    filter: brightness(1.1);
}

.ead-mark-btn-premium .material-symbols-outlined {
    font-size: 24px;
}

.ead-completion-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.ead-badge-completed {
    background: #ecfdf5;
    color: #059669;
    padding: 12px 24px;
    border-radius: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #d1fae5;
}

.ead-next-btn-premium {
    background: #fff;
    color: var(--ead-primary);
    border: 2px solid var(--ead-primary);
    padding: 14px 30px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 14px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
}

.ead-next-btn-premium:hover {
    background: var(--ead-primary);
    color: #fff;
}

.ead-description {
    font-size: 16px;
    line-height: 1.8;
    color: var(--ead-text-main);
    word-break: break-word;
    overflow-wrap: break-word;
}

.ead-description img,
.ead-description iframe,
.ead-description video {
    max-width: 100%;
    height: auto;
}

.ead-lesson-completion {
    padding-bottom: 20px;
}

/* Materials Grid Premium */
.ead-materials-grid-premium {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.ead-material-card {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid var(--ead-border);
    border-radius: 16px;
    padding: 20px;
    gap: 20px;
    transition: all 0.3s;
}

.ead-material-card:hover {
    border-color: var(--ead-primary);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.05);
    transform: translateY(-2px);
}

.ead-material-card .material-icon {
    width: 48px;
    height: 48px;
    background: #eff6ff;
    color: var(--ead-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ead-material-card .material-info {
    flex: 1;
}

.ead-material-card .material-info h4 {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 700;
}

.ead-material-card .material-info p {
    margin: 0;
    font-size: 12px;
    color: var(--ead-text-muted);
}

.ead-btn-material-action {
    background: #f1f5f9;
    color: var(--ead-text-main);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.2s;
}

.ead-btn-material-action:hover {
    background: var(--ead-primary);
    color: #fff;
}

/* Sidebar Footer Alignment */
.ead-sidebar-footer {
    padding: 25px 30px;
    border-top: 1px solid var(--ead-border);
    background: #fff;
}

.ead-progress-info {
    width: 100%;
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.ead-progress-bar {
    width: 100%;
    margin-bottom: 25px;
}

.ead-cert-sidebar-link {
    width: 100%;
}

.ead-cert-sidebar-link .ead-mark-btn.success {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
    display: flex;
}

/* Sidebar Accordion Premium - Dark Text for White BG */
.ead-sidebar-header {
    background: #f8fafc;
    padding: 30px;
    border-bottom: 1px solid var(--ead-border);
}

.ead-sidebar-course-title {
    font-size: 0.85em;
    color: var(--ead-text-muted);
    font-weight: 700;
    margin-top: 5px;
}

.ead-module-header {
    background: #fff;
    padding: 20px 30px;
    border-bottom: 1px solid var(--ead-border);
    transition: background 0.2s;
}

.ead-module.active .ead-module-header {
    background: #f1f5f9;
}

.ead-module-header .module-title {
    color: var(--ead-text-main);
    font-weight: 700;
}

.ead-module-header .module-subtitle {
    color: var(--ead-text-muted);
}

.ead-module-header .toggle-icon {
    color: var(--ead-text-muted);
}

.ead-lesson-list li a {
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
    padding: 16px 30px;
    color: var(--ead-text-muted);
}

.ead-lesson-list li a:hover {
    background: #f8fafc;
    color: var(--ead-primary);
}

.ead-lesson-list li.current a {
    background: #eff6ff;
    color: var(--ead-primary);
    border-left: 4px solid var(--ead-primary);
}

.ead-lesson-list li.completed .status-icon {
    color: var(--ead-success);
}

.ead-lesson-list li.current .status-icon {
    color: var(--ead-primary);
}

.ead-lesson-list li .lesson-title {
    font-weight: 500;
    font-size: 14px;
}

.ead-mark-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
    padding: 12px 25px;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    color: #fff !important;
}

.ead-mark-btn.primary {
    background: var(--ead-primary);
    color: var(--ead-white);
}

.ead-mark-btn.success {
    background: var(--ead-success);
    color: var(--ead-white);
    cursor: pointer;
}

/* Sidebar Progress Info */
.ead-sidebar-header {
    padding: 25px;
    border-bottom: 1px solid var(--ead-border);
}

.ead-sidebar-header h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 800;
    color: var(--ead-text-main);
}

.ead-progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 700;
    color: var(--ead-text-muted);
    margin-bottom: 10px;
}

.ead-progress-info .pct {
    color: var(--ead-success);
}

.ead-progress-bar {
    width: 100%;
    height: 6px;
    background: var(--ead-border);
    border-radius: 3px;
    overflow: hidden;
}

.ead-progress-bar .ead-progress-fill {
    height: 100%;
    background: var(--ead-success);
    transition: width 0.5s;
}

/* Sidebar Modules Accordion */
.ead-module-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    background: #fafafa;
    cursor: pointer;
    border-bottom: 1px solid var(--ead-border);
}

.ead-module-header .module-subtitle {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--ead-text-muted);
    margin-bottom: 4px;
    letter-spacing: 1px;
}

.ead-module-header .module-title {
    font-size: 15px;
    color: var(--ead-text-main);
}

.ead-lesson-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ead-lesson-list li a {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    color: var(--ead-text-muted);
    transition: background 0.2s;
}

.ead-lesson-list li a:hover {
    background: #f9f9f9;
}

.ead-lesson-list li.current a {
    background: #e8f4fd;
    color: var(--ead-primary);
}

.ead-lesson-list li .status-icon {
    font-size: 20px;
    margin-right: 15px;
    color: #ccc;
}

.ead-lesson-list li.completed .status-icon {
    color: var(--ead-success);
}

.ead-lesson-list li.current .status-icon {
    color: var(--ead-primary);
}

.ead-lesson-list li .lesson-info {
    flex: 1;
}

.ead-lesson-list li .lesson-title {
    font-size: 14px;
    font-weight: 600;
}

.ead-lesson-list li .action-icon {
    font-size: 20px;
    color: #dadada;
}

.ead-lesson-list li.current .action-icon {
    color: var(--ead-primary);
}

.ead-alert {
    padding: 15px;
    background: #fff3cd;
    color: #856404;
    border-radius: 0;
    border: 1px solid #ffeeba;
    margin-bottom: 20px;
}

/* Course Duration Styles in Cards/Widgets */
.ead-course-duration {
    margin: 0 0 15px 0;
    color: var(--ead-text-muted);
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.ead-course-card:hover .ead-course-duration {
    color: var(--ead-text-main);
}

.ead-duration-icon {
    font-size: 1rem;
    color: var(--ead-primary);
    opacity: 0.8;
}

.ead-duration-text {
    line-height: 1;
}