/* Toggle Button Styles */
button.mra-dark-mode-toggle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    padding: 0;
    flex-shrink: 0;
}

button.mra-dark-mode-toggle.is-floating {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2147483646;
}

button.mra-dark-mode-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

button.mra-dark-mode-toggle:active {
    transform: scale(0.95);
}

.mra-sun-icon, .mra-moon-icon {
    position: absolute;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mra-sun-icon {
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
}

.mra-moon-icon {
    opacity: 1;
    transform: rotate(0) scale(1);
}

/* Dark Theme State for Toggle */
html.mra-dark-theme button.mra-dark-mode-toggle {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

html.mra-dark-theme .mra-sun-icon {
    opacity: 1;
    transform: rotate(0) scale(1);
}

html.mra-dark-theme .mra-moon-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
}

/* Global Dark Theme Variables & Overrides */
html.mra-dark-theme {
    /* Twenty Twenty-Five Overrides */
    --wp--preset--color--base: #0f172a;
    --wp--preset--color--contrast: #f8fafc;
    --wp--preset--color--accent-1: #38bdf8;
    --wp--preset--color--accent-2: #818cf8;
    --wp--preset--color--accent-3: #c084fc;
    --wp--preset--color--accent-4: #f472b6;
    --wp--preset--color--accent-5: #fb7185;
    --wp--preset--color--accent-6: #4ade80;
    
    background-color: var(--wp--preset--color--base);
    color: var(--wp--preset--color--contrast);
    color-scheme: dark;
}

html.mra-dark-theme body {
    background-color: var(--wp--preset--color--base);
    color: var(--wp--preset--color--contrast);
}

/* MRA Archives Plugin Overrides */
html.mra-dark-theme .mra-root {
    color: #f1f5f9;
}

html.mra-dark-theme .mra-single-view .mra-breadcrumbs {
    background: #0f172a;
    border-bottom-color: #1e293b;
}

html.mra-dark-theme .mra-bc-link {
    color: #94a3b8;
}

html.mra-dark-theme .mra-bc-link:hover {
    color: #38bdf8;
}

html.mra-dark-theme .mra-bc-current {
    color: #f8fafc;
}

html.mra-dark-theme .mra-bc-chevron {
    color: #475569;
}

html.mra-dark-theme .mra-single-view h1 {
    color: #f8fafc;
}

html.mra-dark-theme .mra-meta-item {
    color: #94a3b8;
}

html.mra-dark-theme .mra-meta-item svg {
    color: #64748b;
}

html.mra-dark-theme .mra-content-area p,
html.mra-dark-theme .mra-content-area ul,
html.mra-dark-theme .mra-content-area ol,
html.mra-dark-theme .mra-content-area li,
html.mra-dark-theme .mra-transcript-body p,
html.mra-dark-theme .mra-transcript-body ul,
html.mra-dark-theme .mra-transcript-body ol,
html.mra-dark-theme .mra-transcript-body li {
    color: #cbd5e1;
}

html.mra-dark-theme .mra-content-area a,
html.mra-dark-theme .mra-transcript-body a {
    color: #60a5fa;
}

html.mra-dark-theme .mra-content-area a:hover,
html.mra-dark-theme .mra-transcript-body a:hover {
    color: #93c5fd;
}

html.mra-dark-theme .mra-content-area h2,
html.mra-dark-theme .mra-content-area h3,
html.mra-dark-theme .mra-content-area h4,
html.mra-dark-theme .mra-transcript-body h2,
html.mra-dark-theme .mra-transcript-body h3,
html.mra-dark-theme .mra-transcript-body h4 {
    color: #f8fafc;
}

html.mra-dark-theme .mra-content-area blockquote,
html.mra-dark-theme .mra-transcript-body blockquote {
    border-left-color: #38bdf8;
    background: #1e293b;
    color: #e2e8f0;
}

/* Selection Popup & Dropdowns */
html.mra-dark-theme .mra-selection-popup {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

html.mra-dark-theme .mra-selection-popup button {
    color: #cbd5e1;
}

html.mra-dark-theme .mra-selection-popup button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f8fafc;
}

html.mra-dark-theme .mra-selection-popup .mra-divider {
    background: rgba(255, 255, 255, 0.1);
}

html.mra-dark-theme .mra-share-dropdown,
html.mra-dark-theme .mra-folder-dropdown,
html.mra-dark-theme .mra-move-dropdown {
    background: rgba(30, 41, 59, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

html.mra-dark-theme .mra-folder-header {
    color: #f8fafc;
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

html.mra-dark-theme .mra-folder-field label {
    color: #94a3b8;
}

html.mra-dark-theme .mra-folder-input,
html.mra-dark-theme .mra-move-new-folder-input {
    background: #0f172a;
    border-color: #334155;
    color: #f8fafc;
}

html.mra-dark-theme .mra-folder-input:focus,
html.mra-dark-theme .mra-move-new-folder-input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

html.mra-dark-theme .mra-new-folder-wrapper {
    background: #0f172a;
    border-color: #334155;
}

html.mra-dark-theme .mra-folder-item {
    color: #cbd5e1;
}

html.mra-dark-theme .mra-folder-item:hover {
    background: #1e293b;
}

html.mra-dark-theme .mra-folder-item svg {
    color: #64748b;
}

html.mra-dark-theme .mra-folder-item:hover svg {
    color: #38bdf8;
}

html.mra-dark-theme .mra-folder-item.mra-saving {
    background-color: #1e293b;
    color: #94a3b8;
}

html.mra-dark-theme .mra-folder-item.mra-saved {
    background-color: rgba(16, 185, 129, 0.1);
    color: #34d399;
}

html.mra-dark-theme .mra-folder-item.mra-saved svg {
    color: #34d399;
}

html.mra-dark-theme .mra-new-folder-submit-btn {
    color: #94a3b8 !important;
}

html.mra-dark-theme .mra-new-folder-submit-btn:hover {
    color: #f8fafc !important;
}

html.mra-dark-theme .mra-new-folder-submit-btn.mra-saved {
    color: #34d399 !important;
}

/* Bookmarks Page Overrides */
html.mra-dark-theme #mra-bookmark-search-input {
    background: #1e293b;
    color: #f1f5f9;
    border-color: #334155;
}

html.mra-dark-theme #mra-bookmark-search-input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

html.mra-dark-theme .mra-bookmarks-sidebar {
    background: #0f172a;
    border-right-color: #1e293b;
}

html.mra-dark-theme .mra-sidebar-title {
    color: #f8fafc;
}

html.mra-dark-theme .mra-filter-btn {
    background: #1e293b;
    color: #cbd5e1;
    border-color: #334155;
}

html.mra-dark-theme .mra-filter-btn:hover {
    background: #334155;
    color: #f8fafc;
}

html.mra-dark-theme .mra-filter-folder{
    background: none;
    color: #cbd5e1;
    border: none;
}

html.mra-dark-theme .mra-filter-folder:hover{
    color: #cbd5e1;
}

html.mra-dark-theme .mra-filter-btn.active {
    background: #1e293b;;
    color: #94a3b8;
    border-color: #1e293b;;
}

html.mra-dark-theme .mra-b-card {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

html.mra-dark-theme .mra-b-card:hover {
    border-color: #475569;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}

html.mra-dark-theme .mra-b-quote {
    color: #f1f5f9;
    background: #0f172a;
    border-left-color: #475569;
}

html.mra-dark-theme .mra-b-breadcrumb {
    color: #94a3b8;
}

html.mra-dark-theme .mra-b-footer {
    border-top-color: #334155;
}

html.mra-dark-theme .mra-b-btn {
    color: #94a3b8;
}

html.mra-dark-theme .mra-b-btn:hover {
    background: #334155;
    color: #f8fafc;
}

html.mra-dark-theme .mra-b-btn.view {
    background: #0ea5e9;
    color: #fff;
}

html.mra-dark-theme .mra-b-btn.view:hover {
    background: #0284c7;
}

html.mra-dark-theme .mra-card-confirm {
    background: rgba(15, 23, 42, 0.95);
}

html.mra-dark-theme .mra-card-confirm p {
    color: #f8fafc;
}

html.mra-dark-theme .mra-card-confirm button.mra-js-confirm-delete-no {
    background: #334155;
    color: #f8fafc;
}

html.mra-dark-theme .mra-card-confirm button.mra-js-confirm-delete-yes {
    background: #ef4444;
    color: #fff;
}

/* Search Panel Overrides */
html.mra-dark-theme .mra-advanced-search {
    background: #1e293b;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    border-color: #334155;
}

html.mra-dark-theme .mra-search-row.main {
    background: #0f172a;
    border-color: #334155;
}

html.mra-dark-theme .mra-search-row.main input {
    color: #f8fafc;
}

html.mra-dark-theme .mra-search-row.filters {
    border-top-color: #334155;
}

html.mra-dark-theme .mra-search-row select,
html.mra-dark-theme .mra-date-inputs input {
    background: #0f172a;
    border-color: #334155;
    color: #f8fafc;
}

html.mra-dark-theme .mra-search-toggle-btn {
    background: #1e293b;
    border-color: #334155;
    color: #cbd5e1;
}

html.mra-dark-theme .mra-search-toggle-btn:hover {
    background: #334155;
    border-color: #475569;
    color: #f8fafc;
}

html.mra-dark-theme #mra-search-btn {
    background: #0ea5e9 !important;
    color: #fff !important;
    border: none !important;
}

html.mra-dark-theme #mra-search-btn:hover {
    background: #0284c7 !important;
}

/* Auth Modal Overrides */
html.mra-dark-theme .mra-user-icon-btn,
html.mra-dark-theme .mra-bookmark-link-icon {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

html.mra-dark-theme .mra-bookmark-link-icon:hover {
    color: #e2e8f0;
}

html.mra-dark-theme .mra-user-modal-dropdown {
    background: rgba(30, 41, 59, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-color: rgba(51, 65, 85, 0.8);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    color: #f8fafc;
}

html.mra-dark-theme .mra-auth-modal-content {
    background: #1e293b;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

html.mra-dark-theme .mra-auth-close {
    background: #334155;
    color: #cbd5e1;
}

html.mra-dark-theme .mra-auth-close:hover {
    background: #475569;
    color: #f8fafc;
}

html.mra-dark-theme .mra-auth-tabs {
    border-bottom-color: #334155;
    background: #0f172a;
}

html.mra-dark-theme .mra-auth-tab {
    background: transparent;
    color: #94a3b8;
}

html.mra-dark-theme .mra-auth-tab.active {
    background: #1e293b;
    color: #f8fafc;
}

html.mra-dark-theme .mra-auth-tab.active::after {
    background: #38bdf8;
}

html.mra-dark-theme .mra-auth-pane input,
html.mra-dark-theme .mra-auth-form input[type="text"],
html.mra-dark-theme .mra-auth-form input[type="email"],
html.mra-dark-theme .mra-auth-form input[type="password"] {
    background: #0f172a;
    border-color: #334155;
    color: #f8fafc;
}

html.mra-dark-theme .mra-auth-pane input:focus,
html.mra-dark-theme .mra-auth-form input[type="text"]:focus,
html.mra-dark-theme .mra-auth-form input[type="email"]:focus,
html.mra-dark-theme .mra-auth-form input[type="password"]:focus {
    border-color: #38bdf8;
    background: #1e293b;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.1);
}

html.mra-dark-theme .mra-auth-pane input[readonly],
html.mra-dark-theme .mra-auth-form input[readonly] {
    background: #0f172a;
    color: #475569;
    border-color: #1e293b;
}

html.mra-dark-theme #mra-2fa-method-container label,
html.mra-dark-theme #mra-2fa-qr-container p,
html.mra-dark-theme #mra-2fa-qr-container strong {
    color: #cbd5e1;
}

html.mra-dark-theme .mra-auth-pane p,
html.mra-dark-theme .mra-auth-profile-container p,
html.mra-dark-theme .mra-newsletter-label,
html.mra-dark-theme .mra-auth-profile-container label {
    color: #cbd5e1;
}

html.mra-dark-theme .mra-auth-profile-container,
html.mra-dark-theme .mra-auth-block-container {
    background: #1e293b;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

html.mra-dark-theme .mra-auth-profile-container h3,
html.mra-dark-theme .mra-auth-profile-container h4 {
    color: #f8fafc;
}

html.mra-dark-theme .mra-auth-remember label {
    color: #cbd5e1;
}

html.mra-dark-theme .mra-auth-submit {
    background: #38bdf8;
    color: #0f172a;
}

@media (hover: hover) {
    html.mra-dark-theme .mra-auth-submit:hover {
        background: #7dd3fc;
    }
}

html.mra-dark-theme .mra-auth-msg {
    background: #450a0a;
    color: #fca5a5;
    border-color: #7f1d1d;
}

html.mra-dark-theme .mra-auth-msg.success {
    background: #052e16;
    color: #86efac;
    border-color: #14532d;
}

html.mra-dark-theme .mra-auth-links a {
    color: #38bdf8;
}

html.mra-dark-theme .mra-auth-links a:hover {
    color: #7dd3fc;
}

/* Mobile Bottom Sheets */
@media (max-width: 991px) {
    html.mra-dark-theme .mra-selection-popup.mra-mobile-vertical .mra-folder-dropdown::before,
    html.mra-dark-theme .mra-move-dropdown::before,
    html.mra-dark-theme .mra-bookmarks-sidebar::before,
    html.mra-dark-theme .mra-folder-menu-wrapper .mra-folder-dropdown::before {
        background: #475569;
    }
}

/* Accordions (Retreats, Days, Sessions) */
html.mra-dark-theme .mra-theme-standard .mra-lvl-1 {
    background: #1e293b;
    border-color: #334155;
}

html.mra-dark-theme .mra-retreat-info {
    background: transparent;
}

html.mra-dark-theme .mra-retreat-header h2,
html.mra-dark-theme .mra-retreat-header h3.mra-standard-title,
html.mra-dark-theme .mra-retreat-header h3.mra-standard-title a,
html.mra-dark-theme .mra-retreat-header h3.mra-standard-title span,
html.mra-dark-theme .mra-lvl-1 > .mra-header h3.mra-standard-title,
html.mra-dark-theme .mra-lvl-1 > .mra-header h3.mra-standard-title span {
    color: #f8fafc;
}

html.mra-dark-theme .mra-retreat-excerpt {
    color: #94a3b8;
}

html.mra-dark-theme .mra-retreat-header .mra-meta-item,
html.mra-dark-theme .mra-meta {
    color: #94a3b8;
}

html.mra-dark-theme .mra-retreat-header .mra-meta-item svg {
    color: #64748b;
}

html.mra-dark-theme .mra-accordion-icon {
    background: #334155;
    color: #cbd5e1;
}

html.mra-dark-theme .mra-lvl-2 {
    border-left-color: #334155;
}

html.mra-dark-theme .mra-lvl-2 > .mra-header h4 {
    color: #f1f5f9;
}

html.mra-dark-theme .mra-lvl-2 > .mra-header h4 svg {
    color: #94a3b8;
}

html.mra-dark-theme .mra-lvl-3 {
    background: #0f172a;
    border-color: #334155;
}

html.mra-dark-theme .mra-lvl-3:hover {
    background: #1e293b;
    border-color: #38bdf8;
}

html.mra-dark-theme .mra-lvl-3 h5 a {
    color: #f8fafc;
}

html.mra-dark-theme .mra-lvl-3 .mra-meta-item {
    color: #94a3b8;
}

html.mra-dark-theme .mra-lvl-3 .mra-meta-item svg {
    color: #64748b;
}

html.mra-dark-theme .mra-session-excerpt {
    color: #cbd5e1;
}

html.mra-dark-theme .mra-session-action {
    color: #60a5fa;
}

html.mra-dark-theme .mra-theme-summary {
    color: #cbd5e1;
}

html.mra-dark-theme .mra-tag-link-style {
    background: #334155;
    color: #cbd5e1;
}

html.mra-dark-theme .mra-tag-link-style:hover {
    background: #475569;
}

html.mra-dark-theme .mra-transcript-body {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

/* Table of Contents */
html.mra-dark-theme .mra-toc-container {
    background: #1e293b;
    border-color: #334155;
}

html.mra-dark-theme .mra-toc-title {
    color: #f8fafc;
}

html.mra-dark-theme .mra-toc-list a {
    color: #60a5fa;
}

html.mra-dark-theme .mra-toc-list a:hover {
    color: #93c5fd;
}

/* Modals & Multimedia */
html.mra-dark-theme .mra-modal-box,
html.mra-dark-theme .mra-confirm-box,
html.mra-dark-theme .mra-single-view {
    background-color: #1e293b !important;
    color: #f8fafc !important;
}

html.mra-dark-theme .mra-confirm-box h3 {
    color: #f8fafc;
}

html.mra-dark-theme .mra-ask-quote-box {
    background: #0f172a;
    color: #cbd5e1;
    border-color: #334155;
}

html.mra-dark-theme .mra-field-label,
html.mra-dark-theme #mra-ask-breadcrumb-label {
    color: #94a3b8;
}

html.mra-dark-theme #mra-ask-breadcrumb-label {
    border-bottom-color: #334155;
}

html.mra-dark-theme .mra-form-grid input,
html.mra-dark-theme .mra-form-grid textarea {
    background: #0f172a;
    color: #f1f5f9;
    border-color: #334155;
}

html.mra-dark-theme .mra-form-grid input:focus,
html.mra-dark-theme .mra-form-grid textarea:focus {
    border-color: #38bdf8;
}

html.mra-dark-theme .mra-modal-title,
html.mra-dark-theme .mra-modal-excerpt,
html.mra-dark-theme .mra-meta-item,
html.mra-dark-theme .mra-meta-label,
html.mra-dark-theme .mra-meta-value,
html.mra-dark-theme .mra-content-section h3,
html.mra-dark-theme .mra-content-section p,
html.mra-dark-theme .mra-content-section li,
html.mra-dark-theme .mra-close {
    color: #f8fafc !important;
}

html.mra-dark-theme .mra-close:hover {
    color: #38bdf8 !important;
    background: none !important;
}

html.mra-dark-theme .mra-modal-excerpt {
    border-left-color: #334155;
    color: #cbd5e1 !important;
}

/* A11y Menu inside Modals */
html.mra-dark-theme .mra-a11y-toggle {
    background: #1e293b;
    border-color: #334155;
    color: #ffffff;
}

html.mra-dark-theme .mra-a11y-toggle svg,
html.mra-dark-theme .mra-a11y-toggle svg path {
    color: #ffffff !important;
    fill: none !important;
    stroke: #ffffff !important;
}

html.mra-dark-theme .mra-a11y-toggle:hover {
    background: #334155;
    border-color: #475569;
    color: #f8fafc;
}

html.mra-dark-theme .mra-a11y-popover {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

html.mra-dark-theme .mra-a11y-divider {
    border-top-color: #334155;
}

html.mra-dark-theme .mra-a11y-section label {
    color: #f8fafc;
}

html.mra-dark-theme .mra-font-adjuster {
    background: #0f172a;
    border-color: #334155;
}

html.mra-dark-theme .mra-font-btn {
    color: #cbd5e1;
}

html.mra-dark-theme .mra-font-btn:hover {
    background: #334155;
    color: #f8fafc;
}

html.mra-dark-theme .mra-font-value {
    color: #f8fafc;
    border-left-color: #334155;
    border-right-color: #334155;
}

/* TTS Player inside Modals */
html.mra-dark-theme .mra-tts-player {
    background: rgba(15, 23, 42, 0.98);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
}

html.mra-dark-theme .mra-tts-progress-bar {
    background: #334155;
}

html.mra-dark-theme .mra-tts-progress-fill {
    background: #38bdf8;
}

html.mra-dark-theme .mra-tts-status-icon {
    background: #1e293b;
    color: #f8fafc;
}

html.mra-dark-theme .mra-tts-status-text {
    color: #f8fafc;
}

html.mra-dark-theme .mra-tts-settings-menu {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 10px 40px -10px rgba(0,0,0,0.5), 0 4px 12px -4px rgba(0,0,0,0.3);
}

html.mra-dark-theme .mra-tts-setting-row label {
    color: #94a3b8;
}

html.mra-dark-theme .mra-tts-btn {
    background: transparent;
    color: #94a3b8;
    border-color: transparent;
}

html.mra-dark-theme .mra-tts-btn:hover {
    background: #1e293b;
    color: #f8fafc;
    border-color: transparent;
}

html.mra-dark-theme .mra-tts-btn.active {
    background: #1d4ed8;
    color: #ffffff;
}

html.mra-dark-theme .mra-tts-play-pause {
    background: #38bdf8;
    color: #0f172a;
}

html.mra-dark-theme .mra-tts-play-pause:hover {
    background: #7dd3fc;
    color: #0f172a;
}

html.mra-dark-theme .mra-tts-voice-select,
html.mra-dark-theme .mra-tts-speed-select {
    background-color: #0f172a;
    color: #f8fafc;
    border-color: #334155;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
}

html.mra-dark-theme .mra-tts-voice-select:hover,
html.mra-dark-theme .mra-tts-speed-select:hover {
    border-color: #475569;
    background-color: #1e293b;
}

html.mra-dark-theme .mra-tts-voice-select:focus,
html.mra-dark-theme .mra-tts-speed-select:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

html.mra-dark-theme .mra-tts-close {
    background: transparent;
    color: #94a3b8;
}

html.mra-dark-theme .mra-tts-close:hover {
    background: #1e293b;
    color: #f8fafc;
}

/* Text Highlights in Dark Mode */
html.mra-dark-theme mark,
html.mra-dark-theme mark.mra-active-highlight,
html.mra-dark-theme .mra-tts-word-hl,
html.mra-dark-theme .mra-live-snippet strong {
    background-color: rgba(253, 224, 71, 0.3) !important;
    color: #f8fafc !important;
}

html.mra-dark-theme .mra-tts-active-block {
    background-color: rgba(253, 224, 71, 0.1) !important;
    color: inherit;
}

/* Force SVGs to inherit color in dark mode (handles custom uploaded icons) */
html.mra-dark-theme .mra-root svg:not(.mra-auth-social-btn svg)[stroke]:not([stroke="none"]),
html.mra-dark-theme .mra-modal-box svg:not(.mra-auth-social-btn svg)[stroke]:not([stroke="none"]),
html.mra-dark-theme .mra-a11y-popover svg:not(.mra-auth-social-btn svg)[stroke]:not([stroke="none"]),
html.mra-dark-theme .mra-selection-popup svg:not(.mra-auth-social-btn svg)[stroke]:not([stroke="none"]),
html.mra-dark-theme .mra-confirm-box svg:not(.mra-auth-social-btn svg)[stroke]:not([stroke="none"]),
html.mra-dark-theme .mra-b-card svg:not(.mra-auth-social-btn svg)[stroke]:not([stroke="none"]),
html.mra-dark-theme .mra-auth-modal-content svg:not(.mra-auth-social-btn svg)[stroke]:not([stroke="none"]),
html.mra-dark-theme .mra-root svg:not(.mra-auth-social-btn svg) [stroke]:not([stroke="none"]),
html.mra-dark-theme .mra-modal-box svg:not(.mra-auth-social-btn svg) [stroke]:not([stroke="none"]),
html.mra-dark-theme .mra-a11y-popover svg:not(.mra-auth-social-btn svg) [stroke]:not([stroke="none"]),
html.mra-dark-theme .mra-selection-popup svg:not(.mra-auth-social-btn svg) [stroke]:not([stroke="none"]),
html.mra-dark-theme .mra-confirm-box svg:not(.mra-auth-social-btn svg) [stroke]:not([stroke="none"]),
html.mra-dark-theme .mra-b-card svg:not(.mra-auth-social-btn svg) [stroke]:not([stroke="none"]),
html.mra-dark-theme .mra-auth-modal-content svg:not(.mra-auth-social-btn svg) [stroke]:not([stroke="none"]) {
    stroke: currentColor !important;
}

html.mra-dark-theme .mra-root svg:not(.mra-auth-social-btn svg)[fill]:not([fill="none"]):not([fill="#fff"]):not([fill="#ffffff"]):not([fill="white"]),
html.mra-dark-theme .mra-modal-box svg:not(.mra-auth-social-btn svg)[fill]:not([fill="none"]):not([fill="#fff"]):not([fill="#ffffff"]):not([fill="white"]),
html.mra-dark-theme .mra-a11y-popover svg:not(.mra-auth-social-btn svg)[fill]:not([fill="none"]):not([fill="#fff"]):not([fill="#ffffff"]):not([fill="white"]),
html.mra-dark-theme .mra-selection-popup svg:not(.mra-auth-social-btn svg)[fill]:not([fill="none"]):not([fill="#fff"]):not([fill="#ffffff"]):not([fill="white"]),
html.mra-dark-theme .mra-confirm-box svg:not(.mra-auth-social-btn svg)[fill]:not([fill="none"]):not([fill="#fff"]):not([fill="#ffffff"]):not([fill="white"]),
html.mra-dark-theme .mra-b-card svg:not(.mra-auth-social-btn svg)[fill]:not([fill="none"]):not([fill="#fff"]):not([fill="#ffffff"]):not([fill="white"]),
html.mra-dark-theme .mra-auth-modal-content svg:not(.mra-auth-social-btn svg)[fill]:not([fill="none"]):not([fill="#fff"]):not([fill="#ffffff"]):not([fill="white"]),
html.mra-dark-theme .mra-root svg:not(.mra-auth-social-btn svg) [fill]:not([fill="none"]):not([fill="#fff"]):not([fill="#ffffff"]):not([fill="white"]),
html.mra-dark-theme .mra-modal-box svg:not(.mra-auth-social-btn svg) [fill]:not([fill="none"]):not([fill="#fff"]):not([fill="#ffffff"]):not([fill="white"]),
html.mra-dark-theme .mra-a11y-popover svg:not(.mra-auth-social-btn svg) [fill]:not([fill="none"]):not([fill="#fff"]):not([fill="#ffffff"]):not([fill="white"]),
html.mra-dark-theme .mra-selection-popup svg:not(.mra-auth-social-btn svg) [fill]:not([fill="none"]):not([fill="#fff"]):not([fill="#ffffff"]):not([fill="white"]),
html.mra-dark-theme .mra-confirm-box svg:not(.mra-auth-social-btn svg) [fill]:not([fill="none"]):not([fill="#fff"]):not([fill="#ffffff"]):not([fill="white"]),
html.mra-dark-theme .mra-b-card svg:not(.mra-auth-social-btn svg) [fill]:not([fill="none"]):not([fill="#fff"]):not([fill="#ffffff"]):not([fill="white"]),
html.mra-dark-theme .mra-auth-modal-content svg:not(.mra-auth-social-btn svg) [fill]:not([fill="none"]):not([fill="#fff"]):not([fill="#ffffff"]):not([fill="white"]) {
    fill: currentColor !important;
}

/* Q&A Visual Styles in Dark Mode */
html.mra-dark-theme .mra-qa-details {
    background: #1a1a1a;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

html.mra-dark-theme .mra-qa-summary {
    background: #262626;
    color: #f5f5f5;
}

html.mra-dark-theme .mra-qa-summary:hover {
    background: #303030;
}

html.mra-dark-theme .mra-qa-answer {
    border-top-color: rgba(255, 255, 255, 0.1);
    color: #d4d4d4;
}

html.mra-dark-theme .mra-qa-q-icon {
    color: #818cf8;
}

html.mra-dark-theme .mra-qa-style-minimal .mra-qa-details {
    border-bottom-color: #334155;
    background: transparent;
    box-shadow: none;
}
html.mra-dark-theme .mra-qa-style-minimal .mra-qa-summary,
html.mra-dark-theme .mra-qa-style-minimal .mra-qa-answer {
    background: transparent;
}

html.mra-dark-theme .mra-qa-style-bordered .mra-qa-details {
    background: #1e293b;
    border-left-color: #818cf8;
}
html.mra-dark-theme .mra-qa-style-bordered .mra-qa-answer {
    border-top-color: #475569;
}

html.mra-dark-theme .mra-qa-style-soft .mra-qa-details {
    background: #1e293b;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
}
html.mra-dark-theme .mra-qa-style-soft .mra-qa-q-icon {
    background: rgba(129, 140, 248, 0.2);
}
