/* Course Day Page Styling */

:root {
    --darkorange: #FE5201;
    --lightorange: #FFE4D1;
    --darkgrey: #333;
}

/* Transparent navbar for course day pages */
nav {
    background-color: transparent !important;
    border-bottom: none !important;
    z-index: 1000 !important;
    position: relative;
}



nav li a.signup-btn[onclick*="signupModal"] {
    background: transparent !important;
}


body { overflow-x: visible !important; }
:root:has(body.course-day-page) { overflow-x: visible !important; }

.back-button-container {
    margin-bottom: 40px !important;
    margin-top: 20px; 
}

.back-button {
    color: black;
    padding: 6px 14px !important;
    border-radius: 5px;
    border: 1px solid black;
    font-size: 14px;
    text-decoration: none;
    transition: background 0.2s;
}


/* Main wrapper - 90% width */
.course-day-wrapper {
    width: 80%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 0;
}

/* Two-column layout */
.course-day-main {
    display: flex;
    gap: 40px;
}


/* Left sidebar - spy scroll */
.spy-scroll-sidebar {
    width: 250px;
    position: sticky;
    top: 80px;
    height: fit-content;
    flex-shrink: 0;
    text-align: left;
}

.day-title {
    font-size: 1rem;
    font-weight: 500;
    color: #737373;
    margin-bottom: 20px;
    margin-top: 40px;
    padding-bottom: 0;
    border-bottom: none;
}

.spy-scroll-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
    margin: 0;
    padding: 0;
    list-style: none;
}

.spy-item {
    display: block;
    padding: 4px 0;
    color: #737373;
    /* color: #3f464d; */
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    line-height: 1.4;
    font-weight: normal;
    text-align: left;
    width: 100%;
    margin: 0;
}

.spy-item:hover {
    text-decoration: underline;
}

.spy-item.active {
    color: black;
    font-weight: 500;
}

/* Right column - main content */
.course-day-content {
    flex: 1;
    max-width: 800px;
    padding: 0 20px;
}

.day-content {
    line-height: 1.6;
    color: var(--darkgrey);
}

/* Content styling */
.day-content h1 {
    color: var(--darkgrey);
    margin-top: 20px;
    margin-bottom: 20px;
    font-size: 3.5rem;
    font-weight: 600;
}

.day-content h2 {
    color: var(--darkgrey);
    margin-top: 40px;
    margin-bottom: 20px;
    font-size: 2rem;
    font-weight: 600;
}

.day-content h3 {
    color: var(--darkgrey);
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.4rem;
    font-weight: 600;
}

.day-content p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.day-content ul, .day-content ol {
    margin-bottom: 20px;
    padding-left: 30px;
}

.day-content li {
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.day-content code {
    background-color: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.day-content pre {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
}

.day-content pre code {
    background: none;
    padding: 0;
}

/* Image styling */
.day-content img {
    max-width: 80%;
    height: auto;
    display: block;
    margin: 0px auto;
}

/* Make images smaller by default */
/* .day-content img {
    max-width: 60%;
    max-height: 400px;
} */

/* Responsive design */
@media (max-width: 768px) {
    .course-day-main {
        flex-direction: column;
        gap: 20px;
    }
    
    .spy-scroll-sidebar {
        display: none;
    }
    
    .course-day-content {
        order: 2;
        padding: 0;
    }
    
    /* Mobile font size adjustments for better readability */
    .course-day-content h1 {
        font-size: 1.8rem;
    }
    
    .course-day-content h2 {
        font-size: 1.2rem;
    }
    
    .course-day-content h3 {
        font-size: 1.3rem;
    }
    
    .course-day-content h4 {
        font-size: 1.1rem;
    }
    
    .course-day-content p {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    .toggle-solution {
        font-size: 14px!important;
    }
    .complete-day-btn {
        font-size: 14px !important;
    }
    
    .course-day-content li {
        font-size: 0.9rem;
        line-height: 1.5;
    }
    
    .course-day-content .solution {
        font-size: 0.9rem;
    }
    
    .course-day-content .solution p {
        font-size: 0.9rem;
    }
    
    .course-day-content .solution h3 {
        font-size: 1.2rem;
    }
    
    .course-day-content .solution h4 {
        font-size: 1.1rem;
    }
}


.spy-scroll-nav {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.spy-scroll-nav.visible {
    opacity: 1;
}


.solution {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    font-size: 1.1rem;
    margin-bottom: 40px;
}

/* Remove all spacing and dimensions from content inside collapsed solutions */
.solution:not(.open) * {
    margin: 0 !important;
    padding: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    line-height: 0 !important;
    display: none !important;
}

.solution.open {
    padding: 12px;
    margin-top: 10px;
    max-height: none;
    border-radius: 5px;
    border: 1px solid black;
}

.toggle-solution {
    color: black;
    font-family: "Avenir";
    padding: 6px 14px !important;
    background-color: transparent;
    border-radius: 5px;
    border: 1px solid black;
    font-size: var(--font-xs);
    text-decoration: none;
    transition: background 0.2s;
    cursor: pointer;
    margin-bottom: 10px;
}

.toggle-solution.open {
    color: white;
    background-color: black;
}

/* Complete Day Button */
.complete-day-container {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    text-align: left;
}

.complete-day-btn {
    display: inline-flex;
    font-family: "Avenir";
    align-items: center;
    gap: 10px;
    background-color: transparent;
    border: 1px solid #333;
    border-radius: 5px;
    padding: 8px 14px !important;
    font-size: var(--font-xs);
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* .complete-day-btn:hover {
    filter: brightness(0.8);
} */

.complete-day-btn.completed {
    border-color: #08A800;
    background-color: #CFFFDD;
    color: #08A800;
    font-weight: 500;
}

.complete-day-btn i {
    font-size: 18px;
    transition: all 0.3s ease;
}

.complete-day-btn.disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.complete-day-btn.disabled:hover {
    filter: none;
}
