/* ==========================================================================
   MARKDOWN EDITOR STYLES - Build 6418
   ========================================================================== */

/* ============================================
   CSS CUSTOM PROPERTIES
   ============================================ */
:root {
    /* Colors - Light Mode */
    --color-bg-primary: #f0f0f0;
    --color-bg-secondary: #fff;
    --color-bg-tertiary: #f8f8f8;
    --color-bg-hover: #e8e8e8;
    --color-bg-active: #d0d0d0;

    --color-text-primary: #111;
    --color-text-secondary: #222;
    --color-text-tertiary: #333;
    --color-text-muted: #666;
    --color-text-disabled: #6b6b6b;

    --color-border-light: #eee;
    --color-border-primary: #ddd;
    --color-border-secondary: #ccc;
    --color-border-dark: #999;

    --color-accent-primary: #007acc;
    --color-accent-hover: #005a9e;
    --color-accent-darker: #003f6e;

    --color-link: #005a9e;
    --color-link-hover: #003f6e;

    --color-success: #22c55e;
    --color-danger: #cc0000;

    /* Menu & Toolbar */
    --color-menu-bg: #e0e0e0;

    --color-menu-dropdown-bg: var(--color-bg-secondary);
    --color-menu-item-hover-bg: rgba(0, 0, 0, 0.05);
    --color-menu-dropdown-hover-bg: #f3f6fb;

    /* Code & Preview */
    --color-code-bg: #f0f0f0;
    --color-code-text: #222;
    --color-pre-bg: #f8f8f8;
    --color-blockquote-border: #ccc;
    --color-blockquote-bg: transparent;
    --color-blockquote-text: var(--color-text-muted);
    --color-blockquote-nested-border: #ddd;
    --color-blockquote-nested-bg: transparent;

    /* Table */
    --color-table-header-bg: var(--color-bg-tertiary);
    --color-table-row-even-bg: var(--color-bg-tertiary);

    /* Pane Header */
    --color-pane-header-bg: var(--color-bg-tertiary);
    --color-pane-header-text: var(--color-text-muted);

    /* Find & Replace / Dialogs */
    --color-find-replace-bg: var(--color-bg-secondary);
    --color-dialog-bg: var(--color-bg-secondary);
    --color-input-bg: var(--color-bg-secondary);
    --color-input-text: var(--color-text-primary);
    --find-replace-bottom-offset: 48px;

    /* Match Highlights */
    --color-match-bg: #fffb91;
    --color-match-current-bg: #ffcf66;

    /* Z-Index Scale */
    --z-dropdown-menu: 100;
    --z-flag-menu: 104;
    --z-history-menu: 105;
    --z-popup-overlay: 999;
    --z-dialog: 1000;
    --z-find-replace: 1003;
    --z-fullscreen-popup: 2000;
    --z-animation: 10000;

    /* Spacing Scale */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 12px;
    --space-lg: 16px;
    --space-xl: 20px;

    /* Separator Thickness */
    --separator-thickness: 1px;

    /* Border Radius */
    --radius-sm: 3px;
    --radius-md: 4px;
    --radius-lg: 6px;
    --radius-xl: 10px;

    /* Transitions */
    --transition-fast: 0.2s;
    --transition-medium: 0.25s;
    --transition-slow: 0.3s;

    /* Shadows */
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.18);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 6px 18px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 8px 32px rgba(0, 0, 0, 0.25);

    /* Scrollbar */
    --scrollbar-width: 10px;
    --scrollbar-thumb: rgba(0, 0, 0, 0.25);
    --scrollbar-thumb-hover: rgba(0, 0, 0, 0.4);
    --scrollbar-button-arrow: rgba(0, 0, 0, 0.5);
}

/* Material Symbols Rounded */
.material-symbols-rounded {
    font-family: "Material Symbols Rounded";
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    /* Preferred icon size */
    display: inline-block;
    line-height: 1;
    text-transform: none;
    letter-spacing: normal;
    word-wrap: normal;
    white-space: nowrap;
    direction: ltr;

    /* Fix for FOUC / Ligature text expansion */
    width: 24px;
    overflow: hidden;
    vertical-align: middle;
}

