/**
 * =====================================================
 * TEXT LESSON STYLES
 * File: text-lesson.css
 * Mục đích: Style cho bài học dạng text với typography đẹp
 * =====================================================
 */

/* ========== CSS Variables ========== */
:root {
    --text-lesson-bg: #ffffff;
    --text-lesson-border: #e5e7eb;
    --text-lesson-text: #1e293b;
    --text-lesson-text-muted: #64748b;
    --text-lesson-heading: #0f172a;
    --text-lesson-link: var(--brand-color, #754ffe);
    --text-lesson-code-bg: #f1f5f9;
    --text-lesson-blockquote-border: var(--brand-color, #754ffe);
    --text-lesson-blockquote-bg: #f8fafc;
    --text-lesson-cover-overlay: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.6) 100%);
}

/* ========== Text Lesson Container ========== */
.text-lesson-container {
    background: var(--text-lesson-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
    border: 1px solid var(--text-lesson-border);
}

/* ========== Cover Image ========== */
.text-lesson-cover {
    position: relative;
    width: 100%;
    aspect-ratio: 21 / 9;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
}

.text-lesson-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.text-lesson-cover-overlay {
    position: absolute;
    inset: 0;
    background: var(--text-lesson-cover-overlay);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px 32px;
}

.text-lesson-cover-title {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    line-height: 1.3;
}

.text-lesson-cover-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
}

.text-lesson-cover-meta i {
    margin-right: 6px;
    opacity: 0.8;
}

/* ========== Header (khi không có cover) ========== */
.text-lesson-header {
    padding: 24px 32px 0;
    border-bottom: 1px solid var(--text-lesson-border);
    padding-bottom: 20px;
}

.text-lesson-header-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-lesson-heading);
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.text-lesson-header-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--text-lesson-text-muted);
}

.text-lesson-header-meta i {
    margin-right: 6px;
}

.text-lesson-section-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: rgba(var(--brand-color-rgb, 117, 79, 254), 0.1);
    color: var(--brand-color, #754ffe);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* ========== Content Body ========== */
.text-lesson-body {
    padding: 32px;
}

/* ========== Typography ========== */
.text-lesson-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-lesson-text);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Headings */
.text-lesson-content h1,
.text-lesson-content h2,
.text-lesson-content h3,
.text-lesson-content h4,
.text-lesson-content h5,
.text-lesson-content h6 {
    color: var(--text-lesson-heading);
    font-weight: 700;
    margin-top: 1.5em;
    margin-bottom: 0.75em;
    line-height: 1.3;
}

.text-lesson-content h1 { font-size: 1.75rem; }
.text-lesson-content h2 { font-size: 1.5rem; }
.text-lesson-content h3 { font-size: 1.25rem; }
.text-lesson-content h4 { font-size: 1.1rem; }
.text-lesson-content h5 { font-size: 1rem; }
.text-lesson-content h6 { font-size: 0.95rem; }

.text-lesson-content h1:first-child,
.text-lesson-content h2:first-child,
.text-lesson-content h3:first-child {
    margin-top: 0;
}

/* Paragraphs */
.text-lesson-content p {
    margin-bottom: 1em;
}

.text-lesson-content p:last-child {
    margin-bottom: 0;
}

