/* Horizontale Cover-Galerie (php/covergalerie.php) */
.cg {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
}

.cg__viewport {
	flex: 1 1 auto;
	min-width: 0;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	overscroll-behavior-x: contain;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
}

.cg__track {
	display: flex;
	flex-wrap: nowrap;
	gap: 14px;
	margin: 0;
	padding: 2px 2px 8px;
	list-style: none;
}

.cg__item {
	flex: 0 0 145px;
	scroll-snap-align: start;
}

.cg__item figure {
	margin: 0;
	text-align: center;
}

.cg__item a {
	display: block;
}

.cg__item img {
	display: block;
	width: 100%;
	height: auto;
	margin: 0 auto 6px;
	border: 1px solid var(--line, #dcdcdc);
	border-radius: 4px;
	background: var(--paper, #fff);
}

.cg__item figcaption {
	font-size: 12px;
	line-height: 1.35;
	color: var(--muted, #5f6368);
}

.cg__arrow {
	display: none;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 1px solid var(--line, #dcdcdc);
	border-radius: 50%;
	background: var(--paper, #fff);
	color: var(--ink, #1a1a1a);
	cursor: pointer;
}

.cg--js .cg__arrow {
	display: inline-flex;
}

.cg__arrow:hover:not(:disabled) {
	border-color: var(--link);
	color: var(--link);
}

.cg__arrow:disabled {
	opacity: .35;
	cursor: default;
}

.cg__viewport:focus-visible,
.cg__arrow:focus-visible {
	outline: 2px solid var(--link);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.cg__viewport {
		scroll-behavior: auto;
	}
}

@media print {
	.cg {
		display: block;
	}
	.cg__viewport {
		overflow: visible;
		scroll-snap-type: none;
	}
	.cg__track {
		display: grid;
		grid-template-columns: repeat(4, 1fr);
		gap: 10px;
	}
	.cg__item {
		flex: none;
		width: auto;
	}
	.cg__item img {
		width: 100%;
	}
	.cg__arrow {
		display: none !important;
	}
}
