/* BinaryPreview, an agent's unpublished changes, a file's history. Split from files.css so each sheet has one job. Tokens only. */
/* BinaryPreview (F12): a binary file's facts and a small image on a checkerboard. */
.ab-binary {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	padding: 32px;
}
.ab-binary-facts,
.ab-binary-none {
	margin: 0;
	color: var(--muted);
	font-size: 12px;
}
.ab-binary-figure {
	margin: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	max-width: 100%;
}
.ab-binary-figure figcaption {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--muted);
	font-size: 12px;
}
.ab-image-checker {
	max-width: 100%;
	overflow: auto;
	padding: 24px;
	border-radius: 10px;
	box-shadow: inset 0 0 0 1px var(--rule);
	background-color: var(--surface);
	background-image:
		linear-gradient(45deg, var(--wash) 25%, transparent 25%), linear-gradient(-45deg, var(--wash) 25%, transparent 25%),
		linear-gradient(45deg, transparent 75%, var(--wash) 75%), linear-gradient(-45deg, transparent 75%, var(--wash) 75%);
	background-size: 16px 16px;
	background-position:
		0 0,
		0 8px,
		8px -8px,
		-8px 0;
}
.ab-image-checker img {
	display: block;
}
.ab-image-checker img.is-fit {
	max-width: 100%;
	height: auto;
}
.ab-binary-actions {
	margin: 0;
	display: flex;
	align-items: center;
	gap: 8px;
}

/* AgentChanges (F20, F23): an agent's unpublished changes to a file, in the side panel. */
.ab-changes {
	display: flex;
	flex-direction: column;
	min-height: 0;
}
.ab-changes .ab-panel-head h2 {
	margin: 0;
	display: flex;
	align-items: center;
	gap: var(--space-2);
	font-size: 15px;
	line-height: 20px;
	font-weight: 650;
	white-space: nowrap;
}
.ab-changes .ab-panel-head .ref {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-family: var(--font-sans);
}
.ab-changes-body {
	flex: 1;
	min-height: 0;
	overflow: auto;
}
.ab-changes h3 {
	margin: 0 0 var(--space-2);
	font-size: 12px;
	line-height: 16px;
	font-weight: 600;
	color: var(--muted);
	letter-spacing: 0.01em;
}
.ab-changes-facts {
	display: flex;
	flex-direction: column;
	gap: 2px;
	color: var(--muted);
	font-size: 12px;
	line-height: 16px;
}
.ab-changes-facts .live {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--ink);
	font-weight: 600;
}
.ab-changes-facts .live .dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--ink);
}
.ab-changes-facts .num {
	font-family: var(--font-mono);
	font-variant-numeric: tabular-nums;
	color: var(--ink);
}
.ab-changes .quiet {
	margin: var(--space-2) 0 0;
	font-size: 13px;
	line-height: 20px;
}
.ab-places {
	display: flex;
	flex-direction: column;
	gap: var(--space-4);
}
.ab-place {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.ab-place-link {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--ink);
	font-size: 12px;
	line-height: 16px;
	font-weight: 600;
}
.ab-place-more {
	align-self: flex-start;
}
.ab-changes .ab-place-collides {
	margin: 0;
	color: var(--muted);
	font-size: 12px;
	line-height: 16px;
	font-weight: 450;
}
.ab-diff {
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: inset 0 0 0 1px var(--rule);
	font-family: var(--font-mono);
	font-size: 12px;
	line-height: 18px;
	color: var(--syn-plain);
}
.ab-diff-row {
	display: grid;
	grid-template-columns: 16px minmax(0, 1fr);
}
.ab-diff-row .sign {
	text-align: center;
}
.ab-diff-row .text {
	white-space: pre-wrap;
	overflow-wrap: anywhere;
	padding-right: var(--space-2);
}
.ab-diff-row.is-del {
	background: var(--fail-wash);
}
.ab-diff-row.is-del .sign {
	color: var(--fail);
}
.ab-diff-row.is-add {
	background: var(--pass-wash);
}
.ab-diff-row.is-add .sign {
	color: var(--pass);
}
.ab-changes .actions {
	align-items: center;
	flex-wrap: nowrap;
}
.ab-changes .actions .ab-copy-link {
	margin-left: auto;
	flex: none;
}

/* ---------- History (F26): a file's versions, one line each, grouped by day ---------- */
.ab-history {
	display: flex;
	flex-direction: column;
	gap: 20px;
}
.ab-history-day h2 {
	margin: 0;
	padding-bottom: 4px;
	border-bottom: 1px solid var(--rule);
	color: var(--muted);
	font: var(--type-caption);
	font-weight: 600;
	letter-spacing: 0;
}
.ab-history-day h2 .muted {
	font-weight: 500;
}
.ab-history-rows {
	display: flex;
	flex-direction: column;
}
.ab-hrow {
	display: grid;
	grid-template-columns: 56px minmax(0, 11rem) minmax(0, 1fr) 112px 76px;
	align-items: center;
	gap: 12px;
	height: 40px;
	padding: 0 4px;
	border-bottom: 1px solid var(--rule);
	color: var(--ink);
	text-decoration: none;
}
.ab-hrow:hover {
	background: var(--wash);
}
.ab-hrow:focus-visible {
	outline: 2px solid var(--ink);
	outline-offset: -2px;
}
.ab-hrow-v {
	font-family: var(--font-mono);
	font-weight: 600;
	text-align: right;
}
.ab-hrow-who,
.ab-hrow-ci,
.ab-hrow-time {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.ab-hrow-msg {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.ab-hrow-was {
	margin-left: 6px;
	color: var(--muted);
	font-family: var(--font-mono);
	font-size: 12px;
}
.ab-hrow-ci {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--muted);
	font-size: 12px;
}
.ab-hrow-time {
	color: var(--muted);
	font-size: 12px;
	text-align: right;
}
.ab-history-moved {
	margin: 0;
}
@media (max-width: 640px) {
	.ab-hrow {
		grid-template-columns: 44px minmax(0, 1fr) 76px;
	}
	.ab-hrow-who,
	.ab-hrow-ci {
		display: none;
	}
}