/* Links */
.text-lesson-content a {
    color: var(--text-lesson-link);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.text-lesson-content a:hover {
    border-bottom-color: var(--text-lesson-link);
}

/* Lists */
.text-lesson-content ul,
.text-lesson-content ol {
    margin-top: 0.6em;
    margin-bottom: 1em;
    padding-left: 1.4em;
}

.text-lesson-content li {
    margin-bottom: 0.25em;
    line-height: 1.65;
}

.text-lesson-content li:last-child {
    margin-bottom: 0;
}

/* WYSIWYG editors thường bọc nội dung li trong <p>; reset margin để list không bị rời rạc */
.text-lesson-content li > p,
.text-lesson-content li p {
    margin: 0 0 0.25em 0;
}
.text-lesson-content li > p:last-child,
.text-lesson-content li p:last-child {
    margin-bottom: 0;
}

/* Loại bỏ <p>&nbsp;</p> hoặc <p></p> trống mà editor hay sinh ra giữa danh sách */
.text-lesson-content p:empty {
    display: none;
}

.text-lesson-content ul li {
    list-style-type: disc;
}

.text-lesson-content ol li {
    list-style-type: decimal;
}

.text-lesson-content ul ul,
.text-lesson-content ol ol,
.text-lesson-content ul ol,
.text-lesson-content ol ul {
    margin-top: 0.3em;
    margin-bottom: 0.3em;
}

/* Images */
.text-lesson-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.25em 0;
    display: block;
}

.text-lesson-content img.aligncenter,
.text-lesson-content img[style*="margin: 0 auto"],
.text-lesson-content img[style*="margin:0 auto"] {
    margin-left: auto;
    margin-right: auto;
}

/* Blockquote */
.text-lesson-content blockquote {
    margin: 1em 0;
    padding: 10px 18px;
    background: var(--text-lesson-blockquote-bg);
    border-left: 4px solid var(--text-lesson-blockquote-border);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--text-lesson-text-muted);
    line-height: 1.6;
}

.text-lesson-content blockquote p {
    margin-bottom: 0.5em;
}

.text-lesson-content blockquote p:last-child {
    margin-bottom: 0;
}

/* Code */
.text-lesson-content code {
    background: var(--text-lesson-code-bg);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'SF Mono', 'Fira Code', Consolas, Monaco, monospace;
    font-size: 0.9em;
    color: #e11d48;
}

.text-lesson-content pre {
    margin: 1.5em 0;
    padding: 16px 20px;
    background: #1e293b;
    border-radius: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    line-height: 1.45;
}

.text-lesson-content pre code {
    background: transparent;
    padding: 0;
    color: #e2e8f0;
    font-size: 0.9rem;
    line-height: 1.45;
    display: block;
}

/* Tables */
.text-lesson-content table {
    width: 100%;
    margin: 1.5em 0;
    border-collapse: collapse;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--text-lesson-border);
}

.text-lesson-content th,
.text-lesson-content td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--text-lesson-border);
}

.text-lesson-content th {
    background: var(--text-lesson-code-bg);
    font-weight: 600;
    color: var(--text-lesson-heading);
}

.text-lesson-content tr:last-child td {
    border-bottom: none;
}

.text-lesson-content tr:hover td {
    background: rgba(0, 0, 0, 0.02);
}

/* Horizontal Rule */
.text-lesson-content hr {
    border: none;
    height: 1px;
    background: var(--text-lesson-border);
    margin: 2em 0;
}

/* Video embeds */
.text-lesson-content iframe {
    max-width: 100%;
    border-radius: 8px;
    margin: 1.5em 0;
}

.text-lesson-content .video-embed,
.text-lesson-content .embed-responsive {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin: 1.5em 0;
    border-radius: 8px;
}

.text-lesson-content .video-embed iframe,
.text-lesson-content .embed-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    margin: 0;
}

/* For Safari - white-space fix: chỉ áp dụng cho text node trực tiếp, không lan ra block elements để khỏi tạo khoảng trống rời rạc giữa list / paragraph */
.text-lesson-content {
    white-space: normal;
}

/* ========== Badges in Header ========== */
.text-lesson-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.text-lesson-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 4px;
}

.text-lesson-badge.badge-free {
    background: #10b981;
    color: #fff;
}

.text-lesson-badge.badge-premium {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
}

.text-lesson-badge.badge-important {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
}

.text-lesson-badge.badge-coming-soon {
    background: #fbbf24;
    color: #1f2937;
}

