/* ============================================================
 * kefu_dock.css —— FastAdmin 客服右下角面板独立样式（追加版）
 * 用法：<link rel="stylesheet" href="https://你的域名/kefu_dock.css">
 * 作用：加宽灰色滚动条、发送按钮、最小化按钮、面板细节优化
 * 与原 kefu_default.css / 原系统样式完全独立，不覆盖原文件
 * ============================================================ */

/* ---------- 1. 发送按钮（输入框右下角） ---------- */
.kfd-send-btn {
    position: absolute;
    right: 8px;
    bottom: 8px;
    min-width: 62px;
    height: 30px;
    padding: 0 14px;
    border: none;
    border-radius: 4px;
    background: #2f7cf6;
    color: #fff;
    font-size: 13px;
    line-height: 30px;
    cursor: pointer;
    z-index: 10;
    transition: background .15s ease, transform .1s ease;
    -webkit-appearance: none;
    box-shadow: 0 2px 6px rgba(47,124,246,.35);
}
.kfd-send-btn:hover  { background: #1d6be8; }
.kfd-send-btn:active { background: #165bc4; transform: scale(.97); }
.kfd-send-btn[disabled] { background: #b8c7e0; cursor: not-allowed; box-shadow: none; }

/* 让 .write 成为发送按钮定位参考 */
.KeFu #KeFuModal .modal-body .kefu-left .write { position: relative !important; box-sizing: border-box; }
/* 给输入框右侧预留发送按钮空间，避免文字被按钮盖住 */
.KeFu #KeFuModal .modal-body .kefu-left .write #kefu_message { padding-right: 74px !important; }

/* ---------- 2. 标题栏右侧按钮组：最小化（_）+ 关闭（×） ---------- */
.kfd-title-btns {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 4px;
}
.kfd-title-btns .kfd-btn-min,
.kfd-title-btns .close {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: rgba(255,255,255,.12);
    color: #fff !important;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px !important;
    line-height: 1;
    padding: 0 !important;
    margin: 0 !important;
    opacity: .9 !important;
    transition: background .15s ease;
    -webkit-appearance: none;
    text-shadow: none !important;
}
.kfd-title-btns .kfd-btn-min {
    font-weight: 700;
    font-size: 20px !important;
    padding-bottom: 4px !important;  /* 视觉上把 "_" 居中 */
}
.kfd-title-btns .kfd-btn-min:hover,
.kfd-title-btns .close:hover { background: rgba(255,255,255,.25); opacity: 1 !important; }

/* ---------- 3. 加宽灰色滚动条（Webkit 系：Chrome/Edge/Safari） ---------- */
.kfd-custom-scroll::-webkit-scrollbar,
.kfd-custom-scroll *::-webkit-scrollbar,
.KeFu #KeFuModal .modal-body .kefu-left .chat::-webkit-scrollbar,
.KeFu #KeFuModal .modal-body .kefu-left .write::-webkit-scrollbar {
    width: 12px;      /* 竖条宽度 */
    height: 12px;     /* 横条高度 */
}
.kfd-custom-scroll::-webkit-scrollbar-track,
.kfd-custom-scroll *::-webkit-scrollbar-track,
.KeFu #KeFuModal .modal-body .kefu-left .chat::-webkit-scrollbar-track,
.KeFu #KeFuModal .modal-body .kefu-left .write::-webkit-scrollbar-track {
    background: #f1f3f5;          /* 灰色轨道 */
    border-radius: 6px;
}
.kfd-custom-scroll::-webkit-scrollbar-thumb,
.kfd-custom-scroll *::-webkit-scrollbar-thumb,
.KeFu #KeFuModal .modal-body .kefu-left .chat::-webkit-scrollbar-thumb,
.KeFu #KeFuModal .modal-body .kefu-left .write::-webkit-scrollbar-thumb {
    background: #b8bec5;          /* 灰色滑块 */
    border-radius: 6px;
    border: 2px solid #f1f3f5;
}
.kfd-custom-scroll::-webkit-scrollbar-thumb:hover,
.kfd-custom-scroll *::-webkit-scrollbar-thumb:hover,
.KeFu #KeFuModal .modal-body .kefu-left .chat::-webkit-scrollbar-thumb:hover,
.KeFu #KeFuModal .modal-body .kefu-left .write::-webkit-scrollbar-thumb:hover {
    background: #8d949d;
}

/* Firefox 滚动条（灰色加宽） */
.kfd-custom-scroll,
.kfd-custom-scroll *,
.KeFu #KeFuModal .modal-body .kefu-left .chat,
.KeFu #KeFuModal .modal-body .kefu-left .write {
    scrollbar-width: thin;           /* Firefox: auto/thin/none；用 auto 更宽 */
    scrollbar-color: #b8bec5 #f1f3f5;/* 滑块 / 轨道 */
}
/* Firefox 想要更宽可改 auto */
.KeFu #KeFuModal .modal-body .kefu-left .chat { scrollbar-width: auto; }
.KeFu #KeFuModal .modal-body .kefu-left .write { scrollbar-width: thin; }

/* ---------- 4. 缩小（收起为浮标）动画优化 ---------- */
.KeFu #KeFuModal.modal:not(.kfd-open) > .modal-dialog {
    opacity: 0 !important;
    transform: translateY(20px) scale(.96) !important;
    pointer-events: none !important;
    transition: opacity .18s ease, transform .18s ease !important;
}
.KeFu #KeFuModal.modal.kfd-open > .modal-dialog {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
    pointer-events: auto !important;
    transition: opacity .22s ease, transform .22s ease !important;
}
