/**
 * 聊天窗口面板 - 重点提醒样式
 * 独立样式：chat-highlight__* 前缀，仅本功能使用
 * 字体：Microsoft YaHei（符合项目字体规范）
 */

.chat-window-panel .chat-highlight__toolbar-btn {
    width: 22px;
    height: 22px;
    background: transparent;
    border-radius: 4px;
    border: none;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.chat-window-panel .chat-highlight__toolbar-btn.is-disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.chat-window-panel .chat-highlight__toolbar-btn:not(.is-disabled):hover .chat-window-tool-svg {
    color: var(--cw-text);
}

/* 重点提醒弹窗基础结构 */
.chat-highlight__modal {
    position: fixed;
    inset: 0;
    z-index: 130000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Microsoft YaHei", "微软雅黑", "SimSun", "宋体", "Arial", sans-serif;
}

.chat-highlight__modal[hidden] {
    display: none;
}

.chat-highlight__mask {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.chat-highlight__dialog {
    position: relative;
    width: 420px;
    max-width: 90vw;
    background: var(--cw-bg-panel, #1f1f1f);
    border-radius: 8px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65);
    border: 1px solid var(--cw-border, #303030);
    padding: 14px 16px 12px;
    box-sizing: border-box;
    color: var(--cw-text, #f5f5f5);
}

.chat-highlight__header {
    margin-bottom: 8px;
}

.chat-highlight__title {
    margin: 0;
    font-size: 16px;
    font-weight: bold;
    color: var(--cw-text-title, #ffffff);
}

.chat-highlight__body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
}

.chat-highlight__preview {
    min-height: 32px;
    padding: 6px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--cw-border-subtle, #303030);
    font-size: 14px;
    line-height: 1.5;
    box-sizing: border-box;
    overflow: hidden;
    white-space: pre-wrap;
    word-break: break-word;
}

.chat-highlight__preview-placeholder {
    color: var(--cw-text-muted, #8c8c8c);
}

.chat-highlight__input {
    width: 100%;
    min-height: 60px;
    max-height: 140px;
    padding: 6px 8px;
    border-radius: 4px;
    background: transparent;
    border: 1px solid var(--cw-border-subtle, #303030);
    color: var(--cw-text, #f5f5f5);
    font-size: 14px;
    line-height: 1.5;
    resize: none;
    box-sizing: border-box;
    scrollbar-color: #555555 #2d2d2d;
    scrollbar-width: thin;
}

.chat-highlight__input::placeholder {
    color: var(--cw-text-muted, #8c8c8c);
}

.chat-highlight__input:focus {
    outline: none;
    border-color: var(--cw-accent, #fa8c16);
    box-shadow: 0 0 0 1px rgba(250, 140, 22, 0.35);
}

/* 重点提醒弹窗输入区域滚动条 - 深色主题 */
.chat-highlight__input::-webkit-scrollbar {
    width: 10px;
    background: #2d2d2d;
}

.chat-highlight__input::-webkit-scrollbar-track {
    background: #2d2d2d;
}

.chat-highlight__input::-webkit-scrollbar-thumb {
    background: #555555;
    border-radius: 6px;
}

.chat-highlight__input::-webkit-scrollbar-thumb:hover {
    background: #666666;
}

.chat-highlight__style-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.chat-highlight__color-list {
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-highlight__color-item {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    box-sizing: border-box;
}

.chat-highlight__color-item.is-active {
    border-color: #ffffff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.6);
}

.chat-highlight__style-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-highlight__toggle-btn {
    min-width: 32px;
    height: 24px;
    padding: 0 8px;
    border-radius: 4px;
    border: 1px solid var(--cw-border-subtle, #303030);
    background: rgba(255, 255, 255, 0.02);
    color: var(--cw-text-muted, #bfbfbf);
    font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.chat-highlight__toggle-btn.is-active {
    border-color: var(--cw-accent, #fa8c16);
    background: rgba(250, 140, 22, 0.18);
    color: #ffd591;
}

.chat-highlight__footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.chat-highlight__btn-cancel,
.chat-highlight__btn-send {
    min-width: 72px;
    height: 30px;
    padding: 0 14px;
    border-radius: 4px;
    border: 1px solid transparent;
    font-size: 13px;
    cursor: pointer;
    font-family: "Microsoft YaHei", "微软雅黑", "SimSun", "宋体", "Arial", sans-serif;
}

.chat-highlight__btn-cancel {
    background: transparent;
    border-color: var(--cw-border-subtle, #303030);
    color: var(--cw-text-muted, #bfbfbf);
}

.chat-highlight__btn-cancel:hover {
    background: rgba(255, 255, 255, 0.04);
}

.chat-highlight__btn-send {
    background: var(--cw-btn-send, #1890ff);
    border-color: transparent;
    color: #ffffff;
}

.chat-highlight__btn-send:hover {
    background: var(--cw-btn-send-hover, #40a9ff);
}

.chat-highlight__btn-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 输入区内的扫光效果（仅预览使用） */
.chat-highlight__preview--glow {
    position: relative;
    overflow: hidden;
}

.chat-highlight__preview--glow::after {
    content: "";
    position: absolute;
    top: 0;
    left: -40%;
    width: 30%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.55) 45%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-18deg);
    animation: chat-highlight-glow-sweep 2.8s linear infinite;
}

@keyframes chat-highlight-glow-sweep {
    0% {
        left: -45%;
    }
    50% {
        left: 80%;
    }
    100% {
        left: 110%;
    }
}

/* 主输入框中插入的重点提醒文本效果（仅本面板使用） */
.chat-window-panel .chat-window-input-text .chat-highlight__input-fragment {
    font-weight: 400;
}

.chat-window-panel .chat-window-input-text .chat-highlight__input-fragment--bold {
    font-weight: 700;
}

.chat-window-panel .chat-window-input-text .chat-highlight__input-fragment--glow {
    position: relative;
}

.chat-window-panel .chat-window-input-text .chat-highlight__input-fragment--glow::after {
    content: "";
    position: absolute;
    top: 0;
    left: -50%;
    width: 40%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.45) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-18deg);
    animation: chat-highlight-glow-sweep 3.2s linear infinite;
}

/* 消息气泡中的重点提醒样式（颜色 + 粗体 + 流光） */
.chat-window-panel .chat-highlight__message {
    display: inline-block;
    max-width: 100%;
}

.chat-window-panel .chat-highlight__message-text {
    position: relative;
    font-size: 14px;
    line-height: 1.6;
    font-weight: 400;
    white-space: pre-wrap;
    word-break: break-word;
}

.chat-window-panel .chat-highlight__message-text--bold {
    font-weight: 700;
}

.chat-window-panel .chat-highlight__message-text--glow {
    position: relative;
    display: inline-block;
    overflow: hidden;
}

.chat-window-panel .chat-highlight__message-text--glow::after {
    content: "";
    position: absolute;
    top: 0;
    left: -45%;
    width: 35%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.45) 45%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-18deg);
    animation: chat-highlight-glow-sweep 3s linear infinite;
    pointer-events: none;
}

