/**
 * NVA frontend base styles.
 *
 * Layout helpers for publication cards and contributor lists.
 * Disable via NVA Settings → Styles → Enqueue frontend base styles.
 */

/* Publication archive cards */

.nva-publications--post {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	min-width: 0;
	max-width: 100%;
}

.nva-publications--post-link {
	color: inherit;
	text-decoration: none;
}

.nva-publications--post-link:hover .nva-publication--title,
.nva-publications--post-link:focus-visible .nva-publication--title {
	text-decoration: underline;
}

/* Contributor horizontal scroll */

.nva-contributors-scroll {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior-x: contain;
	touch-action: pan-x;
	scrollbar-width: none;
	scroll-snap-type: x proximity;
}

.nva-contributors-scroll::-webkit-scrollbar {
	display: none;
}

.nva-contributors-scroll:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

/* Inline name lists (<ol>) — one continuous row that overflows horizontally. */

ol.nva-contributors-scroll {
	display: block;
	list-style: none;
	margin: 0;
	padding: 0;
	white-space: nowrap;
}

ol.nva-contributors-scroll > li {
	display: inline;
	white-space: nowrap;
}

ol.nva-contributors-scroll > li:not(:last-child)::after {
	content: ",\00a0";
}

/* Connected contributor cards (<div> row). */

div.nva-contributors-scroll {
	display: flex;
	flex-wrap: nowrap;
	align-items: stretch;
	gap: 0.75rem;
	padding-block: 0.25rem;
}

div.nva-contributors-scroll > .nva-contributor--connected {
	flex: 0 0 auto;
	scroll-snap-align: start;
	white-space: nowrap;
}

.nva-contributors-scroll--hint {
	-webkit-mask-image: linear-gradient(to right, transparent, #000 12px, #000 calc(100% - 12px), transparent);
	mask-image: linear-gradient(to right, transparent, #000 12px, #000 calc(100% - 12px), transparent);
}

@media (prefers-reduced-motion: reduce) {
	.nva-contributors-scroll {
		scroll-snap-type: none;
	}
}
