/**
 * ========================================================
 * Course Blocks \2014 Atomes WYSIWYG partagés
 * ========================================================
 * CSS atoms identiques entre l'éditeur (preview) et la vue élève.
 * Garantit la fidélité WYSIWYG (What You See Is What You Get).
 *
 * Inclusion : header.php (vue élève) + course-editor.php (éditeur)
 * ========================================================
 */

/* ── Titre principal (H1) \2014 text-3xl font-black mb-6 ─── */

.mro-heading-1 {
    font-size: 1.875rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    margin-top: 0.5rem;
    color: var(--md-sys-color-on-surface);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* ── Sous-titre (H2) \2014 text-xl font-bold mb-4 opacity-70 */

.mro-heading-2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    margin-top: 0.25rem;
    color: var(--md-sys-color-on-surface-variant);
    line-height: 1.3;
}

/* ── Paragraphe \2014 body text ───────────────────────────── */

.mro-paragraph {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1rem;
    color: var(--md-sys-color-on-surface);
}

.mro-paragraph b,
.mro-paragraph strong {
    font-weight: 700;
}

.mro-paragraph i,
.mro-paragraph em {
    font-style: italic;
}

.mro-paragraph code {
    background: var(--md-sys-color-surface-variant);
    border: 1px solid var(--md-sys-color-outline);
    padding: 1px 6px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.88em;
    color: var(--md-sys-color-error);
}

.mro-paragraph a {
    color: var(--md-sys-color-secondary);
    text-decoration: underline;
}

.mro-paragraph s {
    text-decoration: line-through;
    opacity: 0.6;
}

.mro-paragraph u {
    text-decoration: underline;
}

/* Couleur inline appliquée via contenteditable foreColor */
.mro-paragraph font[color] {
    font-family: inherit;
    font-size: inherit;
}

/* ── Liste MRO (gold bullet points) ──────────────────── */

.mro-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 1rem;
}
.mro-list li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 8px;
    line-height: 1.6;
    font-size: 1rem;
    color: var(--md-sys-color-on-surface);
}
.mro-list li[data-level="1"] { margin-left: 24px; }
.mro-list li[data-level="2"] { margin-left: 48px; }

/* ── Marqueurs partagés ────────────────────────────────── */
.mro-list li::before {
    position: absolute;
    left: 0;
    top: 0;
    line-height: 1.6;
}

/* ── NIVEAU 0 ─────────────────────────────────────────── */
.mro-list[data-type-0="bullet"] li[data-level="0"]::before {
    content: "•";
    color: var(--md-sys-color-primary);
    font-size: 1.3rem;
    line-height: 1.3;
}
.mro-list[data-type-0="number"] { counter-reset: mro-c0; }
.mro-list[data-type-0="number"] li[data-level="0"] { counter-increment: mro-c0; }
.mro-list[data-type-0="number"] li[data-level="0"]::before {
    content: counter(mro-c0) ".";
    font-weight: 700;
    color: var(--md-sys-color-primary);
    font-size: 0.9rem;
}
.mro-list[data-type-0="letter"] { counter-reset: mro-a0; }
.mro-list[data-type-0="letter"] li[data-level="0"] { counter-increment: mro-a0; }
.mro-list[data-type-0="letter"] li[data-level="0"]::before {
    content: counter(mro-a0, upper-alpha) ".";
    font-weight: 700;
    color: var(--md-sys-color-primary);
    font-size: 0.9rem;
}
.mro-list[data-type-0="dash"] li[data-level="0"]::before {
    content: "–";
    color: var(--md-sys-color-outline);
    font-weight: 600;
}

/* ── NIVEAU 1 ─────────────────────────────────────────── */
/* Reset des compteurs de niveau 1 à chaque item de niveau 0 */
.mro-list[data-type-1="number"] li[data-level="0"] { counter-reset: mro-c1; }
.mro-list[data-type-1="letter"] li[data-level="0"] { counter-reset: mro-a1; }
.mro-list[data-type-1="number"] li[data-level="1"] { counter-increment: mro-c1; }
.mro-list[data-type-1="letter"] li[data-level="1"] { counter-increment: mro-a1; }