/* ========== Footer ========== */
.text-lesson-footer {
    padding: 20px 32px;
    border-top: 1px solid var(--text-lesson-border);
    background: #fafbfc;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.text-lesson-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.text-lesson-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-lesson-text);
    background: #fff;
    border: 1px solid var(--text-lesson-border);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.text-lesson-nav-btn:hover {
    color: var(--brand-color, #754ffe);
    border-color: var(--brand-color, #754ffe);
    background: rgba(var(--brand-color-rgb, 117, 79, 254), 0.05);
}

.text-lesson-nav-btn.btn-primary {
    background: var(--brand-color, #754ffe);
    border-color: var(--brand-color, #754ffe);
    color: #fff;
}

.text-lesson-nav-btn.btn-primary:hover {
    background: color-mix(in srgb, var(--brand-color, #754ffe) 90%, #000);
    color: #fff;
}

/* ========== Responsive ========== */
@media (max-width: 992px) {
    .text-lesson-cover {
        aspect-ratio: 16 / 9;
    }
    
    .text-lesson-cover-overlay {
        padding: 20px 24px;
    }
    
    .text-lesson-cover-title {
        font-size: 1.25rem;
    }
    
    .text-lesson-header,
    .text-lesson-body,
    .text-lesson-footer {
        padding-left: 24px;
        padding-right: 24px;
    }
    
    .text-lesson-content {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .text-lesson-cover {
        aspect-ratio: 16 / 10;
    }
    
    .text-lesson-cover-overlay {
        padding: 16px 20px;
    }
    
    .text-lesson-cover-title {
        font-size: 1.1rem;
    }
    
    .text-lesson-cover-meta {
        font-size: 0.8rem;
        gap: 12px;
    }
    
    .text-lesson-header,
    .text-lesson-body,
    .text-lesson-footer {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .text-lesson-body {
        padding-top: 24px;
        padding-bottom: 24px;
    }
    
    .text-lesson-header-title {
        font-size: 1.25rem;
    }
    
    .text-lesson-content {
        font-size: 0.95rem;
        line-height: 1.75;
    }
    
    .text-lesson-content h1 { font-size: 1.5rem; }
    .text-lesson-content h2 { font-size: 1.3rem; }
    .text-lesson-content h3 { font-size: 1.15rem; }
    
    .text-lesson-content pre {
        padding: 16px;
        font-size: 0.85rem;
    }
    
    .text-lesson-footer {
        flex-direction: column;
        align-items: stretch;
    }
    
    .text-lesson-nav {
        width: 100%;
        justify-content: space-between;
    }
    
    .text-lesson-nav-btn {
        flex: 1;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .text-lesson-cover-meta {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .text-lesson-header-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .text-lesson-content th,
    .text-lesson-content td {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
}

/* ========== Dark Mode ========== */
html.dark-mode {
    --text-lesson-bg: #1e293b;
    --text-lesson-border: #334155;
    --text-lesson-text: #e2e8f0;
    --text-lesson-text-muted: #94a3b8;
    --text-lesson-heading: #f1f5f9;
    --text-lesson-code-bg: #0f172a;
    --text-lesson-blockquote-bg: rgba(255, 255, 255, 0.05);
    --text-lesson-cover-overlay: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.75) 100%);
}

html.dark-mode .text-lesson-container {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

html.dark-mode .text-lesson-content code {
    color: #fb7185;
}

html.dark-mode .text-lesson-content pre {
    background: #0f172a;
    border: 1px solid var(--text-lesson-border);
}

html.dark-mode .text-lesson-content th {
    background: #0f172a;
}

html.dark-mode .text-lesson-content tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

html.dark-mode .text-lesson-footer {
    background: #0f172a;
}

html.dark-mode .text-lesson-nav-btn {
    background: var(--text-lesson-bg);
    color: var(--text-lesson-text);
}

html.dark-mode .text-lesson-nav-btn:hover {
    background: rgba(var(--brand-color-rgb, 117, 79, 254), 0.15);
}

/* ========== Print Styles ========== */
@media print {
    .text-lesson-container {
        box-shadow: none;
        border: none;
    }
    
    .text-lesson-cover {
        aspect-ratio: auto;
        height: auto;
        max-height: 200px;
    }
    
    .text-lesson-content {
        font-size: 12pt;
        line-height: 1.6;
    }
    
    .text-lesson-footer {
        display: none;
    }
}


/* ============================================================
 * MOBILE FULL-PAGE READER (Mở toàn trang để đọc)
 * ============================================================ */

/* Button: hidden on desktop, shown on mobile */
.text-lesson-fullpage-btn {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin: 0 0 18px 0;
    padding: 12px 16px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    background: var(--brand-color, #00B87A);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 184, 122, 0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.text-lesson-fullpage-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(0, 184, 122, 0.25);
}
.text-lesson-fullpage-btn i {
    font-size: 1rem;
}

@media (max-width: 991.98px) {
    .text-lesson-fullpage-btn { display: inline-flex; }
    /* Ẩn nội dung text inline trên mobile, học viên đọc qua fullscreen */
    .text-lesson-container .text-lesson-body > .text-lesson-content { display: none !important; }
    /* Cover image cũng có thể thu gọn để nút nổi bật ngay */
    .text-lesson-container .text-lesson-body { padding: 16px; }
}

/* Fullscreen overlay */
.text-lesson-fullscreen {
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 2147483600 !important;
    background: var(--text-lesson-bg, #ffffff);
    display: none;
    flex-direction: column;
    overscroll-behavior: contain;
}
.text-lesson-fullscreen.is-open {
    display: flex;
}
body.text-lesson-fullscreen-open {
    overflow: hidden !important;
    height: 100vh !important;
    position: fixed;
    width: 100%;
}

.text-lesson-fullscreen-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--text-lesson-bg, #ffffff);
    border-bottom: 1px solid var(--text-lesson-border, #e5e7eb);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.text-lesson-fullscreen-close {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--text-lesson-border, #e5e7eb);
    background: #fff;
    border-radius: 50%;
    color: var(--text-lesson-text, #1e293b);
    font-size: 1rem;
    cursor: pointer;
    padding: 0;
}
.text-lesson-fullscreen-close:active { background: #f1f5f9; }
.text-lesson-fullscreen-title {
    flex: 1 1 auto;
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-lesson-heading, #0f172a);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.text-lesson-fullscreen-body {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px 18px 60px;
}
.text-lesson-fullscreen-body .text-lesson-content {
    font-size: 1.05rem;
    line-height: 1.85;
    max-width: 720px;
    margin: 0 auto;
}
.text-lesson-fullscreen-body .text-lesson-content img,
.text-lesson-fullscreen-body .text-lesson-content iframe,
.text-lesson-fullscreen-body .text-lesson-content video,
.text-lesson-fullscreen-body .text-lesson-content table {
    max-width: 100%;
    height: auto;
}
.text-lesson-fullscreen-body .text-lesson-content pre {
    white-space: pre-wrap;
    word-break: break-word;
}

/* Font size controls */
.text-lesson-fullscreen-tools {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}
.text-lesson-fullscreen-tools button {
    width: 34px;
    height: 34px;
    border: 1px solid var(--text-lesson-border, #e5e7eb);
    background: #fff;
    border-radius: 8px;
    color: var(--text-lesson-text, #1e293b);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}
.text-lesson-fullscreen-tools button:active { background: #f1f5f9; }

/* Dark mode */
html.dark-mode .text-lesson-fullscreen,
html.dark-mode .text-lesson-fullscreen-header {
    background: var(--text-lesson-bg, #1e293b);
}
html.dark-mode .text-lesson-fullscreen-close,
html.dark-mode .text-lesson-fullscreen-tools button {
    background: #0f172a;
    color: var(--text-lesson-text, #e2e8f0);
    border-color: var(--text-lesson-border, #334155);
}

/* ============================================================
 * INLINE RATING ở cuối bài text
 * ============================================================ */
.text-lesson-rating-inline {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--text-lesson-border, #e5e7eb);
}
.tlr-card {
    background: linear-gradient(135deg, rgba(0,184,122,0.06), rgba(0,184,122,0.02));
    border: 1px solid rgba(0,184,122,0.18);
    border-radius: 14px;
    padding: 22px;
    text-align: center;
}
.tlr-head { margin-bottom: 14px; }
.tlr-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-lesson-heading, #0f172a);
    margin-bottom: 4px;
}
.tlr-sub {
    font-size: 0.9rem;
    color: var(--text-lesson-text-muted, #64748b);
}
.tlr-stars {
    display: inline-flex;
    gap: 6px;
    margin: 4px 0 8px;
}
.tlr-star {
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 6px;
    font-size: 1.8rem;
    line-height: 1;
    color: #cbd5e1;
    transition: transform 0.12s ease, color 0.12s ease;
}
.tlr-star:hover { transform: scale(1.12); }
.tlr-star i { color: inherit; }
.tlr-star.is-active { color: #fbbf24; }
.tlr-star.is-active i { color: #fbbf24; }
.tlr-label {
    min-height: 22px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #f59e0b;
    margin-bottom: 8px;
}
.tlr-textarea {
    width: 100%;
    min-height: 84px;
    padding: 12px 14px;
    border: 1px solid var(--text-lesson-border, #e5e7eb);
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    line-height: 1.6;
    background: #fff;
    color: var(--text-lesson-text, #1e293b);
    resize: vertical;
    transition: border-color 0.15s ease;
}
.tlr-textarea:focus {
    outline: none;
    border-color: var(--brand-color, #00B87A);
}
.tlr-actions {
    margin-top: 12px;
}
.tlr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border: 0;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}
.tlr-btn-submit {
    background: var(--brand-color, #00B87A);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,184,122,0.25);
}
.tlr-btn-submit:hover:not(:disabled) { transform: translateY(-1px); }
.tlr-btn-submit:disabled {
    background: #cbd5e1;
    color: #fff;
    cursor: not-allowed;
    box-shadow: none;
}
.tlr-msg {
    margin-top: 10px;
    min-height: 18px;
    font-size: 0.88rem;
    color: #e11d48;
}
.tlr-done, .tlr-success {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: rgba(0,184,122,0.08);
    border: 1px solid rgba(0,184,122,0.25);
    border-radius: 12px;
    text-align: left;
}
.tlr-done > i, .tlr-success > i {
    font-size: 2rem;
    color: var(--brand-color, #00B87A);
    flex-shrink: 0;
}
.tlr-done-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-lesson-heading, #0f172a);
    margin-bottom: 2px;
}
.tlr-done-sub {
    font-size: 0.88rem;
    color: var(--text-lesson-text-muted, #64748b);
}

/* Trên mobile: ẩn rating inline ở khung gốc, chỉ hiện khi đã được portal vào reader fullscreen */
@media (max-width: 991.98px) {
    .text-lesson-container .text-lesson-body > .text-lesson-rating-inline {
        display: none !important;
    }
}
.text-lesson-fullscreen-body > .text-lesson-rating-inline {
    display: block !important;
    max-width: 720px;
    margin: 24px auto 40px;
    padding-top: 0;
    border-top: 0;
}

/* Dark mode */
html.dark-mode .tlr-card {
    background: linear-gradient(135deg, rgba(0,184,122,0.10), rgba(0,184,122,0.03));
    border-color: rgba(0,184,122,0.3);
}
html.dark-mode .tlr-textarea {
    background: #0f172a;
    color: var(--text-lesson-text, #e2e8f0);
    border-color: var(--text-lesson-border, #334155);
}
html.dark-mode .tlr-star { color: #475569; }
html.dark-mode .tlr-star.is-active,
html.dark-mode .tlr-star.is-active i { color: #fbbf24 !important; }