html,
body {
    height: 100%;
    overflow: hidden;
    font-size: 1rem;
}

/*定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*/
.kf-message::-webkit-scrollbar {
    width: 7px;
    height: 7px;
    background-color: #F5F5F5;
}

/*定义滚动条轨道 内阴影+圆角*/
.kf-message::-webkit-scrollbar-track {
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0);
    -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0);
    border-radius: 0.75rem;
    background-color: #F5F5F5;
}

/*定义滑块 内阴影+圆角*/
.kf-message::-webkit-scrollbar-thumb {
    border-radius: 0.75rem;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, .1);
    -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .1);
    background-color: #c8c8c8;
}

.kf-index {
    height: 100%;
    display: flex;
    flex-direction: column;

}

.kf-top {
    height: 5rem;
    background: rgb(59 130 246 / 1);
    color: white;
    display: flex;
    justify-content: start;
    align-items: center;
}

.kf-top-img {
    margin-left: 0.75rem;
    height: 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kf-top-img img {
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
}

.kf-top-list {
    margin-left: 0.75rem;
    max-width: 100%;
    overflow: hidden;
    margin-right: 0.75rem;
    height: 75px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.kf-top-list-title {
    font-weight: 600;
    line-height: 1.5625rem;
}

.kf-top-list-desc {
    line-height: 1.5625rem;
    width: 100%;
    display: table-cell;
    white-space: nowrap;
    overflow: hidden;
}

.kf-message {
    flex: 1;
    overflow-y: scroll;
    overflow-x: hidden;
    box-sizing: border-box;
    padding: 0.75rem 0px;
    display: flex;
    flex-direction: column;
}

.kf-message-time {
    text-align: center;
    margin-top: 1rem;
}

.kf-message-time span {
    background-color: #f5f5f5;
    border-radius: 0.25rem;
    color: #666;
    padding: 0px 0.5rem;
    white-space: nowrap;
}

.kf-message-left {
    margin-top: 0.75rem;
    padding-left: 0.75rem;
    max-width: 80%;
    display: flex;
    justify-content: start;
    align-items: center;
}

.kf-message-left-img {
    max-width: 2rem;
    max-height: 2rem;
}

.kf-message-left-img img {
    width: 2rem;
    height: 2rem;
}

.kf-message-left-txt {
    margin-left: 0.75rem;
    background-color: #f3f3f3;
    border-radius: 0.25rem;
    white-space: normal;
    word-wrap: break-word;
    position: relative;
    padding: 0.5rem 1rem;
    box-sizing: border-box;
    color: #373737;
}

.kf-message-left-txt::before {
    position: absolute;
    top: 0.75rem;
    left: -0.6rem;
    width: 0;
    height: 0;
    content: "";
    border: 0.3125rem solid transparent;
    border-right-color: #f3f3f3;
}

.kf-message-right {
    margin-top: 0.75rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    display: flex;
    justify-content: end;
    align-items: center;
}

.kf-message-right-txt {
    max-width: 80%;
    margin-right: 0.3125rem;
    background-color: rgb(59 130 246 / 1);
    color: #fff;
    border-radius: 0.25rem;
    white-space: normal;
    word-wrap: break-word;
    position: relative;
    padding: 0.5rem 1rem;
    box-sizing: border-box;
}




.kf-button-primary {
    margin-left: 1rem;
    padding: 0.8rem 2rem;
    color: #fff;
    background-color: rgb(59 130 246 / 1);
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all .3s;
}

.kf-button-primary:hover {
    background-color: rgb(96 165 250 / 1);
}

.kf-button-gray {
    margin-left: 0.5rem;
    padding: 0.8rem 2rem;
    color: #fff;
    background-color: rgb(107 114 128 / 1);
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all .3s;
}

.kf-button-gray:hover {
    background-color: rgb(156 163 175 / 1);
}


.kf-send {
    padding: 10px;
    background: #f5f5f5;
    border-top: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: start;
    height: 5rem;
}

.kf-input {
    height: 4.5rem;
    flex: 1;
    padding: 0px 0.25rem;
    /* 1. 默认边框样式（颜色+宽度+样式，缺一不可） */
    border: 1px solid #dcdfe6;
    /* 默认边框：浅灰色（常用UI配色） */
    border-radius: 4px;
    /* 可选：圆角，提升美观度 */
    /* 可选：去除浏览器默认的内边距/外边框，统一样式 */
    box-sizing: border-box;
    outline: none;
    /* 清除默认聚焦外轮廓 */
    /* 可选：聚焦过渡动画，更丝滑 */
    transition: border-color 0.2s ease;
    /* textarea 专属优化：禁止拉伸（可选）、换行规则 */
    resize: none;
    /* 禁用右下角拉伸手柄，保持固定尺寸 */
    line-height: 1.5;
    /* 行高适配多行文字 */
    max-height: 8rem;
    /* 最多撑开到120px，超出后显示滚动条 */
    white-space: pre-line;
    /* 按回车/空格换行，兼容所有浏览器 */
    word-wrap: break-word;
    /* 长单词自动换行 */
}

/* 2. 选中（聚焦）时的边框颜色 */
.kf-input:focus {
    border-color: rgb(59 130 246 / 1);
    /* 聚焦边框：蓝色（常用主色调） */
    /* 可选：添加外发光，增强聚焦视觉效果 */
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
}

@media screen and (max-width: 767px) {
    .kf-send {
        height: 4rem;
    }
    .kf-input{
        height: 3.5rem;
    }
    .kf-button-primary {
        margin-left: 0.25rem;
        padding: 0.8rem;
    }
    .kf-button-gray {
        margin-left: 0.25rem;
        padding: 0.8rem;
    }
    .kf-top-list-desc{
        font-size: 14px;
    }
}