.mro-list[data-type-1="dash"] li[data-level="1"]::before {
    content: "–";
    color: var(--md-sys-color-outline);
    font-weight: 600;
}
.mro-list[data-type-1="bullet"] li[data-level="1"]::before {
    content: "◦";
    color: var(--md-sys-color-primary);
    font-size: 1.1rem;
    line-height: 1.4;
}
.mro-list[data-type-1="number"] li[data-level="1"]::before {
    content: counter(mro-c1) ".";
    color: var(--md-sys-color-primary);
    font-size: 0.88rem;
}
.mro-list[data-type-1="letter"] li[data-level="1"]::before {
    content: counter(mro-a1, lower-alpha) ".";
    color: var(--md-sys-color-primary);
    font-size: 0.88rem;
}

/* ── NIVEAU 2 ─────────────────────────────────────────── */
/* Reset à chaque item de niveau 0 ou 1 */
.mro-list[data-type-2="number"] li[data-level="0"],
.mro-list[data-type-2="number"] li[data-level="1"] { counter-reset: mro-c2; }
.mro-list[data-type-2="letter"] li[data-level="0"],
.mro-list[data-type-2="letter"] li[data-level="1"] { counter-reset: mro-a2; }
.mro-list[data-type-2="number"] li[data-level="2"] { counter-increment: mro-c2; }
.mro-list[data-type-2="letter"] li[data-level="2"] { counter-increment: mro-a2; }

.mro-list[data-type-2="dash"] li[data-level="2"]::before {
    content: "–";
    color: var(--md-sys-color-outline);
}
.mro-list[data-type-2="bullet"] li[data-level="2"]::before {
    content: "▪";
    color: var(--md-sys-color-outline);
    font-size: 0.85rem;
    line-height: 1.8;
}
.mro-list[data-type-2="number"] li[data-level="2"]::before {
    content: counter(mro-c2, lower-roman) ".";
    color: var(--md-sys-color-outline);
    font-size: 0.85rem;
}
.mro-list[data-type-2="letter"] li[data-level="2"]::before {
    content: counter(mro-a2, lower-alpha) ".";
    color: var(--md-sys-color-outline);
    font-size: 0.85rem;
}

/* ── Bouton CTA (cyan, rounded-full, ArrowRight) ─────── */

.mro-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--md-sys-color-secondary);
    color: var(--md-sys-color-on-secondary);
    border-radius: 9999px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: transform var(--md-sys-motion-duration, 200ms) var(--md-sys-motion-easing, ease),
                box-shadow var(--md-sys-motion-duration, 200ms) var(--md-sys-motion-easing, ease);
    border: none;
    cursor: pointer;
}

.mro-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(38, 180, 216, 0.25);
}

.mro-cta__icon {
    font-size: 20px;
}

/* ── Code Block ──────────────────────────────────────── */

.mro-code {
    border-radius: var(--md-sys-shape-corner-small);
    overflow: hidden;
    margin-bottom: 1rem;
}

.mro-code__header {
    background: #1E1E2E;
    padding: 8px 16px;
    font-size: 0.75rem;
    color: var(--md-sys-color-primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(221, 175, 37, 0.2);
}

.mro-code pre {
    margin: 0;
    border-radius: 0;
}

/* ── Image Block ──────────────────────────────────────── */

.mro-image {
    text-align: center;
    margin-bottom: 1rem;
}

.mro-image__img {
    border-radius: var(--md-sys-shape-corner-medium);
    max-width: 100%;
    display: inline-block;
    cursor: zoom-in;
    transition: opacity 0.2s, transform 0.2s;
}
.mro-image__img:hover {
    opacity: 0.92;
    transform: scale(1.005);
}
.mro-image__caption {
    font-size: 0.85rem;
    color: var(--md-sys-color-on-surface-variant, #666);
    margin-top: 8px;
    font-style: italic;
}

/* ── Gallery Block ────────────────────────────────────── */

.mro-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 1rem;
}

.mro-gallery__item {
    margin: 0;
}

.mro-gallery__img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: var(--md-sys-shape-corner-medium);
    cursor: zoom-in;
    transition: opacity 0.2s, transform 0.2s;
}
.mro-gallery__img:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.mro-gallery__caption {
    font-size: 0.8rem;
    color: var(--md-sys-color-on-surface-variant, #666);
    margin-top: 4px;
    text-align: center;
}

/* ── Columns Block ────────────────────────────────────── */

.mro-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 1.5rem;
    align-items: start;
}

/* Variantes d'alignement vertical */
.mro-columns[data-align="start"]  { align-items: start; }
.mro-columns[data-align="center"] { align-items: center; }
.mro-columns[data-align="end"]    { align-items: end; }

.mro-columns__col {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mro-columns__col > *:last-child {
    margin-bottom: 0;
}

.mro-columns__col .mro-heading-1,
.mro-columns__col .mro-heading-2 {
    margin-bottom: 0.5rem;
}

.mro-columns__col .mro-paragraph {
    margin-bottom: 0.5rem;
}

.mro-columns__col .mro-image {
    margin-bottom: 0;
}

.mro-columns__col .mro-image__img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: var(--md-sys-shape-corner-large);
}

@media (max-width: 768px) {
    .mro-columns {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ── Citation / Blockquote ────────────────────────────── */

.mro-citation {
    position: relative;
    padding: 40px 48px;
    margin-bottom: 1.5rem;
    background: #1a1a2e;
    border-radius: var(--md-sys-shape-corner-large);
    font-size: 1.35rem;
    line-height: 1.6;
    color: var(--md-sys-color-primary);
    font-weight: 700;
    font-style: normal;
    overflow: hidden;
}

.mro-citation::before {
    content: '\201C';
    position: absolute;
    top: 12px;
    left: 20px;
    font-size: 5rem;
    color: var(--md-sys-color-primary);
    opacity: 0.2;
    font-style: normal;
    line-height: 1;
    font-weight: 900;
}

.mro-citation::after {
    content: '\201D';
    position: absolute;
    bottom: 8px;
    right: 24px;
    font-size: 5rem;
    color: var(--md-sys-color-primary);
    opacity: 0.2;
    font-style: normal;
    line-height: 1;
    font-weight: 900;
}

.mro-citation p {
    position: relative;
    z-index: 1;
    margin: 0;
}

.mro-citation__author {
    display: block;
    margin-top: 16px;
    font-size: 0.9rem;
    font-style: normal;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.3px;
}

/* ── Separator / Divider ──────────────────────────────── */

.mro-separator {
    border: none;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--md-sys-color-primary), var(--md-sys-color-secondary), transparent);
    margin: 2rem 0;
    opacity: 0.4;
}

/* ── Spacer ───────────────────────────────────────────── */

.mro-spacer {
    height: 40px;
}

/* ── Inline Code (partagé) ────────────────────────────── */

.inline-code {
    background: var(--md-sys-color-surface-variant);
    border: 1px solid var(--md-sys-color-outline);
    padding: 1px 6px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.88em;
    color: var(--md-sys-color-error);
}

/* ── Visionneuse 3D (model-viewer) ────────────────────── */

.mro-3d-viewer {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    background: var(--md-sys-color-surface-variant);
}

.mro-3d-viewer__frame {
    width: 100%;
    height: 600px;
    border: none;
    border-radius: 28px;
    display: block;
}

.mro-3d-viewer model-viewer {
    width: 100%;
    height: 600px;
    border-radius: 28px;
    --poster-color: var(--md-sys-color-surface-variant);
}

.mro-3d-viewer__caption {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--md-sys-color-on-surface-variant);
    margin-top: 8px;
    text-align: center;
}

.mro-3d-viewer__caption .material-symbols-outlined {
    font-size: 14px;
}

