/**
 * Bloky teocars - cipy znaciek (blok teocars/znacky aj filter archivu).
 *
 * Blok teocars/znacky (block.json style) a archiv predanych vozidiel (render.php).
 * Tokeny --pc-* temy s nahradnymi hodnotami ako v bloky.css; zaklad
 * (zoznamy, cipy, Zobrazit dalsie) je v bloky.css (zavislost).
 */

/* =========================================================================
   ZNACKY
   ========================================================================= */

.teocars-znacky {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--pc-space-4, 1rem) var(--pc-space-8, 2rem);
}

.teocars-znacky__title {
	flex: 0 0 auto;
	margin: 0;
	font-size: var(--pc-fs-lg, 1.125rem);
	font-weight: 700;
	line-height: 1.35;
}

.teocars-znacky__subtitle {
	display: block;
	color: rgb(var(--pc-muted, 79 89 100));
	font-family: var(--pc-font-body, inherit);
	font-size: var(--pc-fs-md, 0.9375rem);
	font-stretch: 100%;
	font-weight: 500;
}

ul.teocars-znacky__list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.625rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.teocars-chip {
	position: relative; /* drzi .screen-reader-text (absolute) vnutri posuvneho zoznamu - inak rozsiri stranku */
	display: inline-flex;
	align-items: center;
	gap: var(--pc-space-3, 0.75rem);
	min-height: 3.5rem;
	padding: 0 1.125rem 0 var(--pc-space-2, 0.5rem);
	border: 1px solid rgb(var(--pc-line, 214 222 229));
	border-radius: var(--pc-radius, 0.5rem);
	background: rgb(var(--pc-paper, 255 255 255));
	color: rgb(var(--pc-ink, 4 19 27));
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	transition: border-color 0.15s ease;
}

.teocars-chip:hover {
	border-color: rgb(var(--pc-ink, 4 19 27));
	color: rgb(var(--pc-ink, 4 19 27));
	text-decoration: none;
}

.teocars-chip__logo {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
}

.teocars-chip__logo img {
	display: block;
	width: auto;
	max-width: 2.375rem;
	height: auto;
	max-height: 1.875rem;
	object-fit: contain;
}

.teocars-chip__count {
	color: rgb(var(--pc-muted, 79 89 100));
	font-size: var(--pc-fs-sm, 0.875rem);
}

.teocars-chip--more {
	padding-left: 1.125rem;
}

.teocars-chip--more svg {
	width: 1rem;
	height: 1rem;
}

@media (max-width: 767.98px) {
	.teocars-znacky {
		flex-direction: column;
		flex-wrap: nowrap; /* stlpec so zalamovanim by riadok natiahol na sirku obsahu */
		align-items: stretch;
	}

	/* Cipy v jednom riadku, posun prstom; presah po okraj obrazovky. */
	ul.teocars-znacky__list {
		flex-wrap: nowrap;
		margin-inline: calc(-1 * var(--pc-gutter, 1.25rem));
		padding: 0 var(--pc-gutter, 1.25rem) var(--pc-space-1, 0.25rem);
		overflow-x: auto;
		scroll-padding-inline: var(--pc-gutter, 1.25rem);
		scroll-snap-type: x proximity;
		scrollbar-width: none;
	}

	.teocars-znacky__list::-webkit-scrollbar {
		display: none;
	}

	.teocars-znacky__list > li {
		flex: 0 0 auto;
		scroll-snap-align: start;
	}

	.teocars-chip {
		min-height: 3.25rem;
	}
}
