/* DS随心转 AI聊天页面 - 会话列表样式 */

/* 会话管理区域 */
.chat-session-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-bottom: 50px;
    /* 为用户头像留出空间 */
}

/* 新建对话按钮 */
.new-chat-btn {
    margin: 10px;
    padding: 12px 16px;
    background: #fff;
    color: black;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-shrink: 0;
    border: solid 1px #eee;
}

.new-chat-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.new-chat-btn:active {
    transform: translateY(0);
}

.new-chat-btn .layui-icon {
    font-size: 16px;
}

/* 会话列表容器 */
.session-list-container {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.session-title {
    padding: 0 20px 12px;
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #6c757d;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.session-title .layui-icon {
    font-size: 16px;
}

/* 会话列表 */
.session-list {
    flex: 1;
    padding-top: 80px;
    overflow-y: auto;
    padding: 0 0 10px;
}

.session-list::-webkit-scrollbar {
    width: 4px;
}

.session-list::-webkit-scrollbar-track {
    background: transparent;
}

.session-list::-webkit-scrollbar-thumb {
    background: #d0d0d0;
    border-radius: 2px;
}

.session-list::-webkit-scrollbar-thumb:hover {
    background: #b0b0b0;
}

/* 会话项 */
.session-item {
    display: flex;
    align-items: center;
    padding: 6px 2px 6px 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.session-item:hover {
    background: #f0f0f0;
    border-color: #e0e0e0;
}

.session-item.active {
    background: #e3f2fd;
    border-color: #1976d2;
}

.session-content {
    flex: 1;
    min-width: 0;
}

.session-title-text {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

/* 内联编辑输入框样式 */
.session-title-input {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    width: 100%;
    border: 1px solid #1976d2;
    border-radius: 4px;
    padding: 2px 6px;
    margin-bottom: 4px;
    background: white;
    outline: none;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.2);
}

.session-title-input:focus {
    border-color: #1976d2;
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.3);
}

.session-time {
    font-size: 12px;
    color: #999;
}

.session-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.session-item:hover .session-actions {
    opacity: 1;
}

.session-actions .layui-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-size: 14px;
}

.session-edit {
    color: #6c757d;
}

.session-edit:hover {
    background-color: #e2e6ea;
    color: #495057;
}

.session-delete {
    color: #dc3545;
}

.session-delete:hover {
    background-color: #f8d7da;
    color: #721c24;
}

/* 空状态 */
.empty-sessions {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.empty-sessions .layui-icon {
    font-size: 48px;
    color: #dee2e6;
    margin-bottom: 16px;
    display: block;
}

.empty-sessions p {
    margin: 4px 0;
    font-size: 14px;
}

.empty-sessions p:first-of-type {
    font-weight: 500;
    color: #495057;
}