/* ===================================================================
   VERSION HISTORY STYLES
   Timeline view, diff viewer, version management UI
   =================================================================== */

/* Version Timeline */
.version-timeline {
    position: relative;
    padding: 8px 0;
}

.version-item {
    display: flex;
    gap: 16px;
    margin-bottom: 8px;
    position: relative;
}

.version-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 4px;
}

.version-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #d1d5db;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #d1d5db;
    position: relative;
    z-index: 2;
}

.version-indicator.latest .version-dot {
    background: #3b82f6;
    box-shadow: 0 0 0 2px #3b82f6, 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.version-line {
    width: 2px;
    flex: 1;
    background: #e5e7eb;
    margin-top: 4px;
}

.version-content {
    flex: 1;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 16px;
    transition: all 0.2s;
}

.version-content:hover {
    background: #ffffff;
    border-color: #d1d5db;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.version-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.version-time {
    font-weight: 600;
    font-size: 14px;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 8px;
}

.version-badge {
    background: #dbeafe;
    color: #1e40af;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}

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

.version-btn {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    color: #4b5563;
}

.version-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.version-btn.primary {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.version-btn.primary:hover {
    background: #2563eb;
    border-color: #2563eb;
}

.version-btn.danger {
    color: #dc2626;
    border-color: #fecaca;
}

.version-btn.danger:hover {
    background: #fef2f2;
    border-color: #dc2626;
}

.version-description {
    font-size: 13px;
    color: #4b5563;
    margin-bottom: 6px;
    font-style: italic;
}

.version-meta {
    font-size: 12px;
    color: #9ca3af;
}

/* Diff Viewer */
.diff-header {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 16px;
    border-radius: 8px;
}

.diff-version {
    font-size: 13px;
    color: #6b7280;
}

.diff-version strong {
    color: #1f2937;
}

.diff-content {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: auto;
    max-height: 500px;
}

.diff-line {
    padding: 4px 12px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.diff-line.added {
    background: #dcfce7;
    color: #166534;
    border-left: 3px solid #22c55e;
}

.diff-line.removed {
    background: #fee2e2;
    color: #991b1b;
    border-left: 3px solid #ef4444;
}

.diff-line.modified {
    background: #fef3c7;
    color: #92400e;
    border-left: 3px solid #f59e0b;
}



/* Mobile Responsive */
@media (max-width: 768px) {
    .version-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .version-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .diff-header {
        flex-direction: column;
        gap: 8px;
    }
}