/* GitDiary - Custom Styles */

/* Keyboard-focus visibility. Every interactive role="button"/role="option"
   element in the sidebar and search results is styled as a plain div; without
   an explicit focus ring, tab-through navigation is invisible. :focus-visible
   restricts the ring to keyboard traversal so mouse clicks don't leave a
   halo behind. */
[role="button"]:focus-visible,
[role="option"]:focus-visible,
.diary-entry-item:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
    border-radius: 4px;
}

:root {
    --sidebar-width: 350px;

    /* Dark palette (default before the boot script sets [data-theme]) */
    --bg-primary: #1a1b2e;
    --bg-secondary: #232540;
    --bg-tertiary: #2a2d4a;
    --text-primary: #e8e8f0;
    --text-secondary: #9a9ab0;
    --text-muted: #6a6a80;
    --accent: #7c6fff;
    --accent-hover: #958aff;
    --danger: #ff4757;
    --success: #2ed573;
    --warning: #ffa502;
    --border: #2d2f4a;
    --editor-bg: #1e2030;
    --sidebar-bg: #191a2e;
    --shadow-modal: 0 16px 48px rgba(0, 0, 0, 0.4);
    --overlay-bg: rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] {
    --bg-primary: #1a1b2e;
    --bg-secondary: #232540;
    --bg-tertiary: #2a2d4a;
    --text-primary: #e8e8f0;
    --text-secondary: #9a9ab0;
    --text-muted: #6a6a80;
    --accent: #7c6fff;
    --accent-hover: #958aff;
    --danger: #ff4757;
    --success: #2ed573;
    --warning: #ffa502;
    --border: #2d2f4a;
    --editor-bg: #1e2030;
    --sidebar-bg: #191a2e;
    --shadow-modal: 0 16px 48px rgba(0, 0, 0, 0.4);
    --overlay-bg: rgba(0, 0, 0, 0.6);
}

[data-theme="light"] {
    --bg-primary: #f7f7fb;
    --bg-secondary: #ffffff;
    --bg-tertiary: #eef0f6;
    --text-primary: #1e2030;
    --text-secondary: #4b4f66;
    --text-muted: #8a8fa5;
    --accent: #6558ff;
    --accent-hover: #4c40f0;
    --danger: #e63946;
    --success: #1ca55a;
    --warning: #d97706;
    --border: #dfe2ec;
    --editor-bg: #ffffff;
    --sidebar-bg: #f0f1f7;
    --shadow-modal: 0 16px 48px rgba(15, 20, 45, 0.15);
    --overlay-bg: rgba(15, 20, 45, 0.35);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.5;
}

.app-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== App Layout ===== */
.app-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.app-sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    /* Enables container queries below so the header adapts to the sidebar's
       actual width — not the viewport. */
    container-type: inline-size;
    container-name: sidebar;
}

.app-resizer {
    width: 4px;
    flex-shrink: 0;
    cursor: col-resize;
    background: transparent;
    position: relative;
    z-index: 1;
    transition: background 0.15s ease;
    /* Expand hit area without visually widening the divider. */
    margin: 0 -2px;
    border-left: 2px solid transparent;
    border-right: 2px solid transparent;
    background-clip: padding-box;
    touch-action: none;
    user-select: none;
}

.app-resizer:hover,
.app-resizer.is-dragging {
    background-color: var(--accent);
}

.app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.app-toolbar {
    padding: 8px 16px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
}

.app-editor {
    flex: 1;
    overflow: hidden;
    display: flex;
}

.app-statusbar {
    flex-shrink: 0;
}

/* ===== Sidebar ===== */
.sidebar {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.sidebar-header {
    padding: 16px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px 12px;
    border-bottom: 1px solid var(--border);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1 1 auto;
}

.sidebar-logo {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    display: block;
}

.sidebar-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
    /* When the header wraps to a second line, keep actions right-aligned. */
    margin-left: auto;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    border-radius: 4px;
    line-height: 1;
    transition: all 0.15s;
}

.btn-icon:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.sidebar-lang {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 3px 6px;
    font-size: 12px;
    cursor: pointer;
    outline: none;
    max-width: 120px;
}

.sidebar-lang:hover {
    border-color: var(--accent);
}

