﻿/* Blazor 错误提示层：默认隐藏，仅在框架检测到错误时显示 */
#blazor-error-ui {
    display: none;
    background: #fff3cd;
    border-top: 1px solid #ffc107;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.75rem 1.25rem;
    position: fixed;
    z-index: 9999;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.15);
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 0.5rem;
}

#components-reconnect-modal {
    display: none;
}

/*
 * Metronic 固定顶部栏 #kt_app_header：保持不透明，但背景色跟随 Bootstrap 5 的
 * CSS 变量 --bs-body-bg，使 data-bs-theme="dark" 时自动切换为暗色背景。
 */
body[data-kt-app-layout] #kt_app_header,
body[data-kt-app-layout] .app-header,
#kt_app_header,
.app-header {
    background-color: var(--bs-body-bg, #ffffff) !important;
    background-image: none !important;
    opacity: 1 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    z-index: 110 !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

#kt_app_header_container,
#kt_app_header .app-container,
#kt_app_header_wrapper {
    background-color: var(--bs-body-bg, #ffffff) !important;
    opacity: 1 !important;
}

/* 暗色模式下 box-shadow 改深色，避免白边 */
[data-bs-theme="dark"] #kt_app_header,
[data-bs-theme="dark"] .app-header {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) !important;
}

/* 若 toolbar 也是 fixed/sticky，同样跟随主题 */
body[data-kt-app-toolbar-fixed="true"] #kt_app_toolbar,
body[data-kt-app-toolbar-fixed="true"] .app-toolbar {
    background-color: var(--bs-body-bg, #ffffff) !important;
    opacity: 1 !important;
    backdrop-filter: none !important;
}

/* ─── RichTextEditor 富文本编辑器 ─── */
.ym-rte {
    border: 1px solid var(--bs-border-color, #e1e3ea);
    border-radius: 0.475rem;
    background: #fff;
}
.ym-rte-toolbar {
    border-bottom: 1px solid var(--bs-border-color, #e1e3ea);
    background: #f9f9f9;
    padding: 0.4rem 0.6rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}
.ym-rte-toolbar .btn {
    min-width: 32px;
    height: 28px;
    line-height: 1;
    padding: 0 0.45rem;
}
.ym-rte-toolbar .ym-rte-sep {
    width: 1px;
    background: #e1e3ea;
    margin: 2px 4px;
}
.ym-rte-content {
    padding: 0.65rem 0.85rem;
    outline: none;
    overflow-y: auto;
    line-height: 1.6;
}
.ym-rte-content[contenteditable="true"]:empty::before {
    content: attr(data-placeholder);
    color: #a1a5b7;
}
.ym-rte-content ul, .ym-rte-content ol { padding-left: 1.5rem; margin: 0.25rem 0; }
