/* Language picker, right-to-left pages and per-script typography (see app/Support/I18n). Added 2026-11-20. */

/* ---------------------------------------------------------------- picker */
.lp {
	position: relative;
	z-index: 40;
}

.lp-btn {
	list-style: none;
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	height: 2.4rem;
	padding: 0 .85rem;
	border-radius: 999px;
	cursor: pointer;
	color: #393D95;
	font-family: "Inter-SemiBold", sans-serif;
	font-size: .9rem;
	background-color: #fff;
	box-shadow: inset 0 0 0 1px #DCDDEB;
	user-select: none;
	white-space: nowrap;
}

.lp-btn::-webkit-details-marker {
	display: none;
}

.lp-btn:hover,
.lp[open] .lp-btn {
	background-color: #ECEDF9;
}

.lp-btn:focus-visible {
	outline: 2px solid #393D95;
	outline-offset: 2px;
}

.lp-btn svg {
	width: 1.15rem;
	height: 1.15rem;
	flex: none;
}

.lp-list {
	position: absolute;
	top: calc(100% + .5rem);
	inset-inline-end: 0;
	margin: 0;
	padding: .5rem;
	list-style: none;
	width: min(92vw, 19rem);
	max-height: min(70vh, 34rem);
	overflow-y: auto;
	display: grid;
	grid-template-columns: 1fr;
	gap: 2px;
	background-color: #fff;
	border-radius: 1.1rem;
	box-shadow: 0 1.5rem 3.5rem rgba(21, 23, 43, .2), inset 0 0 0 1px #E3E4EE;
}

@media (min-width: 640px) {
	.lp-list {
		width: 27rem;
		grid-template-columns: 1fr 1fr;
	}
}

/* Phones: the list spans the header's width instead of hanging off the button (it would leave the screen). */
@media (max-width: 639.98px) {
	.lp {
		position: static;
	}

	.lp-list {
		top: calc(100% - .25rem);
		left: .75rem;
		right: .75rem;
		width: auto;
		max-height: calc(100vh - 5.5rem);
	}
}

.lp-list a {
	display: block;
	padding: .55rem .75rem;
	border-radius: .6rem;
	color: #15172B;
	text-decoration: none;
	font-size: .95rem;
	line-height: 1.3;
	text-align: start;
}

.lp-list a:hover,
.lp-list a:focus-visible {
	background-color: #ECEDF9;
	color: #15172B;
	outline: none;
}

.lp-list a[aria-current="true"] {
	background-color: #393D95;
	color: #fff;
	font-family: "Inter-SemiBold", sans-serif;
}

/* ---------------------------------------------------------------- right-to-left (Arabic, Persian) */
/* Bootstrap's own RTL build (css/bootstrap.rtl.min.css) mirrors the grid and the utilities; these are the site's own rules. */
[dir="rtl"] .tap-points li {
	padding-left: 0;
	padding-right: 2rem;
}

[dir="rtl"] .tap-points li::before {
	left: auto;
	right: 0;
}

[dir="rtl"] .tap-arrow {
	display: inline-block;
	transform: scaleX(-1);
}

/* ---------------------------------------------------------------- scripts Inter doesn't cover */
/* Arabic, Persian, Devanagari, Thai and CJK letters come from the system's fonts. The Inter-* families
   each hold one weight, so ask for the weight the class stands for (the system font turns bold) and
   stop the browser from thickening Inter's own bold letters a second time. */
:lang(ar) .Inter-Bold, :lang(fa) .Inter-Bold, :lang(hi) .Inter-Bold, :lang(th) .Inter-Bold,
:lang(zh) .Inter-Bold, :lang(ja) .Inter-Bold, :lang(ko) .Inter-Bold {
	font-weight: 700;
	font-synthesis: none;
}

:lang(ar) .Inter-SemiBold, :lang(fa) .Inter-SemiBold, :lang(hi) .Inter-SemiBold, :lang(th) .Inter-SemiBold,
:lang(zh) .Inter-SemiBold, :lang(ja) .Inter-SemiBold, :lang(ko) .Inter-SemiBold {
	font-weight: 600;
	font-synthesis: none;
}

:lang(ar) .Inter-Medium, :lang(fa) .Inter-Medium, :lang(hi) .Inter-Medium, :lang(th) .Inter-Medium,
:lang(zh) .Inter-Medium, :lang(ja) .Inter-Medium, :lang(ko) .Inter-Medium {
	font-weight: 500;
	font-synthesis: none;
}

/* Tall marks above and below the line (Thai, Devanagari, Arabic) and stacked Vietnamese accents. */
:lang(th) h1, :lang(th) h2, :lang(th) h3, :lang(hi) h1, :lang(hi) h2, :lang(hi) h3,
:lang(ar) h1, :lang(ar) h2, :lang(ar) h3, :lang(fa) h1, :lang(fa) h2, :lang(fa) h3 {
	line-height: 1.4;
}

:lang(vi) h1, :lang(vi) h2, :lang(vi) h3 {
	line-height: 1.25;
}

:lang(th) .cfs-4, :lang(hi) .cfs-4, :lang(ar) .cfs-4, :lang(fa) .cfs-4 {
	line-height: 1.7;
}

/* Headings break between phrases (Japanese, Chrome 119+) or at spaces (Korean), not inside a word. */
:lang(ja) h1, :lang(ja) h2, :lang(ja) h3 {
	word-break: auto-phrase;
}

:lang(ko) h1, :lang(ko) h2, :lang(ko) h3 {
	word-break: keep-all;
}

/* Headings are not hyphenated: browsers hyphenate even words that would fit whole on the next line
   ("Lebensqua-lität"). A word longer than the line still wraps (overflow-wrap, set on body in apps.css). */

html:not([lang="en"]) footer a {
	overflow-wrap: anywhere;
}

/* One-word labels and headings in narrow spots: "examenvoorbereiding" under a stat,
   "Prüfungsvorbereitung" over a footer column. */
html:not([lang="en"]) .tap-stat-label,
html:not([lang="en"]) footer p {
	hyphens: auto;
	hyphenate-limit-chars: 10 5 5;
}

/* ---------------------------------------------------------------- translated legal pages */
.i18n-legal-note {
	margin: 0 0 2rem;
	padding: .9rem 1.1rem;
	border-radius: 1rem;
	line-height: 1.5;
	color: #393D95;
	background-color: #ECEDF9;
}
