/**
 * Dark mode for module summary lesson tab, inline lesson reader, and fullscreen overlay.
 * Loaded by view_my_module_summary_new.php
 */

/* Lesson panel (.lesson-content-modern.dark-mode) */
.lesson-content-modern.dark-mode {
    background: #1a1a1a;
    /* Do not set color here — it inherits into authored HTML and fights inline/editor colors */
}

.lesson-content-modern.dark-mode .lesson-surface-header {
    border-bottom-color: #333;
}

.lesson-content-modern.dark-mode .lesson-surface-header .tab-pane-title {
    color: #e6edf3;
}

.lesson-content-modern.dark-mode .lesson-section {
    border-bottom-color: #333;
    background: transparent !important;
}

.lesson-content-modern.dark-mode .section-header {
    color: #e6edf3;
}

.lesson-content-modern.dark-mode .section-header .section-title-text {
    color: #e6edf3 !important;
}

.lesson-content-modern.dark-mode .section-header .section-title-display {
    color: #e6edf3 !important;
}

.lesson-content-modern.dark-mode .section-header .section-number-badge {
    color: #cbd5e1 !important;
    background: #243040 !important;
    border: none !important;
}

.lesson-content-modern.dark-mode .section-header:hover {
    background: #243040;
    color: #e6edf3;
}

.lesson-content-modern.dark-mode .section-header:hover .section-title-text {
    color: #e6edf3 !important;
}

.lesson-content-modern.dark-mode .section-header:hover .section-title-display {
    color: #e6edf3 !important;
}

.lesson-content-modern.dark-mode .section-toggle {
    color: #94a3b8;
}

.lesson-content-modern.dark-mode .section-toggle.expanded {
    color: #7dd3fc;
}

.lesson-content-modern.dark-mode .section-header:hover .section-expand-hint {
    opacity: 1;
    color: #52b6ec;
}

.lesson-content-modern.dark-mode .section-expand-hint {
    color: #9fd8ff;
    opacity: 0.9;
}

/* Dark-mode lesson body */
.lesson-content-modern.dark-mode .lesson-section-html {
    background: #0f1720;
    color: #e6edf3;
    border-radius: 8px;
    padding: 12px;
    border: 1px solid #2b3642;
}

/* Dark-mode defaults for non-authored lesson chrome/text around the paper body */
.lesson-content-modern.dark-mode .section-content,
.lesson-content-modern.dark-mode .section-content .section-lesson-body {
    color: #e0e0e0;
}

/* In-browser snippet playground dark chrome: see css/views/content-code_playground.css */

/* In dark mode, convert hardcoded black inline text to readable light text */
.lesson-content-modern.dark-mode .lesson-section-html [style*="color:#000"],
.lesson-content-modern.dark-mode .lesson-section-html [style*="color: #000"],
.lesson-content-modern.dark-mode .lesson-section-html [style*="color:#000000"],
.lesson-content-modern.dark-mode .lesson-section-html [style*="color: #000000"],
.lesson-content-modern.dark-mode .lesson-section-html [style*="color:black"],
.lesson-content-modern.dark-mode .lesson-section-html [style*="color: black"] {
    color: #e6edf3 !important;
}

.lesson-content-modern.dark-mode .lesson-section-html a {
    color: #8ab4f8;
}

/* Dark mode styles for section rating */
.lesson-content-modern.dark-mode .section-rating-container {
    background-color: #2a2a2a !important;
    border-top: 1px solid #444 !important;
    color: #e0e0e0 !important;
}

.lesson-content-modern.dark-mode .section-rating-container .rating-label {
    color: #ffffff !important;
}

.lesson-content-modern.dark-mode .section-rating-container .rating-label strong {
    color: #ffffff !important;
}

.lesson-content-modern.dark-mode .section-rating-container .star-icon {
    color: #ffc107 !important;
}

.lesson-content-modern.dark-mode .section-rating-container .star-icon:hover {
    color: #ffd54f !important;
    transform: scale(1.2);
}

.lesson-content-modern.dark-mode .section-rating-container .rating-feedback {
    color: #e0e0e0 !important;
}

.lesson-content-modern.dark-mode .section-rating-container .rating-feedback .text-success {
    color: #4caf50 !important;
}

.lesson-content-modern.dark-mode .section-rating-container .rating-feedback .text-danger {
    color: #f44336 !important;
}

/* Fullscreen text dark mode */
.fullscreen-main.dark-mode .text-muted {
    color: #b0b0b0 !important;
}

.fullscreen-main.dark-mode .text-center h5 {
    color: #b0b0b0 !important;
}

