﻿/* Kejian.razor.css or global styles */
.main-wrapper {
    width: 100%;
    height: calc(100vh - 55px);
    display: flex;
    overflow: hidden;
}
.kejian-sidebar-external {
    width: 60%; /* 左侧预览区固定为60% */
    height: calc(100% - 55px);
    overflow: hidden;
    border-right: 1px solid #dee2e6;
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
    position: relative;
}
    /* 隐藏容器的样式 */
    .kejian-sidebar-external.hidden {
        display: none;
    }
.preview-container1 {
    flex: 1 1 auto;
    overflow: auto;
    padding: 10px;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
}

.kejian-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 55px); /* Full viewport height minus assumed nav/status bar */
    overflow: hidden; /* Prevent scrollbars on the container itself */
}
    /* 添加全宽类，当没有资源预览时使用 */
    .kejian-container.full-width {
        width: 100%;
        float: none;
    }
.kejian-header {
    padding: 10px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0; /* Header should not shrink */
}


/* 实录内容区 */
.kejian-content-area {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 10px;
}

/* 内容区布局 */
.kejian-content-layout {
    flex: 1 1 auto;
    display: flex;
    overflow: hidden;
}
/* 右侧主内容区 */
.kejian-main-content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

    /* 当有左侧边栏时的主内容区 */
    .kejian-main-content.with-sidebar {
        flex: 0 0 60%;
    }

    /* 当没有左侧边栏时的主内容区 */
    .kejian-main-content.full-width {
        flex: 1 1 auto;
    }

/* 过滤工具栏弹性布局修正 */
.filter-toolbar-wrapper {
    padding: 6px !important;
    min-height: 0 !important;
    line-height: 1.2 !important;
    gap: 3px !important;
    flex-shrink: 0; /* 新增此行 */
}
.filter-toolbar-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
}
    .filter-toolbar-group + .filter-toolbar-group {
        margin-left: 2px;
    }
.filter-toolbar-group-switches {
    margin-left: auto !important;
    justify-content: flex-end !important;
    display: flex !important;
}

    .filter-toolbar-group-switches .switch-item {
        margin-right: 0 !important;
    }

        .filter-toolbar-group-switches .switch-item:last-child {
            margin-right: 0 !important;
        }
.switch-label-text {
    margin-right: 4px;
    font-size: 13px;
    color: #333;
    white-space: nowrap;
    vertical-align: middle;
}

.filter-toolbar-wrapper .btn-custom,
.filter-toolbar-wrapper .custom-switch {
    padding: 2px 8px !important;
    font-size: 13px !important;
    height: 26px !important;
    min-height: 0 !important;
}

    .filter-toolbar-wrapper .custom-switch .switch-label {
        font-size: 13px !important;
        padding: 0 4px !important;
    }


.toolbar-caret-icons {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 18px;
    line-height: 1;
}
.show-filter-toolbar-btn-minimal svg {
    display: block;
    margin: 0 auto;
    transition: stroke 0.2s;
}

.show-filter-toolbar-btn-minimal:hover svg {
    stroke: #007bff;
}

.toolbar-caret-icons {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 18px;
    line-height: 1;
}

/* 响应式设计：小屏幕上变为上下布局 */
@media (max-width: 768px) {
    .filter-toolbar-wrapper {
        padding: 4px 6px !important;
        gap: 4px !important;
    }

        .filter-toolbar-wrapper .btn-custom,
        .filter-toolbar-wrapper .custom-switch {
            font-size: 12px !important;
            height: 22px !important;
            padding: 1px 4px !important;
        }

    .kejian-content-layout {
        flex-direction: column;
    }

    .kejian-sidebar {
        flex: 0 0 300px;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e0e0e0;
    }
    .kejian-main-content.with-sidebar {
        flex: 1 1 auto;
        width: 100%;
    }

    .main-wrapper {
        flex-direction: column;
    }

    .kejian-sidebar-external:not(.hidden) {
        width: 100%;
        height: calc(100vh - 55px);
    }

    .kejian-container {
        width: 100%;
        height: 100%;
    }

        .kejian-container.full-width {
            height: 100%;
        }
}
/* 桌面布局调整 - 确保在桌面模式下保持60/40的比例 */
@media (min-width: 769px) {
    .kejian-sidebar-external:not(.hidden) {
        width: 60%;
        height: calc(100vh - 55px);
    }

    .kejian-container {
        width: 40%;
    }

        .kejian-container.full-width {
            width: 100%;
        }
}
/* 动画效果 */
.microphone-active-animation {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}