/* Dark Mode Variables */
html.dark-mode {
    --color-bg-primary: #181a1b;
    --color-bg-secondary: #101214;
    --color-bg-tertiary: #23272a;
    --color-bg-hover: #2d3136;
    --color-bg-active: #3d3d3d;

    --color-text-primary: #e0e0e0;
    --color-text-secondary: #ddd;
    --color-text-tertiary: #ccc;
    --color-text-muted: #888;
    --color-text-disabled: #a0a0a0;

    --color-border-light: #333;
    --color-border-primary: #444;
    --color-border-secondary: #555;
    --color-border-dark: #666;

    --color-accent-primary: #005a9e;
    --color-accent-hover: #007acc;

    --color-link: #4fc3f7;
    --color-link-hover: #22d3ee;

    /* Menu & Toolbar matches dark mode specific */
    --color-menu-bg: #141617;

    --color-menu-dropdown-bg: #1a1c1d;
    --color-menu-item-hover-bg: rgba(255, 255, 255, 0.05);
    --color-menu-dropdown-hover-bg: #222425;

    /* Code & Preview */
    --color-code-bg: #1a1d1f;
    --color-code-text: #e0e0e0;
    --color-pre-bg: #101214;
    --color-blockquote-border: #555;
    --color-blockquote-bg: rgba(255, 255, 255, 0.05);
    --color-blockquote-text: var(--color-text-muted);
    --color-blockquote-nested-border: #444;
    --color-blockquote-nested-bg: transparent;

    /* Table */
    --color-table-header-bg: #1e2225;
    --color-table-row-even-bg: #16181a;

    /* Pane Header */
    --color-pane-header-bg: #181b1d;
    --color-pane-header-text: #b0b0b0;

    /* Find & Replace / Dialogs */
    --color-find-replace-bg: #181a1b;
    --color-dialog-bg: #222;
    --color-input-bg: #101214;
    --color-input-text: #e0e0e0;

    /* Match Highlights */
    --color-match-bg: #3a3a2a;
    --color-match-current-bg: #5a4b1a;

    /* Shadows */
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 6px 18px rgba(0, 0, 0, 0.2);

    /* Scrollbar */
    --scrollbar-thumb: rgba(255, 255, 255, 0.18);
    --scrollbar-thumb-hover: rgba(255, 255, 255, 0.3);
    --scrollbar-button-arrow: rgba(255, 255, 255, 0.4);
}

/* ============================================
   RESET & BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--color-bg-primary);
    height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--color-text-primary);
    overflow: hidden;
}

html {
    overflow: hidden;
    height: 100%;
}

/* ============================================
   SCROLLBAR STYLES
   ============================================ */

/* --- Editor, Preview & Pre-blocks (bg: --color-bg-secondary or --color-pre-bg) --- */
.editor-textarea::-webkit-scrollbar,
.preview-content::-webkit-scrollbar,
.preview-content pre::-webkit-scrollbar {
    width: var(--scrollbar-width);
    height: var(--scrollbar-width);
}

.editor-textarea::-webkit-scrollbar-track,
.preview-content::-webkit-scrollbar-track {
    background: var(--color-bg-secondary);
}

.preview-content pre::-webkit-scrollbar-track {
    background: var(--color-pre-bg);
}

.editor-textarea::-webkit-scrollbar-thumb,
.preview-content::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 5px;
    border: 2px solid var(--color-bg-secondary);
}

.preview-content pre::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 5px;
    border: 2px solid var(--color-pre-bg);
}

.editor-textarea::-webkit-scrollbar-thumb:hover,
.preview-content::-webkit-scrollbar-thumb:hover,
.preview-content pre::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

.editor-textarea::-webkit-scrollbar-corner,
.preview-content::-webkit-scrollbar-corner,
.preview-content pre::-webkit-scrollbar-corner {
    background: var(--color-bg-secondary);
}

/* --- Dialogs (bg: --color-dialog-bg) --- */
.generic-dialog::-webkit-scrollbar,
.generic-dialog *::-webkit-scrollbar {
    width: var(--scrollbar-width);
    height: var(--scrollbar-width);
}

.generic-dialog::-webkit-scrollbar-track,
.generic-dialog *::-webkit-scrollbar-track {
    background: var(--color-dialog-bg);
}

.generic-dialog::-webkit-scrollbar-thumb,
.generic-dialog *::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 5px;
    border: 2px solid var(--color-dialog-bg);
}

.generic-dialog::-webkit-scrollbar-thumb:hover,
.generic-dialog *::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

/* Dialog scrollbar up/down buttons */
.generic-dialog::-webkit-scrollbar-button:vertical,
.generic-dialog *::-webkit-scrollbar-button:vertical {
    background: var(--color-dialog-bg);
    height: 12px;
}

.generic-dialog::-webkit-scrollbar-button:vertical:decrement,
.generic-dialog *::-webkit-scrollbar-button:vertical:decrement {
    background: var(--color-dialog-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 5l4-4 4 4' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center center;
    background-size: 8px 5px;
}

.generic-dialog::-webkit-scrollbar-button:vertical:increment,
.generic-dialog *::-webkit-scrollbar-button:vertical:increment {
    background: var(--color-dialog-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center center;
    background-size: 8px 5px;
}

/* --- Fullscreen Popups (bg: --color-bg-secondary) --- */
.fullscreen-popup::-webkit-scrollbar,
.fullscreen-popup *::-webkit-scrollbar {
    width: var(--scrollbar-width);
    height: var(--scrollbar-width);
}

.fullscreen-popup::-webkit-scrollbar-track,
.fullscreen-popup *::-webkit-scrollbar-track {
    background: var(--color-bg-secondary);
}

.fullscreen-popup::-webkit-scrollbar-thumb,
.fullscreen-popup *::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 5px;
    border: 2px solid var(--color-bg-secondary);
}

.fullscreen-popup::-webkit-scrollbar-thumb:hover,
.fullscreen-popup *::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

/* --- Dropdown Menus (bg: --color-menu-dropdown-bg) --- */
.history-dropdown::-webkit-scrollbar,
.menu-dropdown::-webkit-scrollbar,
.menu-submenu::-webkit-scrollbar {
    width: var(--scrollbar-width);
    height: var(--scrollbar-width);
}

.history-dropdown::-webkit-scrollbar-track,
.menu-dropdown::-webkit-scrollbar-track,
.menu-submenu::-webkit-scrollbar-track {
    background: var(--color-menu-dropdown-bg);
}

.history-dropdown::-webkit-scrollbar-thumb,
.menu-dropdown::-webkit-scrollbar-thumb,
.menu-submenu::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 5px;
    border: 2px solid var(--color-menu-dropdown-bg);
}

