/* MasterStudy LMS Overrides - Force Light Mode and Always Show Curriculum */

/* Force light mode - hide dark mode toggle */
.masterstudy-course-player-header__dark-mode {
    display: none !important;
}

/* Ensure all dark mode classes are overridden to light mode */
.masterstudy-course-player-content_dark-mode,
.masterstudy-course-player-header_dark-mode,
.masterstudy-course-player-navigation_dark-mode,
.masterstudy-course-player-curriculum_dark-mode {
    background: #fff !important;
    color: #001931 !important;
}

.masterstudy-course-player-content_dark-mode .masterstudy-course-player-content__wrapper {
    background: #fff !important;
}

.masterstudy-course-player-content_dark-mode .masterstudy-course-player-content__header h1 {
    color: #001931 !important;
}

.masterstudy-course-player-header_dark-mode {
    background: #eef1f7 !important;
    border-bottom: 1px solid #ddd !important;
}

.masterstudy-course-player-navigation_dark-mode {
    background: #fff !important;
    border-top: 1px solid #dbe0e9 !important;
}

/* Force curriculum to be always visible on desktop */
@media (min-width: 1025px) {
    .masterstudy-course-player-curriculum {
        width: 360px !important;
        margin-left: 0 !important;
    }
    
    /* Hide the curriculum toggle button since it's always open */
    [data-id="masterstudy-curriculum-switcher"] {
        display: none !important;
    }
    
    /* Ensure the content area adjusts properly */
    .masterstudy-course-player-content__wrapper {
        width: 100% !important;
        max-width: none !important;
    }
    
    /* Adjust header navigation area when curriculum is always open */
    .masterstudy-course-player-header__curriculum {
        display: none !important;
    }
}

/* Force curriculum open state */
.masterstudy-course-player-curriculum {
    background: #eef1f7 !important;
    border-right: 1px solid #ddd !important;
}

/* Force scrollbars to always be visible */
.masterstudy-course-player-curriculum,
.masterstudy-course-player-curriculum__content,
.masterstudy-course-player-content__wrapper {
  scrollbar-width: auto!important;
  scrollbar-color: rgb(80, 153, 31) rgb(238, 241, 247)!important;
  
}

.masterstudy-course-player-curriculum__title {
    color: #001931 !important;
}

/* Override any dark mode styles that might be applied */
body .masterstudy-course-player-content_dark-mode * {
    color: inherit !important;
}

/* Ensure curriculum content is always visible */
.masterstudy-course-player-curriculum__content {
    display: flex !important;
}

/* Additional overrides for better curriculum visibility */
@media (min-width: 1025px) {
    /* Ensure curriculum is always in open state */
    .masterstudy-course-player-curriculum:not(.masterstudy-course-player-curriculum_open) {
        width: 360px !important;
        margin-left: 0 !important;
        overflow: visible !important;
    }
    
    /* Force the wrapper to show curriculum content */
    .masterstudy-course-player-curriculum__wrapper {
        display: flex !important;
        width: 360px !important;
        flex-shrink: 0 !important;
    }
    
    /* Ensure content wrapper is visible */
    .masterstudy-course-player-curriculum__content {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        height: 100% !important;
        overflow: scroll !important;
    }
    
    /* Make sure the curriculum title wrapper is visible */
    .masterstudy-course-player-curriculum__title-wrapper {
        display: flex !important;
        flex-direction: column !important;
        width: 360px !important;
        flex-shrink: 0 !important;
        padding: 20px !important;
    }
}

/* Override mobile close button functionality on desktop */
@media (min-width: 1025px) {
    .masterstudy-course-player-curriculum__mobile-close {
        display: none !important;
    }
    
    .masterstudy-course-player-curriculum__mobile-header {
        display: none !important;
    }
}

/* Ensure light mode colors for all curriculum elements */
.masterstudy-course-player-curriculum {
    color: #001931 !important;
}

.masterstudy-course-player-curriculum__mobile-title,
.masterstudy-course-player-curriculum__mobile-close::before {
    color: #4d5e6f !important;
}

