/*
 * REUC Article Metadata
 * Konačni SNM 10.5.4 obrazac za izvor, kategorije i teme u REUC paleti.
 */

.article-taxonomy {
	background: var(--mag-surface);
	border: 1px solid var(--mag-line);
	border-radius: 13px;
	box-shadow: 0 10px 28px color-mix(in srgb, var(--mag-ink) 5%, transparent);
	display: grid;
	gap: 0;
	margin: 24px 0 0;
	min-width: 0;
	overflow: hidden;
}

.article-taxonomy__row,
.article-source.article-taxonomy__row {
	align-items: center;
	background: var(--mag-surface);
	border: 0;
	border-bottom: 1px solid var(--mag-line);
	display: grid;
	font-size: inherit;
	gap: 18px;
	grid-template-columns: 132px minmax(0, 1fr);
	margin: 0;
	min-height: 60px;
	min-width: 0;
	padding: 11px 22px;
}

.article-taxonomy__row:last-child {
	border-bottom: 0;
}

.article-taxonomy__label {
	color: var(--mag-accent);
	font-family: var(--mag-sans);
	font-size: .64rem;
	font-weight: 900;
	letter-spacing: .105em;
	line-height: 1.2;
	text-transform: uppercase;
}

.article-taxonomy__items {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	min-width: 0;
}

.article-taxonomy .article-taxonomy__items a,
.article-taxonomy .article-taxonomy__text {
	align-items: center;
	background: color-mix(in srgb, var(--mag-soft) 66%, var(--mag-surface));
	border: 1px solid var(--mag-line);
	border-radius: 7px;
	color: var(--mag-ink);
	display: inline-flex;
	font-family: var(--mag-sans);
	font-size: .71rem;
	font-weight: 790;
	gap: 7px;
	line-height: 1.2;
	margin: 0;
	min-height: 36px;
	padding: 8px 11px;
	text-decoration: none;
	transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.article-taxonomy .article-taxonomy__items a:hover {
	background: var(--mag-ink);
	border-color: var(--mag-ink);
	color: var(--mag-surface);
}

.article-taxonomy .article-taxonomy__items a:focus-visible {
	border-color: var(--mag-accent);
	box-shadow: 0 0 0 3px rgba(var(--mag-accent-rgb), .18);
	outline: 0;
}

.article-taxonomy__external {
	color: var(--mag-accent);
	font-size: .82rem;
	font-weight: 900;
	line-height: 1;
	transform: translateY(-1px);
}

.article-taxonomy__link--source:hover .article-taxonomy__external {
	color: currentColor;
}

.article-topics {
	background: var(--mag-surface);
	min-width: 0;
	overflow: hidden;
	width: 100%;
}

.article-topics__header {
	align-content: center;
	align-items: start;
	display: grid;
	gap: 6px;
	justify-items: start;
	min-width: 0;
}

.article-topics__title {
	color: var(--mag-accent);
	font-size: .64rem;
	margin: 0;
}

.article-topics__hint {
	align-items: center;
	color: var(--mag-muted);
	display: inline-flex;
	font-family: var(--mag-sans);
	font-size: .57rem;
	font-weight: 760;
	gap: 5px;
	letter-spacing: .01em;
	line-height: 1.25;
}

.article-topics__hint::after {
	border-right: 1.5px solid currentColor;
	border-top: 1.5px solid currentColor;
	content: "";
	height: 6px;
	transform: rotate(45deg);
	width: 6px;
}

.article-topics__hint[hidden] {
	display: none;
}

.article-topics__body {
	min-width: 0;
	overflow: hidden;
	position: relative;
}

.article-topics__body::before,
.article-topics__body::after {
	bottom: 0;
	content: "";
	opacity: 0;
	pointer-events: none;
	position: absolute;
	top: 0;
	transition: opacity .16s ease;
	width: 30px;
	z-index: 2;
}

.article-topics__body::before {
	background: linear-gradient(90deg, var(--mag-surface) 16%, transparent);
	left: 0;
}

.article-topics__body::after {
	background: linear-gradient(270deg, var(--mag-surface) 16%, transparent);
	right: 0;
}

.article-topics.is-overflowing:not(.is-at-start) .article-topics__body::before,
.article-topics.is-overflowing:not(.is-at-end) .article-topics__body::after {
	opacity: 1;
}

.article-topics__viewport {
	max-width: 100%;
	min-width: 0;
	overflow-x: auto;
	overflow-y: hidden;
	overscroll-behavior-inline: contain;
	scroll-padding-inline: 1px;
	scroll-snap-type: x proximity;
	scrollbar-color: color-mix(in srgb, var(--mag-accent) 48%, var(--mag-line)) transparent;
	scrollbar-width: thin;
	-webkit-overflow-scrolling: touch;
}

.article-topics__viewport:focus-visible {
	box-shadow: inset 0 0 0 2px var(--mag-accent);
	outline: 0;
}

.article-topics__viewport::-webkit-scrollbar {
	height: 5px;
}

.article-topics__viewport::-webkit-scrollbar-track {
	background: transparent;
}

.article-topics__viewport::-webkit-scrollbar-thumb {
	background: color-mix(in srgb, var(--mag-accent) 48%, var(--mag-line));
	border-radius: 999px;
}

.article-topics__track {
	align-items: center;
	display: flex;
	flex-wrap: nowrap;
	gap: 8px;
	min-width: max-content;
	padding: 2px 1px 3px 0;
}

.article-topics__track a {
	background: color-mix(in srgb, var(--mag-soft) 66%, var(--mag-surface));
	border: 1px solid var(--mag-line);
	border-radius: 7px;
	color: var(--mag-ink);
	display: block;
	flex: 0 0 auto;
	font-family: var(--mag-sans);
	font-size: .71rem;
	font-weight: 800;
	line-height: 1.2;
	margin: 0;
	min-height: 36px;
	padding: 8px 11px;
	scroll-snap-align: start;
	text-decoration: none;
	transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
	white-space: nowrap;
}

.article-topics__track a:hover {
	background: var(--mag-ink);
	border-color: var(--mag-ink);
	color: var(--mag-surface);
	transform: translateY(-1px);
}

.article-topics__track a:focus-visible {
	border-color: var(--mag-accent);
	box-shadow: 0 0 0 3px rgba(var(--mag-accent-rgb), .18);
	outline: 0;
}

@media (max-width: 699px) {
	.article-taxonomy {
		border-radius: 10px;
	}

	.article-taxonomy__row,
	.article-source.article-taxonomy__row {
		align-items: start;
		gap: 8px;
		grid-template-columns: minmax(0, 1fr);
		min-height: 0;
		padding: 13px 14px;
	}

	.article-taxonomy__label {
		line-height: 1.2;
	}

	.article-topics__header {
		align-items: center;
		display: flex;
		gap: 12px;
		justify-content: space-between;
		width: 100%;
	}

	.article-topics__track {
		gap: 7px;
		padding: 2px 1px;
	}

	.article-topics__track a {
		font-size: .69rem;
		min-height: 34px;
		padding: 7px 9px;
	}

	.article-topics__viewport {
		scrollbar-width: none;
	}

	.article-topics__viewport::-webkit-scrollbar {
		display: none;
	}

	.article-topics__hint {
		font-size: .59rem;
	}

	.article-topics__body::before,
	.article-topics__body::after {
		width: 25px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.article-taxonomy a,
	.article-topics__track a {
		transition: none;
	}

	.article-topics__track a:hover {
		transform: none;
	}
}