.history-dropdown::-webkit-scrollbar-thumb:hover,
.menu-dropdown::-webkit-scrollbar-thumb:hover,
.menu-submenu::-webkit-scrollbar-thumb:hover {
    background: var(--scrollbar-thumb-hover);
}

/* Custom Checkbox/Radio Colors */
input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--color-accent-primary);
    background-color: var(--color-input-bg);
    border-color: var(--color-border-secondary);
}

/* ============================================
   LAYOUT
   ============================================ */
.main-container {
    flex: 1;
    display: flex;
    overflow: hidden;
    background-color: var(--color-bg-secondary);
}

.editor-pane,
.preview-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

.pane-header {
    background-color: var(--color-pane-header-bg);
    border-bottom: 1px solid var(--color-border-primary);
    padding: var(--space-sm) var(--space-lg);
    font-weight: bold;
    font-size: 12px;
    color: var(--color-pane-header-text);
}

.splitter {
    width: var(--space-xs);
    background-color: var(--color-border-primary);
    cursor: col-resize;
    position: relative;
    transition: background-color var(--transition-fast);
}

.splitter:hover {
    background-color: var(--color-accent-primary);
}

/* Single Pane / View Modes */
.single-pane .editor-pane,
.single-pane .preview-pane {
    flex: 1;
}

.single-pane .splitter {
    display: none;
}

.editor-only .preview-pane,
.preview-only .editor-pane {
    display: none;
}

.hidden-file-input {
    display: none;
}

/* ============================================
   MENU BAR
   ============================================ */
.menu-bar {
    background-color: var(--color-menu-bg);
    color: var(--color-text-tertiary);
    padding: var(--space-xs) 10px;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 14px;
    border-bottom: 1px solid var(--color-border-secondary);
    flex-wrap: wrap;
    transition: background-color var(--transition-medium), color var(--transition-medium), border-color var(--transition-medium);
}

.menu-separator {
    width: var(--separator-thickness);
    height: var(--space-xl);
    background-color: var(--color-border-secondary);
    margin: 0 var(--space-sm);
}

.menu-item {
    position: relative;
    padding: 6px 10px;
    cursor: pointer;
    border-radius: var(--radius-md);
    user-select: none;
    font-weight: 600;
    color: var(--color-text-secondary);
    transition: background-color var(--transition-fast);
}

.menu-item:hover {
    background-color: var(--color-menu-item-hover-bg);
}

.menu-item:focus {
    outline: 2px solid var(--color-accent-primary);
}

/* Dropdown Menus */
.menu-item .menu-dropdown {
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition:
        opacity var(--transition-fast) ease-out,
        transform var(--transition-fast) cubic-bezier(0.175, 0.885, 0.32, 1.275),
        visibility var(--transition-fast);
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 160px;
    background: var(--color-menu-dropdown-bg);
    border: 1px solid var(--color-border-secondary);
    box-shadow: var(--shadow-lg);
    z-index: var(--z-dropdown-menu);
    border-radius: var(--radius-lg);
    padding: 6px 0;
    cursor: default;
}