/* 小结内容样式 */
.summary-content {
    padding: 10px;
    border-radius: 5px;
    /*    background-color: #f0f8ff;*/
}



.kejian-title {
    margin: 0;
    font-size: 1.3rem;
}

/* Styles for the main content area wrapper */
.kejian-main-content-wrapper {
    display: flex;
    flex-grow: 1; /* Allows this wrapper to take up available space */
    overflow: hidden; /* Important for managing overflow of children */
}

.kejian-input-area {
    flex: 1 1 50%;
    padding: 10px;
    overflow-y: auto;
    border-right: 1px solid #ccc;
    background-color: #fff;
}

.kejian-log-display-area {
    flex: 1 1 50%;
    padding: 10px;
    overflow-y: auto;
    background-color: #fdfdfd;
    border-left: 1px solid #eee;
}

/* 修改日志条目样式，确保使用虚线分隔且没有背景色 */
.log-entry {
    margin-bottom: 8px;
    padding: 5px 0;
    border-radius: 0;
    background-color: transparent !important; /* 强制移除背景色 */
    border: none;
    border-bottom: 1px dashed #dddddd; /* 更改为更明显的颜色 */
    position: relative;
}

    .log-entry:last-child {
        border-bottom: none;
    }

.log-timestamp {
    color: #888;
    margin-right: 8px;
    font-size: 0.85em; /* Adjusted relative to the new .log-entry font-size */
}

.log-event-start strong,
.log-event-end strong,
.log-event-summary strong {
    color: #007bff;
}

.log-event-evaluation strong { /* Default color for evaluation text if no specific category matches */
    color: #28a745; /* Default to green, or choose another neutral color */
}

/* Colors for old "好", "中", "差" evaluations (if still used or for historical data) */
.log-event-evaluation.log-evaluation-good strong {
    color: #1e7e34; /* Darker Green, matching success button */
}

.log-event-evaluation.log-evaluation-medium strong {
    color: #d27d00; /* Darker Amber, matching warning button */
}

.log-event-evaluation.log-evaluation-bad strong {
    color: #b02a37; /* Darker Red, matching danger button */
}

/* NEW: Colors for Qingzhi evaluation categories in the log */
.log-event-evaluation.log-eval-focus strong {
    color: #1e7e34; /* Darker Green, matching '专注度' (qingzhi-btn-success) */
}

.log-event-evaluation.log-eval-participation strong {
    color: #d27d00; /* Darker Amber, matching '参与度' (qingzhi-btn-warning) */
}

.log-event-evaluation.log-eval-achievement strong {
    color: #b02a37; /* Darker Red, matching '达成度' (qingzhi-btn-danger) */
}

.log-event-rollcall strong {
    color: #17a2b8;
}

.log-event-auto-clear {
    color: #6c757d;
    font-style: italic;
}

/* 修改评价表情区域的样式 */
.evaluation-emoji {
    font-size: 1.2em;
    padding-left: 12px; /* 给分隔线留出空间 */
}

/* 为了更好的视觉效果，稍微调整文字样式 */
.emoji-text {
    font-size: 0.95em;
    font-style: italic;
    color: #555;
}

.kejian-footer {
    padding: 10px;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    flex-shrink: 0;
    gap: 10px;
}

