/* History Panel */
.history-panel {
    width: 0;
    overflow: hidden;
    background-color: var(--bg-color);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
    white-space: nowrap;
}

.history-panel.open {
    width: 250px;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.history-header h3 {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.close-history-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
}

.close-history-btn:hover {
    color: var(--text-primary);
}

.history-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.history-item-container {
    display: flex;
    align-items: center;
    gap: 4px;
    position: relative;
}

.history-item {
    flex: 1;
    background: none;
    border: none;
    text-align: left;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

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

.delete-history-btn {
    opacity: 0;
    transition: opacity 0.2s;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    padding: 6px;
    color: var(--text-secondary);
}

.delete-history-btn:hover {
    color: #ef4444;
    background-color: rgba(239, 68, 68, 0.1);
}

.history-item-container:hover .delete-history-btn {
    opacity: 1;
}

.history-item-title {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-item-date {
    font-size: 11px;
    opacity: 0.7;
}

.history-item-id {
    font-size: 10px;
    opacity: 0.5;
    font-family: monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