.sidebar-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.btn-new {
    background: var(--accent);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-new:hover {
    background: var(--accent-hover);
}

.sidebar-search {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.sidebar-search input {
    width: 100%;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
}

.sidebar-search input:focus {
    border-color: var(--accent);
}

.sidebar-search input::placeholder {
    color: var(--text-muted);
}

.sidebar-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.sidebar-list::-webkit-scrollbar {
    width: 6px;
}

.sidebar-list::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.year-group {
    margin-bottom: 4px;
}

.year-header {
    padding: 6px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    user-select: none;
}

.year-header:hover {
    color: var(--text-primary);
}

.toggle-icon {
    font-size: 10px;
    width: 12px;
    text-align: center;
}

.month-group {
    padding-left: 12px;
}

.month-header {
    padding: 4px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    user-select: none;
}

.month-header:hover {
    color: var(--text-secondary);
}

.diary-entry-item {
    padding: 4px 16px 4px 40px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 4px;
    margin: 1px 8px;
    transition: all 0.15s;
}

.diary-entry-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.diary-entry-item.selected {
    background: var(--accent);
    color: white;
}

/* Today's entry gets a subtle left-border stripe + accent-tinted dot so it's
   findable in a long list without stealing the selected-item styling. */
.diary-entry-item.is-today {
    color: var(--accent);
    font-weight: 500;
}

.diary-entry-item.is-today.selected {
    color: white;
}

.diary-entry-item .today-badge {
    display: inline-block;
    margin-left: 6px;
    color: var(--accent);
    font-weight: 700;
}

.diary-entry-item.is-today.selected .today-badge {
    color: rgba(255, 255, 255, 0.9);
}

.sidebar-empty {
    padding: 32px 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* Sidebar container-query adaptations. Trigger off the sidebar's own width
   (declared via `container-type: inline-size` on .app-sidebar) so header
   controls degrade gracefully when the user drags the resizer narrow. */
@container sidebar (max-width: 340px) {
    .sidebar-lang {
        max-width: 96px;
    }
}

@container sidebar (max-width: 300px) {
    /* Hide the "📅 Diary" text label — the SVG logo alone identifies the app. */
    .sidebar-header h3 {
        display: none;
    }
    .sidebar-lang {
        max-width: 80px;
        padding: 3px 4px;
        font-size: 11px;
    }
    .btn-new {
        padding: 6px 10px;
        font-size: 12px;
    }
}

@container sidebar (max-width: 240px) {
    /* Very narrow: shrink to essentials. The header will naturally wrap the
       actions row below the brand thanks to `flex-wrap: wrap` above. */
    .sidebar-header {
        padding: 12px;
    }
    .sidebar-header-actions {
        gap: 4px;
    }
    .sidebar-lang {
        max-width: 68px;
    }
}

/* ===== Editor ===== */
.diary-editor {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--editor-bg);
}

.editor-toolbar {
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
}

.editor-date {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.editor-actions {
    display: flex;
    gap: 8px;
}

.btn-save,
.btn-commit,
.btn-preview-toggle,
.btn-delete {
    padding: 6px 14px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-save:hover:not(:disabled) {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

.btn-save:disabled,
.btn-commit:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-commit {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.btn-commit:hover:not(:disabled) {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.btn-preview-toggle:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.btn-delete:hover {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

.editor-content {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.editor-textarea {
    flex: 1;
    padding: 20px 24px;
    background: var(--editor-bg);
    color: var(--text-primary);
    border: none;
    outline: none;
    resize: none;
    font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
    font-size: 15px;
    line-height: 1.7;
    tab-size: 4;
}

.editor-textarea::placeholder {
    color: var(--text-muted);
}

.editor-preview {
    flex: 1;
    padding: 20px 24px;
    overflow-y: auto;
    background: var(--editor-bg);
}

.editor-loading {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 16px;
}

.editor-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.editor-empty .empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.editor-empty h2 {
    font-size: 24px;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.editor-empty p {
    font-size: 14px;
    text-align: center;
}

/* Empty-state CTA — visually mirrors the "+ Today" sidebar button so users
   recognize it as the same action. */
.editor-empty .empty-cta {
    margin-top: 20px;
    padding: 10px 20px;
    font-size: 14px;
}

/* ===== Markdown Preview ===== */
.markdown-body {
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.7;
}

.markdown-body h1 { font-size: 26px; margin-bottom: 16px; color: var(--text-primary); font-weight: 700; }
.markdown-body h2 { font-size: 22px; margin-bottom: 12px; color: var(--text-primary); font-weight: 600; }
.markdown-body h3 { font-size: 18px; margin-bottom: 10px; color: var(--text-primary); font-weight: 600; }
.markdown-body p { margin-bottom: 12px; }
.markdown-body ul, .markdown-body ol { margin-bottom: 12px; padding-left: 24px; }
.markdown-body li { margin-bottom: 4px; }
.markdown-body code {
    background: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 13px;
}
.markdown-body pre {
    background: var(--bg-tertiary);
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 16px;
}
.markdown-body pre code {
    background: none;
    padding: 0;
}
.markdown-body blockquote {
    border-left: 3px solid var(--accent);
    padding-left: 16px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}
.markdown-body a {
    color: var(--accent);
    text-decoration: none;
}
.markdown-body a:hover {
    text-decoration: underline;
}

/* Mermaid preview: centre the SVG and give render errors a visible surface
   without breaking the surrounding markdown flow. */
.markdown-body .mermaid {
    display: flex;
    justify-content: center;
    margin: 12px 0;
    overflow-x: auto;
}
.markdown-body .mermaid svg {
    max-width: 100%;
    height: auto;
}
.markdown-body .mermaid-error {
    color: #f66;
    border: 1px solid #f66;
    background: rgba(255, 102, 102, 0.08);
    padding: 8px 12px;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12px;
    white-space: pre-wrap;
    margin: 12px 0;
}

/* ===== Status Bar ===== */
.status-bar {
    padding: 8px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    font-size: 12px;
}

.status-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-synced { color: var(--success); }
.status-saving { color: var(--accent); }
.status-pending { color: var(--warning); }
.status-conflict { color: var(--danger); }
.status-failed { color: var(--danger); }
.status-message { color: var(--text-muted); }

.status-right {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted);
}

/* Offline banner — status-bar right cluster. Uses the warning colour so it's
   noticeable without stealing focus from Conflict/Failed which live on the
   left cluster. */
.status-offline {
    color: var(--warning);
    font-weight: 500;
}

.status-wordcount {
    color: var(--text-muted);
}

/* ===== Search Box ===== */
.search-box {
    position: relative;
}

.search-input-wrapper {
    display: flex;
    gap: 8px;
}

.search-input-wrapper input {
    flex: 1;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 13px;
    outline: none;
}

.search-input-wrapper input:focus {
    border-color: var(--accent);
}

.btn-search {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 14px;
}

.btn-search:hover:not(:disabled) {
    background: var(--accent);
    border-color: var(--accent);
}

.btn-search:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-top: 4px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: var(--shadow-modal);
}

.search-results-header {
    padding: 10px 12px;
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.btn-close-results {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px 6px;
    font-size: 14px;
}

.btn-close-results:hover {
    color: var(--text-primary);
}

.search-result-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--bg-tertiary);
}

.result-date {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 4px;
}

.result-preview {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== Setup Wizard ===== */
.setup-wizard {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    padding: 24px;
}

.setup-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 48px;
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-modal);
}

.setup-header {
    text-align: center;
    margin-bottom: 36px;
}

.setup-header h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.setup-subtitle {
    color: var(--text-secondary);
    font-size: 15px;
}

.setup-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input {
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.form-group input:focus {
    border-color: var(--accent);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-group select {
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    cursor: pointer;
}

.form-group select:focus {
    border-color: var(--accent);
}

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
}

.form-hint a {
    color: var(--accent);
    text-decoration: none;
}

.form-hint a:hover {
    text-decoration: underline;
}

.form-error {
    padding: 10px 14px;
    background: rgba(255, 71, 87, 0.1);
    border: 1px solid var(--danger);
    border-radius: 8px;
    color: var(--danger);
    font-size: 13px;
}

.form-actions {
    padding-top: 8px;
}

.btn-primary {
    width: 100%;
    padding: 12px 24px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover:not(:disabled) {
    background: var(--accent-hover);
}

.btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.setup-footer {
    margin-top: 24px;
    text-align: center;
}

.setup-footer p {
    font-size: 12px;
    color: var(--text-muted);
}

/* ===== Settings Overlay ===== */
.settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: var(--overlay-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 300;
    overflow-y: auto;
    padding: 24px;
}

.settings-container {
    width: 100%;
    max-width: 480px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.settings-container .setup-card {
    margin: 0;
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: var(--overlay-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.modal-dialog {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 32px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-modal);
}

.modal-content h3 {
    font-size: 18px;
    margin-bottom: 12px;
}

.modal-content p {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.modal-date {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px !important;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.btn-cancel {
    padding: 8px 20px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    cursor: pointer;
    font-size: 13px;
}

.btn-cancel:hover {
    background: var(--border);
}

.btn-cancel-full {
    width: 100%;
    padding: 12px 24px;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.btn-cancel-full:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-confirm-delete {
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    background: var(--danger);
    color: white;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
}

.btn-confirm-delete:hover {
    opacity: 0.9;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ===== Loading ===== */
.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto 0 auto;
}

    .loading-progress circle {
        fill: none;
        stroke: var(--border);
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: var(--accent);
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
    color: var(--text-secondary);
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

#blazor-error-ui {
    color-scheme: light only;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    color: var(--text-primary);
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }
