/*
 * Xypher global custom styles. Site-wide rules only — never put page CSS
 * in templates; add it here.
 */

/*
 * Scrollable tab bars.
 * Usage: <div class="scroll-tabs"><ul class="nav ...">…</ul></div>
 * The first child scrolls; arrows and edge fades are driven by xypher.js,
 * which toggles .at-start/.at-end on the wrapper.
 */
.scroll-tabs {
	position: relative;
}
.scroll-tabs > :first-child {
	flex-wrap: nowrap;
	white-space: nowrap;
	overflow-x: auto;
	scrollbar-width: none;
}
.scroll-tabs > :first-child::-webkit-scrollbar {
	display: none;
}
/* fade the edge that has more content off-screen */
.scroll-tabs:not(.at-end) > :first-child {
	-webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 3.5rem), transparent);
	mask-image: linear-gradient(90deg, #000 calc(100% - 3.5rem), transparent);
}
.scroll-tabs:not(.at-start) > :first-child {
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 3.5rem);
	mask-image: linear-gradient(90deg, transparent, #000 3.5rem);
}
.scroll-tabs:not(.at-start):not(.at-end) > :first-child {
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 3.5rem, #000 calc(100% - 3.5rem), transparent);
	mask-image: linear-gradient(90deg, transparent, #000 3.5rem, #000 calc(100% - 3.5rem), transparent);
}
.scroll-tabs-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	display: none;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--bs-secondary-bg);
	color: var(--bs-body-color);
	font-size: 0.85rem;
	opacity: 0.85;
}
.scroll-tabs-arrow:hover {
	opacity: 1;
}
.scroll-tabs-arrow-prev {
	left: 0;
}
.scroll-tabs-arrow-next {
	right: 0;
}
.scroll-tabs:not(.at-start) > .scroll-tabs-arrow-prev,
.scroll-tabs:not(.at-end) > .scroll-tabs-arrow-next {
	display: flex;
}
@media (hover: none) {
	/* touch devices swipe; arrows would only cover the edge tabs */
	.scroll-tabs-arrow {
		display: none !important;
	}
}

/* let hover pass through disabled buttons so tooltips on their wrappers work */
.btn:disabled,
.btn.disabled {
	pointer-events: none;
}

/* Site news header and bottom-right announcement queue. */
.xy-news-header {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	min-height: 42px;
	padding: 0.55rem 3rem;
	background: #087f5b;
	color: #fff;
	text-align: center;
}
.xy-news-header-link {
	color: inherit;
}
.xy-news-header-link:hover {
	color: #fff;
	text-decoration: underline;
}
.xy-news-header-close {
	position: absolute;
	right: 1rem;
}
.xy-news-toast-region {
	z-index: 1090;
	width: min(420px, 100%);
	pointer-events: none;
}
.xy-news-toast {
	width: 100%;
	max-width: 390px;
	margin-left: auto;
	background: var(--bs-body-bg);
	box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.28);
	pointer-events: auto;
}
.news-article-content {
	line-height: 1.75;
}
.news-article-content pre,
.news-article-content code {
	white-space: pre-wrap;
	word-break: break-word;
}
