/* Git History Page Styles */
.history-actions {
	display: flex;
	gap: 0.75rem;
	align-items: center;
}

.branch-selector {
	padding: 0.45rem 0.7rem;
	border: 1px solid var(--border);
	border-radius: 10px;
	font: inherit;
	background: var(--panel);
	color: var(--ink);
}

.history-container {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
	min-height: 60vh;
}

.commit-list {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	overflow-y: auto;
	max-height: 70vh;
}

.commit-list.with-detail {
	grid-column: 1;
}

.commit-item {
	display: flex;
	gap: 0.75rem;
	padding: 0.75rem;
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: 10px;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.commit-item:hover {
	background: #ece7df;
}

.commit-item.selected {
	border-color: var(--brand);
	background: #f0f7f4;
}

.commit-graph {
	font-family: monospace;
	font-size: 0.9rem;
	color: var(--brand);
	white-space: pre;
	flex-shrink: 0;
	min-width: 60px;
}

.graph-line {
	display: inline-block;
}

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

.commit-header {
	display: flex;
	gap: 0.5rem;
	align-items: center;
	margin-bottom: 0.35rem;
}

.commit-hash {
	font-family: monospace;
	font-size: 0.85rem;
	color: var(--brand);
	background: #f0f7f4;
	padding: 0.15rem 0.4rem;
	border-radius: 6px;
}

.commit-refs {
	display: flex;
	gap: 0.35rem;
	flex-wrap: wrap;
}

.ref-tag {
	font-size: 0.75rem;
	padding: 0.15rem 0.4rem;
	background: var(--brand);
	color: white;
	border-radius: 999px;
}

.commit-message {
	margin: 0 0 0.35rem;
	font-weight: 500;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.commit-meta {
	display: flex;
	gap: 0.75rem;
	font-size: 0.85rem;
	color: var(--muted);
}

.commit-detail-panel {
	background: var(--panel);
	border: 1px solid var(--border);
	border-radius: 14px;
	padding: 1.25rem;
	overflow-y: auto;
	max-height: 70vh;
}

.detail-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid var(--border);
}

.detail-header h3 {
	margin: 0;
}

.detail-content {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.detail-section {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
}

.detail-section h4 {
	margin: 0 0 0.5rem;
	color: var(--muted);
	font-size: 0.9rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.commit-hash-full {
	font-family: monospace;
	font-size: 0.85rem;
	color: var(--brand);
	margin: 0;
}

.commit-message-full {
	margin: 0.5rem 0 0;
	line-height: 1.5;
	white-space: pre-wrap;
}

.stats-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 0.75rem;
}

.stat {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 0.75rem;
	background: #f5f3ee;
	border-radius: 10px;
}

.stat.additions {
	background: #f0fdf4;
}

.stat.deletions {
	background: #fef2f2;
}

.stat-value {
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--ink);
}

.stat.additions .stat-value {
	color: #16a34a;
}

.stat.deletions .stat-value {
	color: #dc2626;
}

.stat-label {
	font-size: 0.8rem;
	color: var(--muted);
}

.parent-list {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.parent-hash {
	font-family: monospace;
	font-size: 0.85rem;
	padding: 0.2rem 0.5rem;
	background: #f5f3ee;
	border-radius: 6px;
}

.diff-content {
	font-family: monospace;
	font-size: 0.8rem;
	line-height: 1.5;
	background: #f5f3ee;
	padding: 0.75rem;
	border-radius: 10px;
	overflow-x: auto;
	white-space: pre-wrap;
	word-break: break-all;
}

@media (min-width: 1024px) {
	.history-container {
		grid-template-columns: 1fr 400px;
	}

	.commit-list.with-detail {
		grid-column: 1;
	}

	.commit-detail-panel {
		grid-column: 2;
		position: sticky;
		top: 1rem;
	}
}

