/**
 * CePress Core block styles.
 *
 * The theme owns the design system and the card/grid layout. This file only
 * covers behaviour that must follow a block regardless of theme: the ticker's
 * rotation mechanics, the icon sizing, and the reserved-height ad container.
 * Visual styling (colors, type, spacing) is intentionally left to the theme so
 * the two do not fight over specificity.
 */

.cepress-icon {
	display: inline-block;
	vertical-align: -0.125em;
}

/* Ticker: mechanics only. Colors and padding come from the theme. */

.cepress-ticker-block {
	width: 100%;
}

.cepress-ticker__inner {
	align-items: center;
	display: flex;
	gap: 0.75rem;
	min-height: 2.75rem;
}

.cepress-ticker__viewport {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
}

.cepress-ticker__item {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.cepress-ticker__item[hidden] {
	display: none;
}

/* Read time sits inline inside a meta row. */

.cepress-read-time {
	align-items: center;
	display: inline-flex;
	gap: 0.3rem;
}

/* Ad slot: the reserved box is what prevents layout shift. */

.cepress-ad-slot {
	display: flex;
	flex-direction: column;
	justify-content: center;
	margin-inline: auto;
	overflow: hidden;
	text-align: center;
	width: 100%;
}

.cepress-ad-slot__label {
	font-size: 0.7rem;
	letter-spacing: 0.1em;
	opacity: 0.6;
	text-transform: uppercase;
}

/* Newsletter: layout only, so a disabled form still reads as a form. */

.cepress-newsletter__field {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.cepress-newsletter__field input[type="email"] {
	flex: 1 1 14rem;
}

.cepress-newsletter.is-disabled button {
	cursor: not-allowed;
	opacity: 0.6;
}

/* Author box: two-column identity layout. */

.cepress-author-box {
	display: grid;
	gap: 1rem;
	grid-template-columns: 72px 1fr;
}

.cepress-author-box img {
	border-radius: 50%;
	height: 72px;
	width: 72px;
}

@media (max-width: 600px) {
	.cepress-author-box {
		grid-template-columns: 1fr;
	}
}

/* Live timeline: the rail and markers are structural, not decorative. */

.cepress-live__entries {
	list-style: none;
	margin: 1rem 0 0;
	padding: 0 0 0 1.5rem;
}

.cepress-live__entry {
	padding-bottom: 1.25rem;
	position: relative;
}

.cepress-live__text > :first-child {
	margin-block-start: 0;
}

.cepress-live__text > :last-child {
	margin-block-end: 0;
}
