/* ---------------------------------------------------------
   Tutor LMS Single Lesson Styling (Modularized)
   Extracted from style.css
   --------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');

/* Typography Standards for Columns */
.tutor-course-single-sidebar-title,
.lesson-description h3,
.cl-dashboard-login-card h2,
.custom-sidebar-box h4,
/* Chapter Titles (Accordion) */
.tutor-course-topic-single-header h4, 
.tutor-course-topic-single-header,
.tutor-accordion-item-header-title {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 700 !important;
    font-size: 18px !important;
}

/* Curriculum Items - Montserrat */
.tutor-course-single-sidebar-wrapper .tutor-single-lesson-items a {
    font-family: 'Montserrat', sans-serif;
}

/* ---------------------------------------------------------
   3-Column Lesson Layout (Desktop)
   --------------------------------------------------------- */
@media (min-width: 1024px) {
    .tutor-course-single-content-wrapper {
        display: flex;
        flex-wrap: nowrap;
        gap: 20px;
        align-items: flex-start;
        max-width: 1600px;
        margin: 0 auto;
        
        /* Spacing from Header */
        margin-top: 40px; 
    }

    .tutor-course-single-sidebar-wrapper {
        width: 25%;
        min-width: 250px;
        flex-shrink: 0;
    }

    #tutor-single-entry-content {
        flex: 1;
        min-width: 0;
    }

    #custom-lesson-right-sidebar {
        width: 300px;
        flex-shrink: 0;
        display: block;
    }
}

/* ---------------------------------------------------------
   Mobile / Tablet (< 1024px)
   --------------------------------------------------------- */
@media (max-width: 1023px) {
    #custom-lesson-right-sidebar {
        display: none;
    }

    /* Active Modal State */
    #custom-lesson-right-sidebar.mobile-sidebar-active {
        display: block;
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100%;
        background: #fff;
        z-index: 99999;
        padding: 60px 20px 20px;
        overflow-y: auto;
        animation: slideInRight 0.3s ease-in-out;
    }

    @keyframes slideInRight {
        from { transform: translateX(100%); }
        to { transform: translateX(0); }
    }
}

/* ---------------------------------------------------------
   Mobile Toggle Button
   --------------------------------------------------------- */
#mobile-lesson-sidebar-toggle {
    display: none;
}

@media (max-width: 1023px) {
    #mobile-lesson-sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 60px;
        height: 60px;
        border-radius: 50%;
        background-color: var(--color-primary, #0A2838);
        color: #fff;
        border: none;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        z-index: 99998;
        cursor: pointer;
        transition: transform 0.2s;
    }

    #mobile-lesson-sidebar-toggle:hover {
        transform: scale(1.05);
    }

    #mobile-lesson-sidebar-toggle svg {
        width: 28px;
        height: 28px;
    }

    #mobile-lesson-sidebar-toggle.has-notification::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 16px;
        height: 16px;
        background-color: #ff0000;
        border: 2px solid #fff;
        border-radius: 50%;
    }
}

/* Close Button (Mobile Only) */
#mobile-sidebar-close {
    display: none;
}

@media (max-width: 1023px) {
    #mobile-sidebar-close {
        display: block;
        position: absolute;
        top: 20px;
        right: 20px;
        background: transparent;
        border: none;
        cursor: pointer;
        color: #333;
        z-index: 100000;
        font-size: 24px;
    }
}

/* ---------------------------------------------------------
   Right Sidebar Styling
   --------------------------------------------------------- */
#custom-lesson-right-sidebar {
    padding: 0;
}

.custom-sidebar-box {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    font-weight: 500;
    color: #666;
    background-color: #f9f9f9;
}

#lesson-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

#lesson-action-buttons button {
    width: 100%;
}

/* ---------------------------------------------------------
   Comment Truncation ("Read More")
   --------------------------------------------------------- */
.cl-comment-content {
    transition: max-height 0.3s ease;
}

.cl-comment-content.truncated {
    max-height: 80px; /* Approx 4 lines */
    overflow: hidden;
    position: relative;
}

.cl-comment-content.truncated::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background: linear-gradient(to bottom, rgba(249,249,249,0), rgba(249,249,249,1));
}

.cl-read-more {
    font-size: 12px;
    color: var(--color-accent, #F5C140);
    font-weight: 600;
    cursor: pointer;
    margin-top: 4px;
    display: inline-block;
}
.cl-read-more:hover {
    text-decoration: underline;
}
