/* Undo/Redo History Popup Styles */
.undo-redo-popup {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    min-width: 250px;
    max-width: 350px;
    max-height: 400px;
    overflow-y: auto;
    padding: 0;
    margin-top: 10px;
    display: none;
    animation: undoRedoFadeIn 0.2s ease-out;
}

.undo-redo-popup.active {
    display: block;
}

.undo-redo-popup::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-left: 1px solid var(--border-color);
}

.undo-redo-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.undo-redo-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.undo-redo-item {
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.undo-redo-item:last-child {
    border-bottom: none;
}

.undo-redo-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.undo-redo-item-label {
    font-size: 0.9rem;
    color: var(--text-main);
}

.undo-redo-item-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.undo-redo-empty {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    font-size: 0.85rem;
}

@keyframes undoRedoFadeIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}