.fullscreen-main.dark-mode .fa-hand-pointer {
    color: #b0b0b0 !important;
}

.fullscreen-header.dark-mode {
    background: #2d2d2d;
    border-bottom-color: #444;
}

#fullscreen-overlay.dark-mode {
    background: #1a1a1a !important;
}

#fullscreen-overlay.dark-mode .fullscreen-header {
    background: #2d2d2d !important;
    border-bottom-color: #444 !important;
    color: #e0e0e0 !important;
}

#fullscreen-overlay.dark-mode .fullscreen-sidebar {
    background: #2d2d2d !important;
    border-right-color: #444 !important;
    color: #e0e0e0 !important;
}

#fullscreen-overlay.dark-mode .fullscreen-sidebar-header {
    border-bottom-color: #52b6ec !important;
}

#fullscreen-overlay.dark-mode .fullscreen-sidebar-title {
    color: #e0e0e0 !important;
}

#fullscreen-overlay.dark-mode .fullscreen-section-num {
    color: #52b6ec !important;
}

#fullscreen-overlay.dark-mode .fullscreen-section-item.active .fullscreen-section-num {
    color: #7cc7f0 !important;
}

#fullscreen-overlay.dark-mode .fullscreen-main {
    background: #1a1a1a !important;
    /* no blanket text color — avoids inheriting into lesson HTML */
}

#fullscreen-overlay.dark-mode #fullscreen-content-display {
    background: #2d2d2d !important;
    /* no blanket text color */
}

#fullscreen-overlay.dark-mode #fullscreen-content-display .lesson-section-html {
    background: #0f1720 !important;
    color: #e6edf3;
    border-radius: 8px;
    padding: 12px;
    border: 1px solid #2b3642;
}

#fullscreen-overlay.dark-mode #fullscreen-content-display,
#fullscreen-overlay.dark-mode #fullscreen-content-display .section-lesson-body {
    color: #e0e0e0;
}

#fullscreen-overlay.dark-mode #fullscreen-content-display .lesson-section-html [style*="color:#000"],
#fullscreen-overlay.dark-mode #fullscreen-content-display .lesson-section-html [style*="color: #000"],
#fullscreen-overlay.dark-mode #fullscreen-content-display .lesson-section-html [style*="color:#000000"],
#fullscreen-overlay.dark-mode #fullscreen-content-display .lesson-section-html [style*="color: #000000"],
#fullscreen-overlay.dark-mode #fullscreen-content-display .lesson-section-html [style*="color:black"],
#fullscreen-overlay.dark-mode #fullscreen-content-display .lesson-section-html [style*="color: black"] {
    color: #e6edf3 !important;
}

#fullscreen-overlay.dark-mode #fullscreen-content-display .lesson-section-html a {
    color: #8ab4f8;
}

/* Dark mode styles for section rating in fullscreen overlay */
#fullscreen-overlay.dark-mode #fullscreen-content-display .section-rating-container {
    background-color: #2a2a2a !important;
    border-top: 1px solid #444 !important;
    color: #e0e0e0 !important;
}

#fullscreen-overlay.dark-mode #fullscreen-content-display .section-rating-container .rating-label {
    color: #ffffff !important;
}

#fullscreen-overlay.dark-mode #fullscreen-content-display .section-rating-container .rating-label strong {
    color: #ffffff !important;
}

#fullscreen-overlay.dark-mode #fullscreen-content-display .section-rating-container .star-icon {
    color: #ffc107 !important;
}

#fullscreen-overlay.dark-mode #fullscreen-content-display .section-rating-container .star-icon:hover {
    color: #ffd54f !important;
    transform: scale(1.2);
}

#fullscreen-overlay.dark-mode #fullscreen-content-display .section-rating-container .rating-feedback {
    color: #e0e0e0 !important;
}

#fullscreen-overlay.dark-mode #fullscreen-content-display .section-rating-container .rating-feedback .text-success {
    color: #4caf50 !important;
}

#fullscreen-overlay.dark-mode #fullscreen-content-display .section-rating-container .rating-feedback .text-danger {
    color: #f44336 !important;
}

#fullscreen-overlay.dark-mode .fullscreen-section-item {
    color: #e0e0e0 !important;
    border-bottom-color: #444 !important;
}

#fullscreen-overlay.dark-mode .fullscreen-section-label,
#fullscreen-overlay.dark-mode .fullscreen-section-label strong {
    color: #e0e0e0 !important;
}


#fullscreen-overlay.dark-mode .fullscreen-section-item.active {
    background: #1e3a5f !important;
    border-left-color: #52b6ec !important;
}