/* ── Boutons plein écran 3D viewer ───────────────────── */
.mro-3d-viewer__fullscreen-btn {
    position: absolute;
    bottom: 56px;
    right: 16px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: var(--md-sys-color-primary, #DDAF25);
    color: #111;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,.4);
    transition: background .2s, transform .15s;
}
.mro-3d-viewer__fullscreen-btn:hover {
    background: #C49A20;
    transform: scale(1.08);
}
.mro-3d-viewer__fullscreen-btn .material-symbols-outlined {
    font-size: 24px;
}
.mro-3d-viewer__close-btn {
    display: none;
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10000;
    width: 52px;
    height: 52px;
    border: none;
    border-radius: 50%;
    background: var(--md-sys-color-primary, #DDAF25);
    color: #111;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,.6);
    transition: background .2s, transform .15s;
}
.mro-3d-viewer__close-btn:hover {
    background: #C49A20;
    transform: scale(1.1);
}
.mro-3d-viewer__close-btn .material-symbols-outlined {
    font-size: 28px;
}
/* Overlay fullscreen state */
.mro-3d-viewer--fullscreen {
    position: fixed !important;
    inset: 0;
    z-index: 9999;
    width: 100vw !important;
    height: 100vh !important;
    border-radius: 0 !important;
    background: #000;
    margin: 0 !important;
}
.mro-3d-viewer--fullscreen .mro-3d-viewer__frame {
    height: 100vh !important;
    border-radius: 0 !important;
}
.mro-3d-viewer--fullscreen .mro-3d-viewer__fullscreen-btn {
    display: none;
}
.mro-3d-viewer--fullscreen .mro-3d-viewer__caption {
    display: none;
}
.mro-3d-viewer--fullscreen .mro-3d-viewer__close-btn {
    display: flex;
}

/* ── PDF Viewer ─────────────────────────────────────────── */

.mro-pdf-viewer {
    border-radius: var(--md-sys-shape-corner-medium);
    overflow: hidden;
    background: var(--md-sys-color-surface-variant);
    border: 1px solid var(--md-sys-color-outline);
    margin-bottom: 1rem;
}

.mro-pdf-viewer__frame {
    width: 100%;
    height: 700px;
    border: none;
    display: block;
}

.mro-pdf-viewer__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: var(--md-sys-color-surface);
    border-bottom: 1px solid var(--md-sys-color-outline);
    font-size: 0.85rem;
    color: var(--md-sys-color-on-surface-variant);
}

/* ── Video Block ────────────────────────────────────────── */

.mro-video {
    border-radius: var(--md-sys-shape-corner-large, 16px);
    overflow: hidden;
    background: #000;
    margin-bottom: 1rem;
}

.mro-video__player {
    width: 100%;
    display: block;
    max-height: 600px;
    object-fit: contain;
    background: #000;
}

.mro-video__iframe-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
}

.mro-video__iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.mro-video__caption {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--md-sys-color-surface-variant);
    font-size: 0.88rem;
    color: var(--md-sys-color-on-surface);
    margin: 0;
}

.mro-video__caption .material-symbols-outlined {
    font-size: 18px;
    color: var(--md-sys-color-secondary);
}

/* Indicateur d'interactivité pour l'aide utilisateur */
.mro-3d-viewer::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 28px;
    pointer-events: none;
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.mro-3d-viewer:hover::after {
    border-color: var(--md-sys-color-primary);
}

/* ══════════════════════════════════════════════════════════
   Spacing : quand les blocs sont dans un conteneur flex-gap,
   on supprime les margin-bottom individuels pour éviter le
   double-espacement (gap + margin).
   ══════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════
   Sources / Ressources téléchargeables \2014 Dark theme
   ═══════════════════════════════════════════════════════════ */
.mro-sources {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid rgba(200, 169, 81, 0.25);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.mro-sources__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(200, 169, 81, 0.2);
}

.mro-sources__header > .material-symbols-outlined {
    font-size: 24px;
    color: #c8a951;
}

.mro-sources__title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #f0ece4;
    margin: 0;
}

.mro-sources__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mro-sources__item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
}

