﻿ 
/* Namespaced CSS - All classes prefixed with 'cd-' to avoid Bootstrap/MDB conflicts */
.cd-root {
    --cd-background: 0 0% 100%;
    --cd-foreground: 210 20% 10%;
    --cd-card: 0 0% 100%;
    --cd-card-foreground: 210 20% 10%;
    --cd-primary: 205 76% 24%;
    --cd-primary-foreground: 0 0% 100%;
    --cd-secondary: 210 20% 96%;
    --cd-secondary-foreground: 210 20% 10%;
    --cd-muted: 210 20% 96%;
    --cd-muted-foreground: 210 15% 45%;
    --cd-border: 210 20% 90%;
    --cd-ring: 205 76% 24%;
    --cd-radius: 0.5rem;
}

.cd-root {
    font-family: 'Lato', sans-serif;
    background-color: hsl(var(--cd-background));
    color: hsl(var(--cd-foreground));
    line-height: 1.6;  
    box-sizing: border-box;
}

    .cd-root *, .cd-root *::before, .cd-root *::after {
        box-sizing: border-box; 
       
    }

/* Layout */
.cd-app-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* Sidebar */
.cd-sidebar {
    width: 288px;
    border-right: 1px solid hsl(var(--cd-border));
    background-color: hsl(var(--cd-background));
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.cd-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
}

.cd-sidebar-group {
    margin-bottom: 16px;
    margin-top: 5px;
}

