/*
================================================================
侧栏样式 — 会话列表
================================================================
深色背景侧栏，包含会话列表和记忆面板。
*/

/* ========== 侧栏容器 ========== */
#sidebar {
    width: 260px;
    background: var(--bg-sidebar);
    color: var(--text-sidebar);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

/* ========== 侧栏头部 ========== */
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-sidebar-active);
}

#btn-new-session {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--color-primary);
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

#btn-new-session:hover {
    background: var(--color-primary-light);
}

/* ========== 会话列表 ========== */
#session-list {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-sm);
}

/* 空状态提示 */
.empty-hint {
    text-align: center;
    padding: var(--space-lg);
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* 单个会话项 */
.session-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    margin-bottom: 2px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.15s;
    font-size: 0.9rem;
}

.session-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.session-item.active {
    background: var(--color-primary);
    color: white;
}

.session-item .session-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: var(--space-sm);
}

/* 删除按钮 */
.session-item .btn-delete {
    background: none;
    border: none;
    color: inherit;
    opacity: 0;
    cursor: pointer;
    font-size: 0.9rem;
    padding: 2px 4px;
    border-radius: 3px;
    transition: opacity 0.15s;
}

.session-item:hover .btn-delete {
    opacity: 0.6;
}

.session-item .btn-delete:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}
