/*
 * Module: History — styles
 * Colors come only from the tokens in mcms-global.css.
 *
 * SECTIONS
 *   1. Clock button (on cards) and clock marker (on list rows)
 *   2. Timeline in the modal
 */

/* ==================================================================
   1. CLOCK BUTTON + MARKER
   ================================================================== */
.mcms-wrap .mcms-history-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	margin: 0;
	border: 1px solid var(--mcms-line);
	border-radius: 999px;
	background: var(--mcms-surface);
	color: var(--mcms-brand-strong);
	cursor: pointer;
	flex-shrink: 0;
	transition: background var(--mcms-ease), border-color var(--mcms-ease);
}

.mcms-wrap .mcms-history-btn:hover {
	background: var(--mcms-brand-softer);
	border-color: var(--mcms-brand);
	color: var(--mcms-brand-strong);
}

.mcms-history-btn svg {
	width: 18px;
	height: 18px;
}

.mcms-history-marker {
	display: inline-flex;
	color: var(--mcms-text-muted);
	vertical-align: -2px;
	margin-left: 6px;
}

.mcms-history-marker svg {
	width: 15px;
	height: 15px;
}

/* ==================================================================
   2. TIMELINE
   A vertical line with a dot per entry; edits get a brand dot,
   trash entries a red one.
   ================================================================== */
.mcms-wrap .mcms-history__list {
	list-style: none;
	margin: 0;
	padding: 0 0 0 18px;
	border-left: 2px solid var(--mcms-line);
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.mcms-wrap .mcms-history__item {
	position: relative;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.mcms-history__item::before {
	content: "";
	position: absolute;
	left: -25px;
	top: 5px;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--mcms-surface);
	border: 2px solid var(--mcms-line-strong);
}

.mcms-history__item--update::before,
.mcms-history__item--revert::before {
	border-color: var(--mcms-brand);
	background: var(--mcms-brand-soft);
}

.mcms-history__item--trash::before {
	border-color: var(--mcms-danger);
	background: var(--mcms-danger-soft);
}

.mcms-history__head {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.mcms-history__title {
	font-size: var(--mcms-text-md);
	font-weight: 700;
}

.mcms-history__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 10px;
	color: var(--mcms-text-muted);
	font-size: var(--mcms-text-sm);
}

.mcms-history__meta strong {
	color: var(--mcms-text);
	font-weight: 600;
}

.mcms-wrap .mcms-history__changes {
	list-style: none;
	margin: 4px 0 0;
	padding: 10px 12px;
	border-radius: var(--mcms-radius-sm);
	background: var(--mcms-surface-muted);
	border: 1px solid var(--mcms-line);
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.mcms-wrap .mcms-history__change {
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.mcms-history__field {
	font-size: var(--mcms-text-xs);
	font-weight: 700;
	color: var(--mcms-text-muted);
}

.mcms-history__values {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px;
	font-size: var(--mcms-text-sm);
	overflow-wrap: anywhere;
	font-variant-numeric: tabular-nums;
}

.mcms-history__value--old {
	color: var(--mcms-text-muted);
	text-decoration: line-through;
	text-decoration-color: var(--mcms-line-strong);
}

.mcms-history__value--new {
	font-weight: 700;
	color: var(--mcms-text);
}

.mcms-history__value.is-empty {
	font-style: italic;
	font-weight: 400;
	text-decoration: none;
	color: var(--mcms-text-muted);
}

.mcms-history__arrow {
	color: var(--mcms-text-muted);
}

.mcms-history__note {
	font-size: var(--mcms-text-sm);
	color: var(--mcms-text-muted);
}

.mcms-wrap .mcms-history__revert {
	align-self: flex-start;
	min-height: 36px;
	padding: 0 10px;
	margin-left: -10px;
}