/**
 * TM Event Calendar - events archive styles.
 *
 * Depends on design-system.css (--tec-* tokens) and event-card.css (card
 * styling for each list item), both loaded before this file.
 */

.tmec-archive {
	max-width: 1180px;
	margin: 0 auto var(--tec-space-8);
	padding-inline: var(--tec-space-4);
	font-family: var(--tec-font-family);
	color: var(--tec-text);
}

.tmec-archive__header {
	margin: var(--tec-space-6) 0;
}

.tmec-archive__title {
	margin: 0;
	font-size: var(--tec-font-size-3xl);
	font-weight: var(--tec-font-weight-extrabold);
	letter-spacing: -0.02em;
}

.tmec-archive__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: var(--tec-space-5);
}

.tmec-archive__pagination {
	margin-top: var(--tec-space-8);
}

.tmec-archive__pagination ul {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--tec-space-2);
	list-style: none;
	margin: 0;
	padding: 0;
}

.tmec-archive__pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding: 0 var(--tec-space-3);
	border: 1px solid var(--tec-border-strong);
	border-radius: var(--tec-radius-md);
	background: var(--tec-bg);
	color: var(--tec-text);
	text-decoration: none;
	font-size: var(--tec-font-size-sm);
	font-weight: var(--tec-font-weight-semibold);
	transition: background-color var(--tec-transition-fast), border-color var(--tec-transition-fast), color var(--tec-transition-fast);
}

.tmec-archive__pagination .page-numbers:hover {
	border-color: var(--tec-primary);
	color: var(--tec-primary);
}

.tmec-archive__pagination .page-numbers.current {
	background: var(--tec-primary);
	border-color: var(--tec-primary);
	color: var(--tec-on-primary);
}

/* Below the 260px card minimum (plus container padding), collapse to a
   single column so narrow/zoomed viewports never force horizontal
   overflow — the same fallback the plugin's other auto-fit grids use
   (see calendar/layout.css's 900px breakpoint). */
@media (max-width: 340px) {
	.tmec-archive__list {
		grid-template-columns: 1fr;
	}
}
