/**
 * Kboke 统一文本提示组件样式（v2.3.466）
 *
 * 前台与后台通用。不依赖主题 CSS 变量是否加载，
 * 因此对可能缺失的变量全部给出兜底色值。
 */

.kboke-notify-wrap {
    position: fixed;
    left: 50%;
    bottom: 32px;
    transform: translateX(-50%);
    z-index: 100000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none;
    max-width: min(92vw, 560px);
    width: max-content;
}

.kboke-notify {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    box-sizing: border-box;
    max-width: 100%;
    padding: 12px 14px 12px 16px;
    background: #ffffff;
    color: #1f2937;
    border: 1px solid #e5e7eb;
    /* 左侧色条标示语义类型 */
    border-left: 4px solid #2563eb;
    border-radius: 10px;
    box-shadow: 0 10px 34px rgba(15, 23, 42, .16);
    font-size: 14px;
    line-height: 1.6;
    text-align: left;
    /* 初始状态：下移 + 透明，插入 DOM 后加 .is-show 触发过渡 */
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .24s ease, transform .24s ease;
}

.kboke-notify.is-show {
    opacity: 1;
    transform: translateY(0);
}

.kboke-notify-icon {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    border-radius: 50%;
    background: #2563eb;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.kboke-notify-text {
    flex: 1 1 auto;
    min-width: 0;
    /* 保留提示文本中的换行（部分提示含多行内容） */
    white-space: pre-wrap;
    word-break: break-word;
}

.kboke-notify-close {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #9ca3af;
    font-size: 18px;
    line-height: 18px;
    cursor: pointer;
    border-radius: 4px;
    transition: color .15s, background .15s;
    font-family: Arial, sans-serif;
}

.kboke-notify-close:hover {
    color: #4b5563;
    background: #f3f4f6;
}

/* ---------- 语义类型配色 ---------- */

/* 成功 */
.kboke-notify-success {
    border-left-color: #16a34a;
    background: #f0fdf4;
    border-color: #bbf7d0;
}
.kboke-notify-success .kboke-notify-icon { background: #16a34a; }
.kboke-notify-success .kboke-notify-text { color: #14532d; }

/* 警告 */
.kboke-notify-warn {
    border-left-color: #f59e0b;
    background: #fffbeb;
    border-color: #fde68a;
}
.kboke-notify-warn .kboke-notify-icon { background: #f59e0b; }
.kboke-notify-warn .kboke-notify-text { color: #78350f; }

/* 错误（常驻，需手动关闭） */
.kboke-notify-error {
    border-left-color: #dc2626;
    background: #fef2f2;
    border-color: #fecaca;
}
.kboke-notify-error .kboke-notify-icon { background: #dc2626; }
.kboke-notify-error .kboke-notify-text { color: #7f1d1d; }

/* ---------- 移动端适配 ---------- */
@media (max-width: 600px) {
    .kboke-notify-wrap {
        bottom: 16px;
        left: 12px;
        right: 12px;
        width: auto;
        max-width: none;
        transform: none;
        align-items: stretch;
    }
    .kboke-notify {
        font-size: 13px;
        padding: 10px 12px 10px 14px;
    }
}

/* ---------- 无障碍：尊重「减少动态效果」偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
    .kboke-notify {
        transition: none;
        transform: none;
    }
}
