/**
 * History Panel Styles
 *
 * Styling for undo/redo history panel in left sidebar
 */

/* History Panel Container */
.history-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* History Header */
.history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.history-actions {
    display: flex;
    gap: 6px;
}

.history-actions .btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #4b5563;
}

.history-actions .btn-icon:hover:not(:disabled) {
    background: #f3f4f6;
    border-color: #9ca3af;
    color: #1f2937;
}

.history-actions .btn-icon:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.history-info {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

.history-count {
    padding: 4px 8px;
    background: #e0e7ff;
    color: #3730a3;
    border-radius: 4px;
}

/* History List */
.history-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

/* Empty State */
.history-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 20px;
    text-align: center;
    color: #9ca3af;
}

.history-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.history-empty p {
    font-size: 14px;
    margin: 0;
}

/* History Item */
.history-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 6px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.history-item:hover {
    background: #f9fafb;
    border-color: #e5e7eb;
}

.history-item-undo {
    opacity: 1;
}

.history-item-redo {
    opacity: 0.5;
}

.history-item-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border-radius: 6px;
    font-size: 16px;
    flex-shrink: 0;
}

.history-item-undo .history-item-icon {
    background: #dbeafe;
    color: #1e40af;
}

.history-item-redo .history-item-icon {
    background: #f3f4f6;
    color: #6b7280;
}

.history-item-content {
    flex: 1;
    min-width: 0;
}

.history-item-description {
    font-size: 13px;
    font-weight: 500;
    color: #1f2937;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-item-redo .history-item-description {
    color: #9ca3af;
}

.history-item-time {
    font-size: 11px;
    color: #9ca3af;
}

/* Current State Marker */
.history-current-marker {
    padding: 8px 12px;
    margin: 12px 0;
    background: #fef3c7;
    border-left: 3px solid #f59e0b;
    font-size: 12px;
    font-weight: 600;
    color: #92400e;
    border-radius: 4px;
}

/* Scrollbar */
.history-list::-webkit-scrollbar {
    width: 6px;
}

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

.history-list::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}
