/* History Panel Styles */
.history-panel,
.history-popout {
    width: 250px;
    background: #fff;
    border-radius: 4px;
    padding: 15px;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.history-toggle {
    width: 100%;
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.history-toggle:hover { background: #f0f0f0; }
.history-toggle.active {
    background: #007bff;
    color: white;
    border-color: #0056b3;
}

.history-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.history-toggle:hover .history-icon {
    transform: rotate(-45deg);
}

.history-toggle.active .history-icon {
    color: white;
}

.history-list {
    overflow-y: auto;
    flex-grow: 1;
    max-height: 350px;
}

.history-item {
    padding: 8px;
    margin: 4px 0;
    background: #f8f9fa;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.9em;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.history-item:hover { background-color: #e9ecef; }
.history-item.active {
    background: #e3f2fd;
    border-left: 3px solid #007bff;
}
.history-item.active:hover { background: #d0e7fc; }
.history-item.inactive {
    opacity: 0.5;
    background: #f0f0f0;
}

.history-timestamp {
    color: #666;
    font-size: 0.8em;
}

.history-action { color: #333; }

.history-empty {
    padding: 20px;
    text-align: center;
    color: #666;
    font-style: italic;
}

.history-clear-btn {
    margin-top: 10px;
    padding: 8px 12px;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    width: 100%;
}

.history-clear-btn:hover { background-color: #c82333; }
.history-clear-btn:active { background-color: #bd2130; }

/* Popout specific styles */
.history-popout {
    position: absolute;
    top: 0;
    right: 100%;
    margin-right: 10px;
    display: none;
    flex-direction: column;
    opacity: 0;
    transform: translateX(10px);
    pointer-events: none;
    z-index: 1000;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.history-popout.visible {
    display: flex;
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
}