.btn-custom {
    border-radius: 5px;
    padding: 8px 12px;
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.2;
    min-height: 58px;
    box-sizing: border-box;
}

    .btn-custom .button-icon-wrapper {
        margin-bottom: 4px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .btn-custom .icon-indicator-container {
        position: relative;
        margin-bottom: 4px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .btn-custom .fa {
        font-size: 1.2em;
    }

.footer-btn {
    flex-grow: 1;
    flex-basis: 0;
}


/* Custom Dropdown Styles */
.qingzhi-evaluation-group {
    display: flex;
    align-items: stretch;
    background-color: transparent !important;
    gap: 10px;
    flex-grow: 3;
    flex-basis: 0;
    justify-content: center;
}

.custom-dropdown-container {
    position: relative;
    display: flex;
    flex-grow: 1;
    flex-basis: 0;
}

.custom-dropdown-trigger {
    cursor: pointer;
    user-select: none;
    width: 100%;
    position: relative;
}

    .custom-dropdown-trigger:not(.disabled-custom):not(:hover) {
        opacity: 1;
    }

.qingzhi-btn-success {
    background-color: #1e7e34;
    border: 1px solid #17682c;
    color: white;
}

.qingzhi-btn-warning {
    background-color: #d27d00;
    border: 1px solid #b86e00;
    color: white;
}

.qingzhi-btn-danger {
    background-color: #b02a37;
    border: 1px solid #93232e;
    color: white;
}

.custom-dropdown-trigger.qingzhi-btn-success span,
.custom-dropdown-trigger.qingzhi-btn-warning span,
.custom-dropdown-trigger.qingzhi-btn-danger span {
    color: #FFFFFF !important;
    opacity: 1 !important;
    text-shadow: none !important;
}

.custom-dropdown-trigger.qingzhi-btn-success .fa,
.custom-dropdown-trigger.qingzhi-btn-warning .fa,
.custom-dropdown-trigger.qingzhi-btn-danger .fa {
    color: #FFFFFF !important;
    opacity: 1 !important;
    text-shadow: none !important;
}


.custom-dropdown-trigger:hover:not(.disabled-custom) {
    opacity: 0.85;
}

.custom-dropdown-trigger .dropdown-caret {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.8em;
}

.custom-dropdown-menu {
    position: absolute;
    /* bottom: 100%; */ /* Keep this for footer menus, will be overridden by settings-menu-top */
    left: 0;
    /* right: 0; */ /* 移除 right: 0; 允许菜单根据内容扩展 */
    background-color: white; /* 确保有背景色 */
    border: 1px solid #ddd;
    border-radius: 0.25rem;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    /* min-width: 100%; */ /* 改为一个具体的最小宽度，或者 auto/fit-content */
    min-width: 150px; /* 例如：设置一个最小宽度，根据您的最长菜单项调整 */
    /* 或者尝试 width: auto; 或 width: fit-content; (注意浏览器兼容性) */
    width: auto; /* 允许宽度根据内容自适应 */
    padding: 0.5rem 0;
    list-style: none;
    max-height: none;
    overflow-y: auto;
}

    /* Themed menu backgrounds and borders (borders are now uniform) */
    .custom-dropdown-menu.menu-success {
        background-color: #e6f4ea; /* Very light green */
        /* border-color: #1e7e34; */ /* Optional: if you want themed border color too, uncomment */
    }

    .custom-dropdown-menu.menu-warning {
        background-color: #fffaf0; /* Very light amber/yellow */
        /* border-color: #d27d00; */ /* Optional: if you want themed border color too, uncomment */
    }

    .custom-dropdown-menu.menu-danger {
        background-color: #fff0f1; /* Very light pink/red */
        /* border-color: #b02a37; */ /* Optional: if you want themed border color too, uncomment */
    }
    .custom-dropdown-menu.settings-menu-top {
        bottom: auto; /* Reset bottom positioning */
        top: 100%; /* Position below the trigger */
    }
    .custom-dropdown-menu.settings-menu-left {
        position: absolute;
        top: 100%; /* 确保菜单从按钮底部开始 */
        right: 0;
        left: auto;
        transform: translateX(-100%) translateY(0); /* 水平向左平移100%，垂直不平移 */
        margin-right: 32px; /* 给按钮留出空间 */
        margin-top: 2px; /* 添加一点顶部间距 */
    }
.custom-dropdown-item {
    padding: 8px 12px;
    cursor: pointer;
    color: #212529;
    white-space: nowrap;
    text-align: center;
    font-size: 0.9em;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

/* Default hover for items (fallback or if no theme class) */
/* This will apply if an item is in a menu that doesn't have a specific theme, or if you prefer a generic hover */
.custom-dropdown-menu:not(.menu-success):not(.menu-warning):not(.menu-danger) .custom-dropdown-item:hover {
    background-color: #f0f0f0;
}

/* Themed hover for Success menu items */
.custom-dropdown-menu.menu-success .custom-dropdown-item:hover {
    background-color: #c8e6c9; /* Slightly darker light green for hover */
    color: #1b5e20; /* Darker green text for hover */
}

/* Themed hover for Warning menu items */
.custom-dropdown-menu.menu-warning .custom-dropdown-item:hover {
    background-color: #ffecb3; /* Slightly darker light amber for hover */
    color: #856404; /* Darker amber text for hover (already good) */
}

/* Themed hover for Danger menu items */
.custom-dropdown-menu.menu-danger .custom-dropdown-item:hover {
    background-color: #ffcdd2; /* Slightly darker light pink for hover */
    color: #c62828; /* Darker red text for hover */
}
/* 让评价菜单向上展开 */
.dropup-menu {
    bottom: 100%;
    top: auto !important;
    left: 0;
    position: absolute;
    z-index: 1000;
    margin-bottom: 8px;
    margin-top: 0;
    /* 可根据需要调整宽度/阴影等 */
}

.disabled-custom {
    opacity: 0.65;
    cursor: not-allowed !important;
}

.recording-indicator-dot {
    height: 8px;
    width: 8px;
    background-color: red;
    border-radius: 50%;
    display: inline-block;
    position: absolute;
    top: 0px;
    right: 0px;
    animation: blinker 1s linear infinite;
}

@keyframes blinker {
    50% {
        opacity: 0;
    }
}

.kejian-footer > .btn-custom,
.kejian-footer > .qingzhi-evaluation-group > .custom-dropdown-container {
}

.microphone-active-animation {
    animation: redWhiteAlternating 1s linear infinite;
}

@keyframes redWhiteAlternating {
    0% {
        color: white;
    }

    50% {
        color: red;
    }

    100% {
        color: white;
    }
}

/* kejian.css 或页面内 <style> */


.settings-dropdown-container {
    position: relative; /* 用于下拉菜单的定位 */
    margin-right: 10px; /* 设置按钮和标题之间的间距 */
}

.btn-settings {
    padding: 6px 10px; /* 调整按钮大小以适应头部 */
    font-size: 1em; /* 根据需要调整图标大小 */
    background-color: #6c757d; /* 一个中性的颜色示例 */
    color: white;
    border: none;
    border-radius: 4px;
}

    .btn-settings:hover {
        background-color: #5a6268;
    }

.settings-menu {
    /* .custom-dropdown-menu 应该已经有基本样式 */
    /* 如果需要，可以调整宽度或最大高度 */
    min-width: 120px;
    /* 根据custom-dropdown-menu的现有样式，可能需要调整left或right使其正确显示 */
}

.kejian-title {
    margin-left: 0; /* 如果之前有外边距，进行调整 */
    flex-grow: 1; /* 允许标题占据剩余空间 */
    text-align: center; /* 使标题居中（如果这是期望的行为） */
}

/* 微调上课/下课按钮，使其不被挤压 */
.kejian-header .btn-custom {
    white-space: nowrap; /* 防止文字换行 */
}
.student-list-page-container {
    padding: 15px;
    /* 其他您需要的样式 */
}

.student-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.student-list-actions button {
    /* 样式可以根据需要添加 */
}

/* 过滤工具栏样式 */
.filter-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

/* 添加到style标签中 */
.btn-custom.btn-sm {
    padding: 4px 8px;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0.2rem;
    min-height: 32px;
    min-width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-sm .icon-indicator-container {
    font-size: 16px;
    line-height: 1;
    margin-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-button-square {
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px !important;
    width: 32px;
    height: 32px;
}
/* 确保设置下拉触发按钮的图标居中 */
.custom-dropdown-trigger.btn-custom.btn-secondary.btn-sm {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    min-height: 32px;
    min-width: 32px;
}

    .custom-dropdown-trigger.btn-custom.btn-secondary.btn-sm .icon-indicator-container {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 0;
    }
.btn-sm .icon-indicator-container,
Button[Size=Small] .icon-indicator-container {
    font-size: 16px;
    line-height: 1;
}

/* AI助手的特殊样式 */
.ai-assistant-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.ai-input-area {
    position: sticky;
    bottom: 0;
    width: 100%;
    background-color: #f8f9fa;
    padding: 10px;
    border-top: 1px solid #dee2e6;
    margin-top: auto;
}

