/* Diff view styles */

.diff-summary {
    display: flex;
    gap: 16px;
    padding: 12px 16px;
    background: white;
    border-bottom: 1px solid #e2e8f0;
    font-size: 12px;
}

.dark .diff-summary {
    background: #0f172a;
    border-color: #1e293b;
}

/* Diff statistics */
.diff-stat {
    display: flex;
    align-items: center;
    gap: 4px;
}

.diff-stat-icon {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-weight: 600;
    font-size: 11px;
}

.diff-stat-added .diff-stat-icon { background: #dcfce7; color: #16a34a; }
.diff-stat-removed .diff-stat-icon { background: #fee2e2; color: #dc2626; }
.diff-stat-modified .diff-stat-icon { background: #fef3c7; color: #d97706; }
.diff-stat-unchanged .diff-stat-icon { background: #f1f5f9; color: #64748b; }

.dark .diff-stat-added .diff-stat-icon { background: #14532d; color: #4ade80; }
.dark .diff-stat-removed .diff-stat-icon { background: #450a0a; color: #f87171; }
.dark .diff-stat-modified .diff-stat-icon { background: #451a03; color: #fbbf24; }
.dark .diff-stat-unchanged .diff-stat-icon { background: #1e293b; color: #94a3b8; }

/* Diff layout */
.diff-wrapper {
    display: flex;
    flex: 1;
    overflow: hidden;
    height: calc(100% - 45px);
}

.diff-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.diff-left {
    border-right: 1px solid #e2e8f0;
}

.dark .diff-left {
    border-color: #1e293b;
}

.diff-panel-header {
    padding: 8px 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.dark .diff-panel-header {
    background: #1e293b;
    color: #94a3b8;
    border-color: #334155;
}

.diff-content {
    flex: 1;
    overflow: auto;
    padding: 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: var(--app-font-size);
    line-height: 1.6;
}

/* Diff line styles */
.diff-line {
    padding: 2px 8px;
    border-radius: 3px;
    margin: 1px 0;
    white-space: nowrap;
}

.diff-unchanged {
    background: transparent;
}

.diff-added {
    background: #dcfce7;
}

.diff-removed {
    background: #fee2e2;
}

.diff-modified {
    background: #fef3c7;
}

.diff-placeholder {
    background: #f1f5f9;
    opacity: 0.5;
}

.dark .diff-added {
    background: rgba(34, 197, 94, 0.15);
}

.dark .diff-removed {
    background: rgba(239, 68, 68, 0.15);
}

.dark .diff-modified {
    background: rgba(245, 158, 11, 0.15);
}

.dark .diff-placeholder {
    background: rgba(30, 41, 59, 0.5);
}

/* Diff metadata */
.diff-count {
    font-size: 10px;
    color: #64748b;
    margin-left: 8px;
}

.dark .diff-count {
    color: #94a3b8;
}

.diff-old-value {
    color: #94a3b8;
    font-size: 0.85em;
    margin-left: 8px;
}

.dark .diff-old-value {
    color: #64748b;
}

/* Diff select dropdowns */
#diffLeftSelect, #diffRightSelect {
    min-width: 150px;
    max-width: 200px;
}