.cd-sidebar-group-label {
    font-size: 12px;
    font-weight: 600;
    color: hsl(var(--cd-muted-foreground));
    padding: 8px 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cd-sidebar-menu {
    list-style: none;
    padding: 0px 7px;
}

.cd-sidebar-menu-item {
    padding: 0 8px;
}

.cd-sidebar-menu-button {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--cd-radius);
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    color: hsl(var(--cd-foreground));
    transition: background-color 0.2s;
}

    .cd-sidebar-menu-button:hover {
        background-color: hsl(var(--cd-muted));
    }

    .cd-sidebar-menu-button.cd-active {
        background-color: hsl(var(--cd-primary) / 0.1);
        color: hsl(var(--cd-primary));
    }

    .cd-sidebar-menu-button svg {
        width: 18px;
        height: 18px;
        flex-shrink: 0;
    }

    .cd-sidebar-menu-button .cd-flex-between {
        flex: 1;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .cd-sidebar-menu-button .cd-progress-text {
        font-size: 12px;
        color: hsl(var(--cd-muted-foreground));
    }

/* Video list in sidebar */
.cd-video-list {
    padding: 0 8px;
}

.cd-video-list-item {
    width: 100%;
    text-align: left;
    padding: 5px;
    border-radius: var(--cd-radius);
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    transition: background-color 0.2s;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
}

    .cd-video-list-item:hover {
        background-color: hsl(var(--cd-muted) / 0.5);
    }

    .cd-video-list-item.cd-active {
        background-color: hsl(var(--cd-primary) / 0.1);
        color: hsl(var(--cd-primary));
    }

    .cd-video-list-item .cd-item-content {
        display: flex;
        align-items: flex-start;
        gap: 8px;
    }

    .cd-video-list-item .cd-check-icon {
        width: 16px;
        height: 16px;
        margin-top: 2px;
        flex-shrink: 0;
        /* color: #22c55e;*/
        color: #3568c8;
    }

    .cd-video-list-item .cd-empty-circle {
        width: 16px;
        height: 16px;
        margin-top: 2px;
        flex-shrink: 0;
        border: 2px solid hsl(var(--cd-border));
        border-radius: 50%;
    }

    .cd-video-list-item .cd-item-text {
        flex: 1;
        min-width: 0;
    }

    .cd-video-list-item .cd-item-title {
        font-weight: 500;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .cd-video-list-item .cd-item-meta {
        font-size: 12px;
        color: hsl(var(--cd-muted-foreground));
    }

/* Next topic section */
.cd-next-topic-section {
    padding: 16px;
    border-top: 1px solid hsl(var(--cd-border));
    border-bottom: 1px solid hsl(var(--cd-border));
}

.cd-next-topic-label {
    font-size: 12px;
    font-weight: 500;
    color: hsl(var(--cd-muted-foreground));
    margin-bottom: 8px;
}

.cd-next-topic-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border: 1px solid hsl(var(--cd-border));
    border-radius: var(--cd-radius);
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    color: hsl(var(--cd-foreground));
    text-decoration: none;
    transition: background-color 0.2s;
}

    .cd-next-topic-btn:hover {
        background-color: hsl(var(--cd-muted));
    }

    .cd-next-topic-btn svg {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
    }

/* Overall progress */
.cd-overall-progress-section {
    margin-top: auto;
    padding: 16px;
    border-top: 1px solid hsl(var(--cd-border));
}

.cd-overall-progress-label {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.cd-progress-bar {
    height: 8px;
    background-color: hsl(var(--cd-muted));
    border-radius: 9999px;
    overflow: hidden;
}

.cd-progress-bar-fill {
    height: 100%;
    background-color: hsl(var(--cd-primary));
    border-radius: 9999px;
    transition: width 0.3s ease;
}

/* Main content */
.cd-main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* Header */
.cd-header {
    height: 64px;
    border-bottom: 1px solid hsl(var(--cd-border));
    background-color: hsl(var(--cd-background) / 0.95);
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(8px);
}

.cd-header-content {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

.cd-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cd-sidebar-trigger {
    width: 36px;
    height: 36px;
    display: none;
    align-items: center;
    justify-content: center;
    border: 1px solid hsl(var(--cd-border));
    border-radius: var(--cd-radius);
    background: transparent;
    cursor: pointer;
}

    .cd-sidebar-trigger svg {
        width: 20px;
        height: 20px;
    }

.cd-header-info h1 {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.2;
}

.cd-header-badges {
    display: flex;
    gap: 6px;
    margin-top: 4px;
}

.cd-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    background-color: hsl(211.8, 51.5%, 93.5%);
    color: hsl(206.8, 59.4%, 12.5%);
    border-radius: 9999px;
    text-wrap: nowrap;
    /* font-weight: 500; */
    letter-spacing: 1px;
}

.cd-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cd-header-progress-text {
    text-align: right;
}

    .cd-header-progress-text p:first-child {
        font-size: 14px;
        font-weight: 500;
    }

    .cd-header-progress-text p:last-child {
        font-size: 12px;
        color: hsl(var(--cd-muted-foreground));
    }

.cd-header-progress-bar {
    width: 128px;
}

/* Main area */
.cd-main-area {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

.cd-content-container {
    max-width: 1440px;
    margin: 0 auto;
}

/* Card */
.cd-card {
    background-color: hsl(var(--cd-card));
    border: 1px solid hsl(var(--cd-border));
    border-radius: var(--cd-radius);
    overflow: hidden;
}

/* Video player */
.cd-video-player {
    aspect-ratio: 16 / 9;
    background-color: #000;
}

    .cd-video-player iframe {
        width: 100%;
        height: 100%;
        border: none;
    }

.cd-video-info {
    padding: 24px;
}

.cd-video-info-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.cd-video-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.cd-video-meta {
    display: flex;
    gap: 16px;
    font-size: 14px;
    color: hsl(var(--cd-muted-foreground));
}

    .cd-video-meta span {
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .cd-video-meta svg {
        width: 16px;
        height: 16px;
    }

.cd-video-complete-icon {
    width: 24px;
    height: 24px;
    color: #22c55e;
}

/* Progress cards grid */
.cd-progress-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.cd-progress-card {
    padding: 24px;
}

.cd-progress-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.cd-progress-card-title {
    font-size: 14px;
    font-weight: 600;
}

.cd-progress-card-icon {
    width: 20px;
    height: 20px;
}

    .cd-progress-card-icon.cd-blue {
        color: #3b82f6;
    }

    .cd-progress-card-icon.cd-emerald {
        color: #10b981;
    }

    .cd-progress-card-icon.cd-amber {
        color: #f59e0b;
    }

    .cd-progress-card-icon.cd-purple {
        color: #8b5cf6;
    }

.cd-progress-card .cd-progress-bar {
    height: 8px;
    margin-bottom: 8px;
}

.cd-progress-card-text {
    font-size: 14px;
    color: hsl(var(--cd-muted-foreground));
}

/* Next topic card */
.cd-next-topic-card {
    margin-top: 24px;
    padding: 24px;
    background-color: hsl(var(--cd-muted) / 0.3);
}

.cd-next-topic-card-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cd-next-topic-card h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.cd-next-topic-card p {
    font-size: 14px;
    color: hsl(var(--cd-muted-foreground));
}

.cd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: var(--cd-radius);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.cd-btn-primary {
    background-color: hsl(var(--cd-primary));
    color: hsl(var(--cd-primary-foreground));
}

    .cd-btn-primary:hover {
        opacity: 0.9;
    }

.cd-btn svg {
    width: 16px;
    height: 16px;
}

/* Notes, MCQs, Subjective sections */
.cd-content-section {
    max-width: 1440px;
    margin: 0 auto;
}

.cd-section-card {
    padding: 32px;
}

.cd-section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
}

.cd-item-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cd-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border: 1px solid hsl(var(--cd-border));
    border-radius: var(--cd-radius);
    cursor: pointer;
    transition: background-color 0.2s;
}

    .cd-list-item:hover {
        background-color: hsl(var(--cd-muted) / 0.5);
    }

.cd-list-item-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.cd-list-item .cd-check-icon {
    width: 20px;
    height: 20px;
    color: #22c55e;
}

.cd-list-item .cd-empty-circle {
    width: 20px;
    height: 20px;
    border: 2px solid hsl(var(--cd-border));
    border-radius: 50%;
}

.cd-list-item-title {
    font-weight: 500;
}

.cd-list-item-meta {
    font-size: 14px;
    color: hsl(var(--cd-muted-foreground));
}

/* Hidden sections */
.cd-hidden {
    display: none !important;
}

/* Responsive */
@media (max-width: 1024px) {
    .cd-progress-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .cd-sidebar {
        position: fixed;
        left: -288px;
        top: 0;
        bottom: 0;
        z-index: 50;
        transition: left 0.3s ease;
    }

        .cd-sidebar.cd-open {
            left: 0;
        }

    .cd-sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 40;
    }

        .cd-sidebar-overlay.cd-open {
            display: block;
        }

    .cd-sidebar-trigger {
        display: flex;
    }

    .cd-header-right {
        display: none;
    }

    .cd-progress-grid {
        grid-template-columns: 1fr;
    }

    .cd-next-topic-card-content {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}
@media (min-width: 992px) {

    /* Sidebar fixed on left */
    .cd-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 260px; /* adjust as per your real width */
        height: 100vh;
        background: #fff;
        border-right: 1px solid #ddd;
        z-index: 1000;
    }

    .cd-sidebar-content {
        height: 100%;
        overflow-y: auto;
        padding: 6px 0;
    }

    /* Header fixed on top */
    .cd-header {
        position: fixed;
        top: 0;
        left: 260px; /* match sidebar width */
        width: calc(100% - 260px);
        background: #fff;
        border-bottom: 1px solid #ddd;
        z-index: 999;
    }

    .cd-header-content {
        height: 64px; /* adjust to your current header height */
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 24px;
    }

    /* Main content should not hide behind sidebar or header */
    .cd-main-content {
        margin-left: 260px;
        margin-top: 64px;
        padding: 16px;
    }
}
/* Globally apply to everything OR selectively to sidebar/content */
.cd-sidebar-content,
.cd-main-content {
    scrollbar-width: thin; /* For Firefox */
    scrollbar-color: #999 #f5f5f5; /* scrollbar-thumb, scrollbar-track colors */
}

    /* Chrome, Edge, Safari */
    .cd-sidebar-content::-webkit-scrollbar,
    .cd-main-content::-webkit-scrollbar {
        width: 3px; /* scrollbar thickness */
        height: 6px;
    }

    .cd-sidebar-content::-webkit-scrollbar-track,
    .cd-main-content::-webkit-scrollbar-track {
        background: #f5f5f5; /* scrollbar track color */
    }

    .cd-sidebar-content::-webkit-scrollbar-thumb,
    .cd-main-content::-webkit-scrollbar-thumb {
        background-color: #999; /* scrollbar color */
        border-radius: 3px;
    }

        .cd-sidebar-content::-webkit-scrollbar-thumb:hover,
        .cd-main-content::-webkit-scrollbar-thumb:hover {
            background-color: #666; /* darker on hover */
        }
/* Fixed header on mobile + scrollable main content */
@media (max-width: 991px) {
    /* Fix the header at the top */
    .cd-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        z-index: 1000;
        background: #fff; /* Keep background solid so content doesn't bleed through */
        border-bottom: 1px solid #ddd; /* Optional subtle divider */
    }

    /* Ensure its content layout stays the same */
    .cd-header-content {
        height: 64px; /* Or your desired mobile header height */
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 14px;
    }

    /* Main area scrolls but leaves space for fixed header */
    .cd-main-area {
        flex: 1;
        padding: 5px; /* your existing padding */
        overflow-y: auto; /* makes content scrollable */
        margin-top: 64px; /* same as header height */
    }
    .cd-sidebar-group { 
        margin-top: 40px;
    }
}
.nav-bar button {
    padding: 2px 6px;
    font-size: 12px;
    line-height: 1;
    border-radius: 4px;
    height: 24px;
    display: flex;
    align-items: center;
    gap: 4px; 
    --tw-bg-opacity: 1;
    background-color: rgb(254 243 199 / var(--tw-bg-opacity, 1));
 
}
 