/* ============================================================
   Modo oscuro — Detalle de curso RGA (.rga-curso-detalle)
   Anula estilos inline/claros del propio curso_detalle.php
   ============================================================ */

[data-theme="dark"] .rga-curso-detalle {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 45%, #0f172a 100%) !important;
    color: var(--dm-text-primary);
}

[data-theme="dark"] .rga-curso-detalle .rga-bg-orb,
[data-theme="dark"] .rga-curso-detalle .rga-bg-glow,
[data-theme="dark"] .rga-curso-detalle .rga-bg-shape {
    opacity: 0.2 !important;
}

/* ── TOC ── */
[data-theme="dark"] .rga-curso-detalle .rga-toc-item {
    color: #94a3b8;
}
[data-theme="dark"] .rga-curso-detalle .rga-toc-item:hover {
    background: rgba(51, 65, 85, 0.55);
    color: #e2e8f0;
}
[data-theme="dark"] .rga-curso-detalle .rga-toc-item.rga-toc-active {
    background: linear-gradient(135deg, rgba(67, 56, 202, 0.38) 0%, rgba(109, 40, 217, 0.28) 100%);
    color: #c7d2fe;
    border-left-color: #818cf8;
}

/* ── Toolbar edición ── */
[data-theme="dark"] .rga-curso-detalle .rga-tb-btn {
    color: #cbd5e1;
}
[data-theme="dark"] .rga-curso-detalle .rga-tb-btn:hover {
    background: #334155;
    border-color: #475569;
    color: #f1f5f9;
}

/* ── Tipografía contenido ── */
[data-theme="dark"] .rga-curso-detalle .rga-editor-content h2,
[data-theme="dark"] .rga-curso-detalle .rga-desc-seccion h2,
[data-theme="dark"] .rga-curso-detalle .rga-bloque-row h2 {
    color: #f1f5f9;
}
[data-theme="dark"] .rga-curso-detalle .rga-editor-content h3,
[data-theme="dark"] .rga-curso-detalle .rga-desc-seccion h3,
[data-theme="dark"] .rga-curso-detalle .rga-bloque-row h3 {
    color: #e2e8f0;
}
[data-theme="dark"] .rga-curso-detalle .rga-editor-content a,
[data-theme="dark"] .rga-curso-detalle .rga-desc-seccion a,
[data-theme="dark"] .rga-curso-detalle .rga-bloque-row a {
    color: #7dd3fc;
}

/* ── Bloques incrustados ── */
[data-theme="dark"] .rga-curso-detalle .rga-bloque-edit-bar {
    background: rgba(6, 78, 59, 0.22);
    border-color: rgba(45, 212, 191, 0.35);
}
[data-theme="dark"] .rga-curso-detalle .rga-bloque-btn {
    background: rgba(13, 148, 136, 0.35);
    color: #99f6e4;
}
[data-theme="dark"] .rga-curso-detalle .rga-bloque-btn:hover {
    background: rgba(20, 184, 166, 0.45);
}
[data-theme="dark"] .rga-curso-detalle .rga-bloque-btn-del {
    background: rgba(127, 29, 29, 0.45) !important;
    color: #fecaca !important;
}
[data-theme="dark"] .rga-curso-detalle .rga-bloque-btn-del:hover {
    background: rgba(185, 28, 28, 0.55) !important;
}

