/**
 * NISHOW 对话历史列表样式
 */

/* ========== 历史列表容器 ========== */
.sidebar-history {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    min-height: 0;
}

/* 滚动条样式 */
.sidebar-history::-webkit-scrollbar {
    width: 6px;
}

.sidebar-history::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-history::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 3px;
}

.sidebar-history::-webkit-scrollbar-thumb:hover {
    background-color: var(--border-light);
}

/* ========== 日期分组 ========== */
.history-section {
    margin-bottom: 16px;
}

.history-section-title {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-tertiary);
    padding: 8px 12px 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.history-items {
    /* 列表项容器 */
}

/* ========== 历史列表项 ========== */
.history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
}

.history-item:hover {
    background-color: var(--bg-hover);
}

.history-item.active {
    background-color: var(--bg-tertiary);
}

.history-item > i {
    font-size: 16px;
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.history-title {
    flex: 1;
    font-size: 14px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.history-item:hover .history-title,
.history-item.active .history-title {
    color: var(--text-primary);
}

/* ========== 操作按钮 ========== */
.history-actions {
    display: none;
    gap: 4px;
    flex-shrink: 0;
}

.history-item:hover .history-actions {
    display: flex;
}

.btn-history-delete {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-history-delete:hover {
    background-color: var(--bg-hover);
    color: var(--danger-color);
}

/* ========== 空状态 ========== */
.history-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-tertiary);
    font-size: 14px;
}

/* ========== 登录提示 ========== */
.history-login-prompt {
    text-align: center;
    padding: 30px 20px;
}

.history-login-prompt p {
    color: var(--text-tertiary);
    font-size: 13px;
    margin-bottom: 12px;
}

.btn-login-small {
    display: inline-block;
    padding: 8px 20px;
    background-color: var(--accent-primary);
    color: white;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.2s;
}

.btn-login-small:hover {
    opacity: 0.9;
    text-decoration: none;
    color: white;
}

/* ========== 响应式调整 ========== */
@media (max-width: 768px) {
    .history-item {
        padding: 12px;
    }

    .history-actions {
        display: flex;
    }
}