.menu-item.open .menu-dropdown {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.menu-dropdown-item {
    display: flex;
    align-items: center;
    width: 100%;
    text-align: left;
    padding: var(--space-sm) var(--space-md);
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    color: var(--color-text-primary);
    gap: var(--space-sm);
}

/* apply extra left offset only to items that may show a checkmark */
.menu-dropdown-item.menu-checkable {
    position: relative; /* contain absolutely positioned icon */
    padding-left: calc(var(--space-md) + 16px + var(--space-sm));
}

/* position the checkmark icon out of the flow so the padded text
   does not shift when the svg is added/removed */
.menu-dropdown-item.menu-checkable .menu-check-icon {
    position: absolute;
    left: var(--space-md);
    /* flex-shrink/width/height already defined elsewhere */
}

.menu-dropdown-item:hover {
    background: var(--color-menu-dropdown-hover-bg);
}

.menu-dropdown-item[disabled],
.menu-dropdown-item[disabled]:hover,
.menu-dropdown-item[disabled]:active {
    opacity: 1;
    color: var(--color-text-disabled);
    cursor: not-allowed;
    background: transparent !important;
}

.menu-divider {
    height: var(--separator-thickness);
    background: var(--color-border-secondary);
    margin: 6px 0;
}

/* Nested Dropdown / Submenu */
.menu-dropdown-item-group {
    position: relative;
    width: 100%;
}

.menu-submenu {
    visibility: hidden;
    opacity: 0;
    transform: translateX(-10px);
    transition:
        opacity var(--transition-fast) ease-out,
        transform var(--transition-fast) cubic-bezier(0.175, 0.885, 0.32, 1.275),
        visibility var(--transition-fast);
    position: absolute;
    top: -6px;
    left: 100%;
    min-width: 150px;
    background: var(--color-menu-dropdown-bg);
    border: 1px solid var(--color-border-secondary);
    box-shadow: var(--shadow-lg);
    z-index: var(--z-dropdown-menu);
    border-radius: var(--radius-lg);
    padding: 6px 0;
    margin-left: 2px;
}

.menu-dropdown-item-group:hover .menu-submenu,
.menu-dropdown-item-group:focus-within .menu-submenu {
    visibility: visible;
    opacity: 1;
    transform: translateX(0);
}

.menu-submenu .menu-dropdown-item {
    font-size: 13px;
    color: var(--color-text-primary);
}

.menu-submenu.open-left {
    left: auto;
    right: 100%;
    margin-left: 0;
    margin-right: 2px;
    transform: translateX(10px);
}

.menu-dropdown-item-group:hover .menu-submenu.open-left,
.menu-dropdown-item-group:focus-within .menu-submenu.open-left {
    transform: translateX(0);
}

.menu-item-no-padding {
    padding: 0;
}

/* ============================================
   TOOLBAR
   ============================================ */
.toolbar-container {
    display: flex;
    justify-content: center;
    flex-grow: 1;
    gap: 8px;
    flex-wrap: wrap;
}

.toolbar-group {
    display: flex;
    gap: 4px;
    padding-right: 12px;
    border-right: var(--separator-thickness) solid var(--color-border-secondary);
}

.toolbar-group:last-child {
    border-right: none;
}

.toolbar-btn {
    background-color: var(--color-bg-tertiary);
    border: 1px solid var(--color-border-secondary);
    padding: 6px var(--space-md);
    cursor: pointer;
    border-radius: var(--radius-sm);
    font-size: 12px;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.toolbar-btn:hover {
    background-color: var(--color-bg-hover);
    border-color: var(--color-border-dark);
}

.toolbar-btn:active {
    background-color: var(--color-bg-active);
}

.toolbar-btn.active {
    background-color: var(--color-accent-primary);
    color: white;
    border-color: var(--color-accent-hover);
}

.toolbar-btn[disabled],
.toolbar-btn[disabled]:hover,
.toolbar-btn[disabled]:active {
    opacity: 1;
    color: var(--color-text-disabled);
    background-color: var(--color-bg-primary);
    border-color: var(--color-border-light);
    cursor: not-allowed;
}

.toolbar-btn.icon-only {
    padding: 6px;
    justify-content: center;
}

.toolbar-btn .material-symbols-rounded {
    font-size: 18px;
    width: 18px;
    /* Override global 24px width for compact toolbar */
}

/* Helper classes for Toolbar Dropdowns */
.heading-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 2px;
}

.dropdown-arrow {
    margin-left: 2px;
}

.menu-icon {
    font-size: 16px;
    width: 16px;
    height: 16px;
    /* Explicitly square */
    margin-right: 4px;
    vertical-align: middle;
}

.icon-18 {
    font-size: 18px;
    width: 18px;
    height: 18px;
    /* Explicitly square */
}

/* Table Grid Selector */
.table-dropdown {
    min-width: 165px;
    padding: 6px 0;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border-secondary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.table-grid-container {
    margin-bottom: 0;
    padding: 6px 12px;
}

.table-grid-preview {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: 12px;
    text-align: center;
}

.table-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    padding: 2px;
    /* Slight buffer */
}

.table-grid-cell {
    width: 24px;
    height: 24px;
    border: 1px solid var(--color-border-secondary);
    background-color: var(--color-bg-tertiary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.table-grid-cell:hover,
.table-grid-cell.active {
    border-color: var(--color-accent-primary);
    background-color: var(--color-accent-primary);
}

.table-grid-cell.active {
    opacity: 0.8;
    /* Solid enough to look selected */
    box-shadow: 0 0 4px rgba(0, 122, 204, 0.4);
}

/* View Toggle */
.view-toggle {
    display: flex;
    gap: 2px;
}

.view-toggle button {
    background-color: var(--color-bg-tertiary);
    border: 1px solid var(--color-border-secondary);
    padding: var(--space-xs) var(--space-sm);
    cursor: pointer;
    font-size: 11px;
}

.view-toggle button.active {
    background-color: var(--color-accent-primary);
    color: white;
}

/* ============================================
   EDITOR & PREVIEW
   ============================================ */
.editor-textarea {
    flex: 1;
    border: none;
    outline: none;
    padding: var(--space-xl);
    font-family:
        ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas,
        "Liberation Mono", "Courier New", monospace;
    font-size: 14px;
    line-height: 1.5;
    resize: none;
    background-color: var(--color-bg-secondary);
    color: var(--color-text-primary);
    min-width: 0;
}

.editor-textarea.no-wrap {
    white-space: pre;
    overflow-x: auto;
    min-width: 0;
}

.preview-content {
    flex: 1;
    padding: var(--space-xl);
    background-color: var(--color-bg-secondary);
    color: var(--color-text-primary);
    overflow-y: auto;
    border-left: 1px solid var(--color-border-primary);
    min-width: 0;
    /* match the new regular size used by the editor */
    /* scale back to the regular 16px default instead of a smaller 14px */
    font-size: 14px;
    line-height: 1.5;
}

/* Markdown Styles in Preview */
.preview-content h1,
.preview-content h2,
.preview-content h3,
.preview-content h4,
.preview-content h5,
.preview-content h6 {
    margin-top: 20px;
    margin-bottom: 10px;
    line-height: 1.2;
}

.preview-content h1 {
    font-size: 2em;
    border-bottom: 2px solid var(--color-border-light);
    padding-bottom: 10px;
}

.preview-content h2 {
    font-size: 1.5em;
    border-bottom: 1px solid var(--color-border-light);
    padding-bottom: var(--space-sm);
}

.preview-content h3 {
    font-size: 1.3em;
}

.preview-content h4 {
    font-size: 1.1em;
}

.preview-content h5 {
    font-size: 1em;
}

.preview-content h6 {
    font-size: 0.9em;
}

.preview-content p {
    margin-bottom: 15px;
    line-height: 1.6;
}

.preview-content ul,
.preview-content ol {
    margin-bottom: 15px;
    padding-left: 30px;
}

.preview-content li {
    margin-bottom: 5px;
}

.preview-content code {
    background-color: var(--color-code-bg);
    padding: 2px var(--space-xs);
    border-radius: var(--radius-sm);
    font-family:
        ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas,
        "Liberation Mono", "Courier New", monospace;
    -webkit-text-fill-color: initial;
    color: var(--color-code-text);
}

.preview-content del {
    text-decoration: line-through;
    color: var(--color-text-primary);
}

.preview-content a {
    color: var(--color-link);
    text-decoration: underline;
}

.preview-content a:hover {
    color: var(--color-link-hover);
}

.preview-content img {
    max-width: 100%;
    height: auto;
}

.preview-content pre {
    background-color: var(--color-pre-bg);
    border: 1px solid var(--color-border-primary);
    border-radius: var(--radius-sm);
    padding: 0;
    overflow: auto;
    max-height: 500px;
    margin-bottom: 15px;
}

.preview-content pre code {
    background-color: transparent;
    padding: 12px 15px;
    /* make inline code blocks match editor size as well */
    font-size: 14px;
    line-height: 1.45;
    display: block;
    width: fit-content;
    min-width: 100%;
}

.preview-content hr {
    border: none;
    border-top: 1px solid var(--color-border-primary);
    margin: var(--space-lg) 0;
}

.preview-content blockquote {
    border-left: var(--space-xs) solid var(--color-blockquote-border);
    background: var(--color-blockquote-bg);
    padding: 10px var(--space-xl);
    margin: 15px 0;
    color: var(--color-blockquote-text);
    font-family: inherit;
}

.preview-content blockquote blockquote {
    border-left-color: var(--color-blockquote-nested-border);
    background: var(--color-blockquote-nested-bg);
    margin-top: 10px;
    margin-bottom: 10px;
}

.preview-content blockquote> :first-child {
    margin-top: 0;
}

.preview-content blockquote> :last-child {
    margin-bottom: 0;
}

/* Image Info Badge */
.md-img-info-wrap {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    max-width: 100%;
}

.md-img-info-wrap img {
    display: block;
    max-width: 100%;
    height: auto;
}

.md-img-info-badge {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: var(--color-accent-primary);
    color: #fff;
    font-size: 13px;
    font-family: inherit;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    z-index: 2;
    border: 2px solid var(--color-bg-secondary);
    transition: background var(--transition-fast);
}

.md-img-info-badge:hover {
    background: var(--color-accent-hover);
}

.md-img-info-popup {
    visibility: hidden;
    opacity: 0;
    transform: translateY(10px);
    transition:
        opacity var(--transition-fast) ease-out,
        transform var(--transition-fast) cubic-bezier(0.175, 0.885, 0.32, 1.275),
        visibility var(--transition-fast);
    position: absolute;
    bottom: 34px;
    right: 0;
    min-width: 200px;
    max-width: 300px;
    background: var(--color-bg-secondary);
    color: var(--color-text-primary);
    border: 1px solid var(--color-border-secondary);
    border-radius: var(--radius-md);
    padding: 8px 12px;
    box-shadow: var(--shadow-md);
    z-index: 10;
    font-size: 13px;
    line-height: 1.4;
    text-align: left;
    white-space: normal;
}

.md-img-info-popup.open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

/* Table styles (basic support) */
.preview-content table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 15px;
}

.preview-content th,
.preview-content td {
    border: 1px solid var(--color-border-primary);
    padding: 6px 13px;
}

.preview-content tr:nth-child(2n) {
    background-color: var(--color-table-row-even-bg);
}

/* ============================================
   HIGHLIGHT.JS SYNTAX HIGHLIGHTING
   ============================================ */
.hljs {
    background-color: transparent !important;
    font-family:
        ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas,
        "Liberation Mono", "Courier New", monospace;
}

/* ============================================
   STATUS BAR
   ============================================ */
.status-bar {
    background-color: var(--color-accent-primary);
    color: white;
    padding: var(--space-xs) var(--space-lg);
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-item {
    margin-left: var(--space-xl);
}

/* ============================================
   FIND & REPLACE BAR
   ============================================ */
.find-replace-bar {
    position: fixed;
    left: 50%;
    right: auto;
    top: 70px;
    transform: translateX(-50%) translateY(-10px) scale(0.95);
    background: var(--color-find-replace-bg);
    border: 1px solid var(--color-border-secondary);
    padding: 10px;
    z-index: var(--z-find-replace);
    min-width: 520px;
    max-width: calc(100% - 40px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    font-size: 13px;
    border-radius: var(--radius-lg);
    opacity: 0;
    pointer-events: none;
    transition:
        opacity 0.1s ease-in,
        transform 0.1s ease-in;
}

.find-replace-bar.position-bottom {
    top: auto;
    bottom: var(--find-replace-bottom-offset);
    transform: translateX(-50%) translateY(10px) scale(0.95);
}

.find-replace-bar.open {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
    pointer-events: auto;
    transition:
        opacity 0.1s ease-out,
        transform 0.1s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.find-replace-bar .fr-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: nowrap;
}

/* Replace row animation container */
.find-replace-bar .fr-row:nth-child(2) {
    overflow: hidden;
    max-height: 50px;
    opacity: 1;
    margin-top: 8px;
    transition:
        max-height 0.25s ease-in-out,
        opacity 0.2s ease-in-out,
        margin-top 0.25s ease-in-out;
}

.find-replace-bar.compact .fr-row:nth-child(2) {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

.input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    min-width: 120px;
}

.find-replace-bar .fr-input {
    flex: 1;
    width: 100%;
    height: 32px;
    box-sizing: border-box;
    padding: 0 10px;
    border: 1px solid var(--color-border-secondary);
    border-radius: var(--radius-md);
    font-size: 13px;
    background-color: var(--color-input-bg);
    color: var(--color-input-text);
}

.find-replace-bar.compact .fr-input {
    padding: 0 8px;
}

.find-replace-bar .fr-btn {
    padding: 7px var(--space-md);
    min-height: 32px;
    border: 1px solid var(--color-border-secondary);
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-md);
    cursor: pointer;
    white-space: nowrap;
    font-size: 13px;
    transition:
        background-color var(--transition-fast),
        color var(--transition-fast),
        border-color var(--transition-fast);
}

.find-replace-bar .fr-btn:hover {
    background: var(--color-bg-hover);
    border-color: var(--color-border-dark);
}

#btn-find-prev,
#btn-find-next {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.find-replace-bar .fr-close {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 0; 
    border: none;
    background: transparent;
    font-weight: bold;
    cursor: pointer;
    font-size: 16px;
    transition:
        background-color 0.2s,
        color 0.2s;
    border-radius: 4px;
}

.find-replace-bar .fr-close:hover {
    background: var(--color-danger);
    color: #fff;
}

.find-replace-bar .fr-count {
    font-size: 12px;
    color: var(--color-text-muted);
    min-width: 60px;
    text-align: center;
}

.find-replace-bar .fr-checkbox {
    font-size: 12px;
    display: flex;
    gap: 6px;
    align-items: center;
    margin-left: 8px;
    white-space: nowrap;
}

.find-replace-bar .fr-compact-toggle {
    width: 32px;
    height: 32px;
    min-width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* Flag Menu */
.fr-flag-dropdown {
    position: relative;
    display: inline-block;
    margin-left: 0;
    margin-right: 6px;
}

.fr-flag-btn {
    width: 32px;
    height: 32px;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fr-flag-menu {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 200px;
    background: var(--color-menu-dropdown-bg);
    border: 1px solid var(--color-border-secondary);
    box-shadow: var(--shadow-md);
    padding: var(--space-sm) 0;
    border-radius: var(--radius-lg);
    z-index: var(--z-flag-menu);
    transform: translateY(-10px);
    transition: all 0.1s ease-in;
}

.find-replace-bar.position-bottom .fr-flag-menu {
    top: auto;
    bottom: calc(100% + 10px);
    transform: translateY(10px);
}

.fr-flag-dropdown.open .fr-flag-menu {
    visibility: visible;
    opacity: 1;
    top: calc(100% + 6px);
    transform: translateY(0);
    transition: all 0.1s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.find-replace-bar.position-bottom .fr-flag-dropdown.open .fr-flag-menu {
    top: auto;
    bottom: calc(100% + 6px);
}

.fr-flag-menu .fr-checkbox {
    display: flex;
    align-items: center;
    padding: 6px 12px;
    margin: 0;
    cursor: pointer;
    font-weight: normal;
}

.fr-flag-menu .fr-checkbox:hover {
    background-color: var(--color-menu-dropdown-hover-bg);
}

/* History Dropdown */
.history-dropdown {
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition:
        opacity var(--transition-fast) ease-out,
        transform var(--transition-fast) cubic-bezier(0.175, 0.885, 0.32, 1.275),
        visibility var(--transition-fast);
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-menu-dropdown-bg);
    border: 1px solid var(--color-border-secondary);
    border-top: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: var(--z-history-menu);
    max-height: 200px;
    overflow-y: auto;
    border-bottom-left-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
}

.find-replace-bar.position-bottom .history-dropdown {
    top: auto;
    bottom: 100%;
    transform: translateY(10px);
    border-top: 1px solid var(--color-border-secondary);
    border-bottom: none;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: var(--radius-md);
    border-top-right-radius: var(--radius-md);
}

.history-dropdown.open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.history-item {
    padding: 6px 10px;
    cursor: pointer;
    font-size: 13px;
    color: var(--color-text-primary);
}

.history-item:hover {
    background-color: var(--color-menu-dropdown-hover-bg);
}

/* Match Highlights in Preview/History */
.md-match {
    background: var(--color-match-bg);
    color: var(--color-text-primary);
    padding: 0 2px;
    border-radius: 2px;
}

.md-match-current {
    background: var(--color-match-current-bg);
    color: var(--color-text-primary);
    padding: 0 2px;
    border-radius: 2px;
}

.history-item .match-highlight {
    font-weight: bold;
    color: var(--color-accent-primary);
}

/* Icons in FR bar */
.fr-btn svg,
#fr-flag-btn svg,
#fr-compact-toggle svg {
    margin: 0 auto;
    display: block;
}

#fr-flag-btn svg {
    width: 18px;
    height: 18px;
}

#fr-compact-toggle svg {
    width: 20px;
    height: 20px;
}

/* ============================================
   DIALOGS
   ============================================ */
#popup-overlay {
    transition:
        opacity var(--transition-slow) ease,
        visibility var(--transition-slow) ease;
    opacity: 0;
    visibility: hidden;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--z-popup-overlay);
}