/* ── Diapositivas / contenido renderizado ── */
[data-theme="dark"] .rga-curso-detalle .diapositiva-contenido h1,
[data-theme="dark"] .rga-curso-detalle .diapositiva-pasos h1,
[data-theme="dark"] .rga-curso-detalle .diapositiva-contenido h2,
[data-theme="dark"] .rga-curso-detalle .diapositiva-pasos h2 {
    color: #f1f5f9;
}
[data-theme="dark"] .rga-curso-detalle .diapositiva-contenido h3,
[data-theme="dark"] .rga-curso-detalle .diapositiva-pasos h3 {
    color: #e2e8f0;
}
[data-theme="dark"] .rga-curso-detalle .diapositiva-contenido p,
[data-theme="dark"] .rga-curso-detalle .diapositiva-pasos p,
[data-theme="dark"] .rga-curso-detalle .diapositiva-contenido li,
[data-theme="dark"] .rga-curso-detalle .diapositiva-pasos li {
    color: #cbd5e1;
}
[data-theme="dark"] .rga-curso-detalle .diapositiva-contenido blockquote,
[data-theme="dark"] .rga-curso-detalle .diapositiva-pasos blockquote {
    background: rgba(30, 41, 59, 0.85);
    border-left-color: #64748b;
    color: #e2e8f0;
}
[data-theme="dark"] .rga-curso-detalle .diapositiva-contenido th {
    background: #334155;
    color: #f1f5f9;
}
[data-theme="dark"] .rga-curso-detalle .diapositiva-contenido td {
    border-color: #475569;
    color: #e2e8f0;
}
[data-theme="dark"] .rga-curso-detalle .diapositiva-contenido code {
    background: #334155;
    color: #e2e8f0;
}

/* ── Drag & drop / playlists ── */
[data-theme="dark"] .rga-curso-detalle .recurso-row.reorder-indicator-top,
[data-theme="dark"] .rga-curso-detalle .recurso-row.reorder-indicator-bottom {
    background-color: rgba(14, 165, 233, 0.14);
}
[data-theme="dark"] .rga-curso-detalle .playlist-track.playlist-drop-before,
[data-theme="dark"] .rga-curso-detalle .playlist-track.playlist-drop-after {
    background-color: rgba(124, 58, 237, 0.12);
}

/* ── Badge nuevo ── */
[data-theme="dark"] .rga-curso-detalle .rga-badge-nuevo {
    background: linear-gradient(135deg, rgba(6, 95, 70, 0.65), rgba(4, 120, 87, 0.5));
    color: #a7f3d0;
    border-color: #059669;
}

/* ── Tarjetas y bordes ── */
[data-theme="dark"] .rga-curso-detalle .border-dashed.border-gray-300 {
    border-color: #475569 !important;
}
[data-theme="dark"] .rga-curso-detalle .border-amber-200 {
    border-color: rgba(245, 158, 11, 0.45) !important;
}
[data-theme="dark"] .rga-curso-detalle .border-l-indigo-300 {
    border-left-color: #6366f1 !important;
}

/* Cabeceras de sección con gradiente suave claro */
[data-theme="dark"] .rga-curso-detalle .rounded-2xl > .border-b[style*="linear-gradient"] {
    background: linear-gradient(to right, rgba(99, 102, 241, 0.18), transparent 65%) !important;
}

/* Widget calificaciones / progreso lateral */
[data-theme="dark"] .rga-curso-detalle #rga-toc-widget .border-b[style*="linear-gradient"] {
    background: linear-gradient(to right, rgba(99, 102, 241, 0.2), transparent) !important;
}

/* Barra bulk acciones */
[data-theme="dark"] .rga-curso-detalle #barraAccionesBulk {
    background: #1e293b !important;
    border-color: #475569 !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45) !important;
}

/* Editor IA / diapositivas — toolbar botones */
[data-theme="dark"] .rga-curso-detalle button.bg-white.border.rounded,
[data-theme="dark"] .rga-curso-detalle label.bg-white.border.rounded-xl {
    background: #334155 !important;
    border-color: #475569 !important;
    color: #e2e8f0 !important;
}
[data-theme="dark"] .rga-curso-detalle button.bg-white.border.rounded:hover {
    background: #475569 !important;
}

/* Checkbox personalizado en listas */
[data-theme="dark"] .rga-curso-detalle .border-gray-300.bg-white {
    background: #334155 !important;
    border-color: #64748b !important;
}

/* KaTeX legible */
[data-theme="dark"] .rga-curso-detalle .katex {
    color: #f1f5f9;
}