.mro-sources__item:hover {
    border-color: rgba(200, 169, 81, 0.5);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.mro-sources__thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mro-sources__icon {
    font-size: 22px;
    color: #c8a951;
    flex-shrink: 0;
}

.mro-sources__label {
    flex: 1;
    font-size: 0.95rem;
    font-weight: 500;
    color: #e8e4dc;
}

.mro-sources__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    background: linear-gradient(135deg, #c8a951, #b8963e);
    color: #1a1a2e;
    transition: all 0.2s ease;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(200, 169, 81, 0.3);
}

.mro-sources__btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(200, 169, 81, 0.4);
    background: linear-gradient(135deg, #d4b85e, #c8a951);
}

.mro-sources__btn .material-symbols-outlined {
    font-size: 16px;
}

.lesson-content__blocs > .mro-heading-1,
.lesson-content__blocs > .mro-heading-2,
.lesson-content__blocs > .mro-paragraph,
.lesson-content__blocs > .mro-list,
.lesson-content__blocs > .mro-citation,
.lesson-content__blocs > .mro-separator,
.lesson-content__blocs > .mro-image,
.lesson-content__blocs > .mro-gallery,
.lesson-content__blocs > .mro-code,
.lesson-content__blocs > .mro-columns,
.lesson-content__blocs > .mro-3d-viewer,
.lesson-content__blocs > .mro-pdf-viewer,
.lesson-content__blocs > .mro-video,
.lesson-content__blocs > .mro-sources,
.lesson-content__blocs > .mro-cta,
.lesson-content__blocs > figure,
.lesson-content__blocs > blockquote,
.lesson-content__blocs > hr,
.lesson-content__blocs > div,
.lesson-content__blocs > pre {
    margin-top: 0;
    margin-bottom: 0;
}

/* ══════════════════════════════════════════════════════════
   THEME LIGHT \2014 Surcharges course-blocks
   ══════════════════════════════════════════════════════════ */

[data-theme="light"] .mro-code__header {
    background: #f5f5f5;
    color: var(--md-sys-color-primary-dark);
    border-bottom-color: rgba(221, 175, 37, 0.3);
}
[data-theme="light"] .mro-citation {
    background: #f8f6f0;
    color: #5a4800;
}
[data-theme="light"] .mro-citation__author {
    color: #888;
}
[data-theme="light"] .mro-sources {
    background: linear-gradient(135deg, #faf8f4 0%, #f0eeea 100%);
    border-color: rgba(200, 169, 81, 0.3);
    box-shadow: var(--md-sys-elevation-1);
}
[data-theme="light"] .mro-sources__title {
    color: #333;
}
[data-theme="light"] .mro-sources__icon {
    color: #b8963e;
}
[data-theme="light"] .mro-sources__label {
    color: #444;
}
[data-theme="light"] .mro-sources__item {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}
[data-theme="light"] .mro-sources__item:hover {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(200, 169, 81, 0.5);
}
[data-theme="light"] .mro-sources__btn {
    color: #fff;
}

/* ── Tableau (Table Block) ────────────────────────────── */

.mro-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1.5rem;
    border-radius: var(--md-sys-shape-corner-medium, 12px);
    border: 1px solid var(--md-sys-color-outline);
}

.mro-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--md-sys-color-on-surface);
}

.mro-table caption {
    padding: 12px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--md-sys-color-on-surface-variant);
    text-align: left;
    caption-side: top;
}

.mro-table thead th {
    padding: 12px 16px;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--md-sys-color-primary);
    background: rgba(221, 175, 37, 0.08);
    border-bottom: 2px solid var(--md-sys-color-primary);
    white-space: nowrap;
    text-align: left;
}

.mro-table tbody td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--md-sys-color-outline);
    vertical-align: top;
}

.mro-table tbody tr:last-child td {
    border-bottom: none;
}

.mro-table--striped tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.03);
}

.mro-table tbody tr:hover {
    background: rgba(221, 175, 37, 0.04);
}

/* Responsive : card view on mobile */
@media (max-width: 640px) {
    .mro-table-wrap--responsive .mro-table thead {
        display: none;
    }
    .mro-table-wrap--responsive .mro-table tbody tr {
        display: block;
        margin-bottom: 12px;
        border: 1px solid var(--md-sys-color-outline);
        border-radius: var(--md-sys-shape-corner-medium, 12px);
        padding: 8px 0;
    }
    .mro-table-wrap--responsive .mro-table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        padding: 6px 16px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        gap: 12px;
    }
    .mro-table-wrap--responsive .mro-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.78rem;
        color: var(--md-sys-color-primary);
        flex-shrink: 0;
        min-width: 30%;
    }
    .mro-table-wrap--responsive .mro-table tbody td:last-child {
        border-bottom: none;
    }
}

/* Light theme overrides */
[data-theme="light"] .mro-table thead th {
    background: rgba(221, 175, 37, 0.12);
}
[data-theme="light"] .mro-table--striped tbody tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.02);
}
[data-theme="light"] .mro-table tbody tr:hover {
    background: rgba(221, 175, 37, 0.06);
}