#popup-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Generic Dialog Style (Shared) */
.generic-dialog {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    background: var(--color-dialog-bg);
    border: 1px solid var(--color-border-secondary);
    padding: var(--space-lg);
    z-index: var(--z-dialog);
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-lg);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.95);
    transition:
        opacity var(--transition-fast) ease-out,
        transform var(--transition-fast) cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}

.generic-dialog.open {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

.generic-dialog h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
}

.generic-dialog label {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
}

#custom-alert-message,
#custom-confirm-message {
    font-size: 13px;
}

.generic-dialog input[type="text"],
.generic-dialog input[type="number"] {
    width: 100%;
    padding: var(--space-sm);
    font-size: 14px;
    border: 1px solid var(--color-border-secondary);
    border-radius: var(--radius-md);
    box-sizing: border-box;
    background-color: var(--color-input-bg);
    color: var(--color-input-text);
}

.generic-dialog button {
    padding: var(--space-sm) var(--space-lg);
    border: 1px solid var(--color-border-secondary);
    background: var(--color-bg-primary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.generic-dialog button:hover {
    background: var(--color-bg-hover);
}

.dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 15px;
}

.dialog-actions button {
    flex: 1;
}

.generic-dialog button.primary {
    background: var(--color-accent-primary);
    color: white;
    border-color: var(--color-accent-primary);
}

.generic-dialog button.primary:hover {
    background: var(--color-accent-hover);
}

/* Specific Dialog Sizes */

.dialog-400 {
    width: 400px;
}

/* Help & Changelog Popups */
.fullscreen-popup {
    display: none;
    position: fixed;
    top: 5vh;
    left: 50%;
    transform: translateX(-50%);
    width: 90vw;
    height: 90vh;
    z-index: var(--z-fullscreen-popup);
    background: var(--color-bg-secondary);
    border: 2px solid var(--color-accent-primary);
    box-shadow: var(--shadow-xl);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.popup-close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

.fullscreen-popup iframe {
    width: 100%;
    height: calc(100% - 44px);
    border: none;
    background: #fff;
}

/* ============================================
   ANIMATIONS (CHECKMARK)
   ============================================ */
.check-anim-container {
    position: absolute;
    pointer-events: none;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.check-anim-svg {
    width: 24px;
    height: 24px;
    stroke: var(--color-text-primary);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    opacity: 0;
    transform: scale(1);
}

.check-anim-path {
    stroke-dasharray: 24;
    stroke-dashoffset: 24;
}

/* Animation Classes */
.animate-check-start .check-anim-svg {
    animation: check-fade-scale 0.6s ease-in-out forwards;
}

.animate-check-start .check-anim-path {
    animation: check-draw 0.6s ease-in-out forwards;
}

@keyframes check-draw {
    0% {
        stroke-dashoffset: 24;
    }

    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes check-fade-scale {
    0% {
        opacity: 0;
        transform: scale(1);
    }

    20% {
        opacity: 1;
        transform: scale(1.2);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }

    100% {
        opacity: 0;
        transform: scale(1);
    }
}

/* Inline Menu Checkmark */
.menu-check-icon {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    opacity: 0;
    transform: scale(0.5);
    flex-shrink: 0;
}

.menu-check-path {
    stroke-dasharray: 24;
    stroke-dashoffset: 24;
}

.menu-check-active .menu-check-icon {
    animation: menu-check-fade-scale 0.4s ease-out forwards;
}

.menu-check-active .menu-check-path {
    animation: menu-check-draw 0.4s ease-out 0.1s forwards;
}

@keyframes menu-check-draw {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes menu-check-fade-scale {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }

    50% {
        opacity: 1;
        transform: scale(1.2);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {

    /* Hide UI elements */
    .menu-bar,
    .status-bar,
    .splitter,
    .view-toggle,
    .editor-pane,
    #find-replace-bar,
    .menu-dropdown,
    #popup-overlay,
    .check-anim-container,
    .zoom-toolbar,
    .generic-dialog,
    .fullscreen-popup,
    .table-grid-dropdown {
        display: none !important;
    }

    /* Reset layout for printing */
    body,
    html,
    .main-container {
        height: auto !important;
        overflow: visible !important;
        background-color: white !important;
    }

    /* Ensure preview is visible and takes full width */
    .preview-pane {
        display: block !important;
        flex: none !important;
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Reset zoom transform so print is always at 100% */
    .preview-content {
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
        overflow: visible !important;
        height: auto !important;
        transform: none !important;
        transform-origin: top left !important;
        width: 100% !important;
    }

    /* Ensure text color is black for printing */
    .preview-content,
    .preview-content * {
        color: black !important;
        background-color: transparent !important;
        box-shadow: none !important;
    }

    /* Preserve borders for tables/codeblocks and force wrapping */
    .preview-content pre {
        border: 1px solid #ccc !important;
        white-space: pre-wrap !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        overflow: visible !important;
        max-height: none !important;
    }

    .preview-content pre code {
        white-space: pre-wrap !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    .preview-content blockquote {
        border-left: 4px solid #ccc !important;
    }

    .preview-content a {
        text-decoration: underline !important;
        color: black !important;
    }
}

/* About Dialog Redesign */
.about-container {
    display: flex;
    flex-direction: row;
    gap: 20px;
    margin-bottom: 10px;
}

.about-icon {
    flex-shrink: 0;
    padding-top: 5px;
}

.about-content {
    flex-grow: 1;
    text-align: left;
}

/* ============================================
   HIGH CONTRAST MODE SUPPORT
   ============================================ */
@media (forced-colors: active) {

    /* Let browser handle most styling automatically */
    * {
        forced-color-adjust: auto;
    }

    /* Checkmark Animation Fix - ensure visibility */
    .check-anim-svg,
    .menu-check-icon {
        stroke: CanvasText !important;
    }

    .check-anim-path,
    .menu-check-path {
        stroke: CanvasText !important;
    }

    /* Disable Dark Mode Toggle in High Contrast Mode */
    #menu-view-darkmode,
    #menu-view-theme-group {
        display: none !important;
    }

    /* Links should use system link color */
    a {
        color: LinkText !important;
    }

    /* Hover and Focus States - Use border to indicate interaction */
    .toolbar-btn:hover,
    .toolbar-btn:focus,
    .menu-item:hover,
    .menu-item:focus,
    .menu-dropdown-item:hover,
    .menu-dropdown-item:focus,
    button:hover,
    button:focus {
        outline: 2px solid ButtonText !important;
        outline-offset: -2px;
    }

    .table-grid-cell.active,
    .splitter:hover,
    .splitter:focus {
        forced-color-adjust: none;
        background-color: Highlight !important;
        border: 1px solid Highlight !important;
        /* Match background */
    }

    .splitter {
        background-color: var(--color-accent-primary);
        border: 1px solid var(--color-accent-primary);
    }
}

/* ============================================
   ZOOM TOOLBAR
   ============================================ */
  .zoom-toolbar {
      position: fixed;
      top: 70px;
      left: 50%;
      transform: translateX(-50%) translateY(0);
    background: var(--color-find-replace-bg);
    border: 1px solid var(--color-border-secondary);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: var(--z-find-replace);
    opacity: 1;
    pointer-events: auto;
    font-size: 13px;
      transition:
          opacity var(--transition-fast) ease-out,
          transform var(--transition-fast) cubic-bezier(0.175, 0.885, 0.32, 1.275);
  }

  .zoom-toolbar.is-bottom {
      top: auto;
      bottom: 24px;
      transform: translateX(-50%) translateY(0);
  }
  
  .zoom-toolbar.hidden {
      opacity: 0;
      pointer-events: none;
      transform: translateX(-50%) translateY(-10px) scale(0.95);
      transition:
          opacity 0.15s ease-in,
          transform 0.15s ease-in;
  }

  .zoom-toolbar.is-bottom.hidden {
      transform: translateX(-50%) translateY(10px) scale(0.95);
  }

.zoom-toolbar-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-border-secondary);
    border-radius: var(--radius-md);
    background: var(--color-bg-tertiary);
    cursor: pointer;
    color: var(--color-text-primary);
    transition:
        background-color var(--transition-fast),
        border-color var(--transition-fast);
}

.zoom-toolbar-btn:hover {
    background: var(--color-bg-hover);
    border-color: var(--color-border-dark);
}

.zoom-toolbar-btn:active {
    background: var(--color-bg-active);
}

.zoom-toolbar-btn svg {
    display: block;
}

/* Zoom Range Slider */
#zoom-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 120px;
    height: 6px;
    border-radius: 3px;
    outline: none;
    cursor: pointer;
    /* Track background is set dynamically via JS */
}

#zoom-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background-color: var(--color-accent-primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

#zoom-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background-color: var(--color-accent-primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.zoom-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-primary);
    min-width: 38px;
    text-align: center;
    user-select: none;
}

.zoom-toolbar-close {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    color: var(--color-text-primary);
    border-radius: 4px;
    transition:
        background-color 0.2s,
        color 0.2s;
}

.zoom-toolbar-close:hover {
    background: var(--color-danger);
    color: #fff;
}

/* Preview content zoom transition */
.preview-content {
    transform-origin: top left;
    transition: transform 0.1s ease-out;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 600px) {
    .toolbar-container {
        display: none !important;
    }

    .menu-bar {
        padding-bottom: 6px;
    }
}
