/*
 * CGM Published / Updated date.
 * :where() keeps specificity at zero, so Bricks typography and colour controls always win.
 * Small-screen rules are added per breakpoint by PHP.
 */
:root {
	--cgm-date-ink: #555;
	--cgm-date-label: inherit;
	--cgm-date-accent: #e5192c;
	--cgm-date-badge-bg: #f1f1f1;
	--cgm-date-meta-font: "Roboto Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

:where(.cgm-date) {
	box-sizing: border-box;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 2px 0;
	color: var(--cgm-date-ink);
	line-height: 1.4;
}
:where(.cgm-date--stacked) { flex-direction: column; align-items: flex-start; }
:where(.cgm-date--stacked .cgm-date__sep) { display: none; }

:where(.cgm-date__item) { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0 .3em; }
:where(.cgm-date__label) { color: var(--cgm-date-label); }
:where(.cgm-date__value) { white-space: normal; }
:where(.cgm-date__time) { white-space: nowrap; }
:where(.cgm-date__sep) { white-space: normal; }
:where(.cgm-date__short) { display: none; }
:where(.cgm-date__icon) { display: inline-flex; margin-right: .1em; }
:where(.cgm-date__icon svg) { display: block; width: 1.15em; height: 1.15em; }

/* Look: meta (matches the review byline: mono, uppercase, small) */
:where(.cgm-date--meta) {
	font-family: var(--cgm-date-meta-font);
	font-size: 12px;
	letter-spacing: .02em;
	text-transform: uppercase;
}

/* Look: plain (inherits the surrounding text) */
:where(.cgm-date--plain) { color: inherit; font-size: .875em; }
:where(.cgm-date--plain .cgm-date__label) { font-weight: 600; }

/* Look: badge (each date in a soft pill) */
:where(.cgm-date--badge) { gap: 6px; font-size: 12px; font-weight: 500; }
:where(.cgm-date--badge .cgm-date__sep) { display: none; }
:where(.cgm-date--badge .cgm-date__item) {
	padding: 4px 10px;
	border-radius: 999px;
	background: var(--cgm-date-badge-bg);
}
:where(.cgm-date--badge .cgm-date__item--updated) { box-shadow: inset 0 0 0 1px var(--cgm-date-accent); background: transparent; }
:where(.cgm-date--badge .cgm-date__label) { font-weight: 700; }
