/**
 * Course Content Styles
 * Styles for NewGen Editor content display in frontend course pages
 * 
 * Project: Sharing Digital Kommunity (SDK)
 * Developer: KreativeStudio
 */

/* =================================================================
   NOTIFICATION BLOCKS
   ================================================================= */

.course-description-content .notification-block {
    border-radius: 0.75rem;
    margin: 1rem 0;
    padding: 1rem;
    border-left: 4px solid;
    position: relative;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.course-description-content .notification-block[data-type="info"] {
    background-color: #eff6ff;
    border-left-color: #3b82f6;
    color: #1e40af;
}

.course-description-content .notification-block[data-type="warning"] {
    background-color: #fffbeb;
    border-left-color: #f59e0b;
    color: #92400e;
}

.course-description-content .notification-block[data-type="error"] {
    background-color: #fef2f2;
    border-left-color: #ef4444;
    color: #dc2626;
}

.course-description-content .notification-block[data-type="success"] {
    background-color: #f0fdf4;
    border-left-color: #10b981;
    color: #047857;
}

.course-description-content .notification-block .font-semibold {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.course-description-content .notification-block p {
    margin: 0;
    line-height: 1.5;
}

/* Dark mode notification blocks */
html[data-theme="dark"] .course-description-content .notification-block[data-type="info"] {
    background-color: rgba(59, 130, 246, 0.1);
    color: #93c5fd;
}

html[data-theme="dark"] .course-description-content .notification-block[data-type="warning"] {
    background-color: rgba(245, 158, 11, 0.1);
    color: #fbbf24;
}

html[data-theme="dark"] .course-description-content .notification-block[data-type="error"] {
    background-color: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
}

html[data-theme="dark"] .course-description-content .notification-block[data-type="success"] {
    background-color: rgba(16, 185, 129, 0.1);
    color: #6ee7b7;
}

/* =================================================================
   TABLES
   ================================================================= */

.course-description-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.course-description-content th,
.course-description-content td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.course-description-content th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.course-description-content td {
    color: #4b5563;
}

.course-description-content tr:last-child td {
    border-bottom: none;
}

.course-description-content tr:hover {
    background-color: #f9fafb;
}

/* Dark mode tables */
html[data-theme="dark"] .course-description-content table {
    background: #1f2937;
}

html[data-theme="dark"] .course-description-content th {
    background: #374151;
    color: #f9fafb;
}

html[data-theme="dark"] .course-description-content td {
    color: #d1d5db;
    border-bottom-color: #374151;
}

html[data-theme="dark"] .course-description-content tr:hover {
    background-color: #374151;
}

/* =================================================================
   TEXT FORMATTING
   ================================================================= */

.course-description-content {
    line-height: 1.6;
    color: #374151; /* Default text color for light theme */
}

/* Dark theme text color */
html[data-theme="dark"] .course-description-content {
    color: #d1d5db !important;
}

/* Override for all child elements */
html[data-theme="dark"] .course-description-content * {
    color: inherit !important;
}

html[data-theme="light"] .course-description-content {
    color: #374151 !important;
}

html[data-theme="light"] .course-description-content * {
    color: inherit !important;
}

.course-description-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.course-description-content p:last-child {
    margin-bottom: 0;
}

.course-description-content h1,
.course-description-content h2,
.course-description-content h3,
.course-description-content h4,
.course-description-content h5,
.course-description-content h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.course-description-content h1:first-child,
.course-description-content h2:first-child,
.course-description-content h3:first-child,
.course-description-content h4:first-child,
.course-description-content h5:first-child,
.course-description-content h6:first-child {
    margin-top: 0;
}

.course-description-content h1 { font-size: 2rem; }
.course-description-content h2 { font-size: 1.75rem; }
.course-description-content h3 { font-size: 1.5rem; }
.course-description-content h4 { font-size: 1.25rem; }
.course-description-content h5 { font-size: 1.125rem; }
.course-description-content h6 { font-size: 1rem; }

.course-description-content strong,
.course-description-content b {
    font-weight: 600;
}

.course-description-content em,
.course-description-content i {
    font-style: italic;
}

.course-description-content u {
    text-decoration: underline;
}

.course-description-content del,
.course-description-content s {
    text-decoration: line-through;
}

.course-description-content code {
    background-color: #f3f4f6;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-family: 'JetBrains Mono', 'Consolas', 'Monaco', monospace;
    font-size: 0.875em;
}

html[data-theme="dark"] .course-description-content code {
    background-color: #374151;
    color: #e5e7eb;
}

.course-description-content pre {
    background-color: #f3f4f6;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1rem 0;
}

html[data-theme="dark"] .course-description-content pre {
    background-color: #1f2937;
    color: #e5e7eb;
}

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

/* =================================================================
   LISTS
   ================================================================= */

.course-description-content ul,
.course-description-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.course-description-content ul {
    list-style-type: disc;
}

.course-description-content ol {
    list-style-type: decimal;
}

.course-description-content li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.course-description-content ul ul,
.course-description-content ol ol,
.course-description-content ul ol,
.course-description-content ol ul {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

/* =================================================================
   LINKS
   ================================================================= */

.course-description-content a {
    color: #3b82f6;
    text-decoration: underline;
    transition: color 0.2s ease;
}

.course-description-content a:hover {
    color: #1d4ed8;
}

html[data-theme="dark"] .course-description-content a {
    color: #60a5fa;
}

html[data-theme="dark"] .course-description-content a:hover {
    color: #93c5fd;
}

/* =================================================================
   BLOCKQUOTES
   ================================================================= */

.course-description-content blockquote {
    border-left: 4px solid #d1d5db;
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #6b7280;
}

html[data-theme="dark"] .course-description-content blockquote {
    border-left-color: #4b5563;
    color: #9ca3af;
}

/* =================================================================
   IMAGES
   ================================================================= */

.course-description-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1rem 0;
}

/* =================================================================
   HORIZONTAL RULES
   ================================================================= */

.course-description-content hr {
    border: none;
    height: 1px;
    background-color: #e5e7eb;
    margin: 2rem 0;
}

html[data-theme="dark"] .course-description-content hr {
    background-color: #374151;
}

/* =================================================================
   RESPONSIVE DESIGN
   ================================================================= */

@media (max-width: 768px) {
    .course-description-content .notification-block {
        padding: 0.75rem;
        margin: 0.75rem 0;
    }
    
    .course-description-content table {
        font-size: 0.875rem;
    }
    
    .course-description-content th,
    .course-description-content td {
        padding: 0.5rem 0.75rem;
    }
    
    .course-description-content h1 { font-size: 1.75rem; }
    .course-description-content h2 { font-size: 1.5rem; }
    .course-description-content h3 { font-size: 1.25rem; }
}