#fullscreen-overlay.dark-mode .fullscreen-section-item:hover:not(.active) {
    background: #333 !important;
}

/* Dark mode font controls */
#fullscreen-overlay.dark-mode .lesson-reader-group,
#fullscreen-overlay.dark-mode .font-size-controls {
    border-color: #3d4a58;
    background: #1f2933;
    box-shadow: none;
}

#fullscreen-overlay.dark-mode .decrease-btn,
#fullscreen-overlay.dark-mode .reset-btn,
#fullscreen-overlay.dark-mode .increase-btn,
#fullscreen-overlay.dark-mode .lesson-reader-btn,
#fullscreen-overlay.dark-mode .font-control-btn,
#fullscreen-overlay.dark-mode .dark-mode-toggle-btn,
#fullscreen-overlay.dark-mode .close-fullscreen-btn {
    background: #1f2933 !important;
    color: #e6edf3 !important;
    box-shadow: none !important;
    transform: none !important;
}

#fullscreen-overlay.dark-mode .lesson-reader-group .lesson-reader-btn + .lesson-reader-btn,
#fullscreen-overlay.dark-mode .lesson-reader-group .font-control-btn + .font-control-btn {
    border-left-color: #3d4a58 !important;
}

#fullscreen-overlay.dark-mode .decrease-btn:hover,
#fullscreen-overlay.dark-mode .reset-btn:hover,
#fullscreen-overlay.dark-mode .increase-btn:hover,
#fullscreen-overlay.dark-mode .lesson-reader-btn:hover,
#fullscreen-overlay.dark-mode .font-control-btn:hover,
#fullscreen-overlay.dark-mode .dark-mode-toggle-btn:hover {
    background: #2b3947 !important;
    color: #7dd3fc !important;
}

.dark-mode-toggle-btn {
    background: #fff !important;
    color: #334155 !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
}

.dark-mode-toggle-btn:hover {
    background: #f0f7fc !important;
    color: #1586c3 !important;
    transform: none !important;
    box-shadow: none !important;
}

.dark-mode-toggle-btn i {
    font-size: 12px !important;
}

#fullscreen-overlay.dark-mode .dark-mode-toggle-btn {
    background: #1f2933 !important;
    color: #fbbf24 !important;
}

#fullscreen-overlay.dark-mode .dark-mode-toggle-btn:hover {
    background: #2b3947 !important;
    color: #fcd34d !important;
    box-shadow: none !important;
}

#fullscreen-overlay.dark-mode .dark-mode-toggle-btn i {
    color: inherit !important;
}

#fullscreen-overlay.dark-mode .close-fullscreen-btn {
    background: #1f2933 !important;
    color: #fca5a5 !important;
}

#fullscreen-overlay.dark-mode .close-fullscreen-btn:hover {
    background: #3f1d1d !important;
    color: #fecaca !important;
    box-shadow: none !important;
}

.lesson-content-modern.dark-mode .fullscreen-toggle-btn {
    background: #fff !important;
    color: #334155 !important;
}

.lesson-content-modern.dark-mode .fullscreen-toggle-btn:hover {
    background: #f0f7fc !important;
    color: #1586c3 !important;
    box-shadow: none !important;
}

/* Fullscreen dark mode button styling */
.fullscreen-header.dark-mode .fullscreen-controls .btn-outline-dark {
    border-color: #e0e0e0;
    color: #e0e0e0;
}

.fullscreen-header.dark-mode .fullscreen-controls .btn-outline-dark:hover {
    background-color: #e0e0e0;
    color: #1a1a1a;
    border-color: #e0e0e0;
}

.fullscreen-header.dark-mode .fullscreen-controls .btn-outline-secondary {
    border-color: #e0e0e0;
    color: #e0e0e0;
}

.fullscreen-header.dark-mode .fullscreen-controls .btn-outline-secondary:hover {
    background-color: #e0e0e0;
    color: #1a1a1a;
    border-color: #e0e0e0;
}

.fullscreen-sidebar.dark-mode {
    background: #2d2d2d;
    border-right-color: #444;
}

.fullscreen-main.dark-mode {
    background: #1a1a1a;
    /* no blanket text color — lesson body uses .lesson-section-html “paper” with its own defaults */
}

.fullscreen-section-item.dark-mode {
    border-bottom-color: #444;
    color: #e0e0e0;
}

.fullscreen-section-item.dark-mode:hover {
    background-color: #333;
}

.fullscreen-section-item.dark-mode.active {
    background-color: #1e3a5f;
    border-left-color: #52b6ec;
}