/* Force light mode for curriculum accordion items */
.masterstudy-curriculum-accordion_dark-mode,
.masterstudy-curriculum-accordion_dark-mode * {
    background: #eef1f7 !important;
    color: #001931 !important;
    border-color: #ddd !important;
}



.masterstudy-course-player-navigation__send-assignment a.masterstudy-button.masterstudy-button_style-tertiary:hover .masterstudy-button__title {
    color: #fff !important;
}

/* Force all curriculum accordion sections to be open */
.masterstudy-curriculum-accordion__top {
    cursor: default !important; /* Remove pointer cursor since they can't be collapsed */
}

.masterstudy-curriculum-accordion__section {
    background: #3d7518 !important;
    color: #fff !important;
}

.masterstudy-curriculum-accordion__content {
    display: block !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.masterstudy-curriculum-accordion__wrapper {
    display: block !important;
}

/* Ensure accordion items are always in expanded state */
.masterstudy-curriculum-accordion {
    border: 1px solid #ddd !important;
    margin-bottom: 10px !important;
}

.masterstudy-curriculum-accordion:not(.masterstudy-curriculum-accordion_opened) .masterstudy-curriculum-accordion__content {
    display: block !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

/* Force accordion icons to show expanded state */
.masterstudy-curriculum-accordion__top::before,
.masterstudy-curriculum-accordion__top .masterstudy-curriculum-accordion__arrow,
.accordion-expanded::before,
.accordion-expanded .masterstudy-curriculum-accordion__arrow {
    transform: rotate(180deg) !important; /* Point down when expanded */
}

/* Additional styling for expanded accordions */
.accordion-expanded {
    pointer-events: none !important; /* Prevent clicking */
}

.accordion-expanded::before {
    content: "▼" !important; /* Force down arrow */
}

/* Remove any height transitions that might interfere */
.masterstudy-curriculum-accordion__content,
.masterstudy-curriculum-accordion__wrapper {
    transition: none !important;
}

/* Ensure all lesson/material items are visible */
.masterstudy-curriculum-accordion__materials {
    display: block !important;
}

.masterstudy-curriculum-accordion__materials .masterstudy-curriculum-accordion__material {
    display: block !important;
}

/* Assignment and Quiz Button Controls */
/* Hide Submit button on assignments - only show Save button */
.masterstudy-course-player-navigation__send-assignment .masterstudy-button[data-id="masterstudy-course-player-assignments-send-button"],
.masterstudy-course-player-navigation .masterstudy-button[data-id="masterstudy-course-player-assignments-send-button"],
.masterstudy-button[data-id="masterstudy-course-player-assignments-send-button"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    position: absolute !important;
    left: -9999px !important;
}

/* Also target submit buttons by their text content as backup */
.masterstudy-course-player-navigation__send-assignment .masterstudy-button:has(.masterstudy-button__title:contains("Submit")),
.masterstudy-course-player-navigation__send-assignment .masterstudy-button .masterstudy-button__title:contains("Submit") {
    display: none !important;
}

/* Fallback - hide any button containing Submit text in assignment context */
.masterstudy-course-player-navigation__send-assignment .masterstudy-button_style-primary {
    display: none !important;
}

/* Ensure Save button remains visible and properly styled on assignments */
.masterstudy-course-player-navigation__send-assignment .masterstudy-button[data-id="masterstudy-course-player-assignments-save-draft-button"] {
    display: flex !important;
    margin-right: 0 !important; /* Remove margin since submit button is hidden */
    margin-left: auto !important; /* Center the button */
    width: auto !important;
}

/* Fix alignment for assignment navigation container */
.masterstudy-course-player-navigation__send-assignment {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 10px !important;
}

/* Ensure quiz submit button is properly styled and aligned */
.masterstudy-course-player-navigation__submit-quiz {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 10px !important;
}

/* Assignment status indicators */
.masterstudy-curriculum-accordion__check.draft-status {
    background-color: #ff8c00 !important; /* Orange for draft */
    border-color: #ff8c00 !important;
    position: relative !important;
}

.masterstudy-curriculum-accordion__check.draft-status::after {
    content: "✓" !important;
    color: white !important;
    font-size: 12px !important;
    font-weight: bold !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
}

.masterstudy-curriculum-accordion__check.completed-status {
    background-color: #28a745 !important; /* Green for completed */
    border-color: #28a745 !important;
    position: relative !important;
}

.masterstudy-curriculum-accordion__check.completed-status::after {
    content: "✓" !important;
    color: white !important;
    font-size: 12px !important;
    font-weight: bold !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
}

/* Enhanced Save Draft Button Styles */
.masterstudy-assignment-edit__save-draft-enhanced {
    background-color: #28a745 !important;
    color: white !important;
    border-color: #28a745 !important;
}

.masterstudy-assignment-edit__save-draft-enhanced:hover {
    background-color: #218838 !important;
    border-color: #1e7e34 !important;
}

/* Assignment Progress Indicators */
.masterstudy-curriculum-accordion__check.has-content {
    background-color: #ff8c00 !important; /* Orange background for draft */
    border: 2px solid #ff8c00 !important;
    position: relative !important;
    display: inline-block !important;
    width: 20px !important;
    height: 20px !important;
}

.masterstudy-curriculum-accordion__check.has-content::after {
    content: "✓" !important;
    color: white !important;
    font-size: 12px !important;
    font-weight: bold !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

/* Assignment passed indicator (green) */
.masterstudy-curriculum-accordion__check.passed {
    background-color: #28a745 !important; /* Green background for passed */
    border: 2px solid #28a745 !important;
    position: relative !important;
    display: inline-block !important;
    width: 20px !important;
    height: 20px !important;
}

.masterstudy-curriculum-accordion__check.passed::after {
    content: "✓" !important;
    color: white !important;
    font-size: 12px !important;
    font-weight: bold !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

/* Assignment not passed indicator (red) */
.masterstudy-curriculum-accordion__check.not-passed {
    background-color: #dc3545 !important; /* Red background for not passed */
    border: 2px solid #dc3545 !important;
    position: relative !important;
    display: inline-block !important;
    width: 20px !important;
    height: 20px !important;
}

.masterstudy-curriculum-accordion__check.not-passed::after {
    content: "✗" !important;
    color: white !important;
    font-size: 12px !important;
    font-weight: bold !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

/* Current assignment indicator (yellow tick) - takes priority over all other states */
.masterstudy-curriculum-accordion__check.current-assignment,
.masterstudy-curriculum-accordion__check.has-content.current-assignment,
.masterstudy-curriculum-accordion__check.passed.current-assignment,
.masterstudy-curriculum-accordion__check.not-passed.current-assignment {
    background-color: #ffd700 !important; /* Yellow/gold background for current */
    border: 2px solid #ffd700 !important;
    position: relative !important;
    display: inline-block !important;
    width: 20px !important;
    height: 20px !important;
}

.masterstudy-curriculum-accordion__check.current-assignment::after,
.masterstudy-curriculum-accordion__check.has-content.current-assignment::after,
.masterstudy-curriculum-accordion__check.passed.current-assignment::after,
.masterstudy-curriculum-accordion__check.not-passed.current-assignment::after {
    content: "✓" !important;
    color: black !important; /* Black checkmark for better contrast on yellow background */
    font-size: 12px !important;
    font-weight: bold !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

/* Force all accordion sections to be permanently open */
.masterstudy-curriculum-accordion__wrapper {
    display: block !important;
    height: auto !important;
    max-height: none !important;
}

.masterstudy-curriculum-accordion__list {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
}

.masterstudy-curriculum-accordion__content {
    display: block !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

/* Hide accordion toggle arrows since they're always open */
.masterstudy-curriculum-accordion__toggler {
    pointer-events: none !important;
}

.masterstudy-curriculum-accordion__toggler-icon {
    transform: rotate(180deg) !important;
}
