/* Cinethursday Glossar
 * Farben zentral hier ändern.
 */
:root {
	--ct-gl-orange-1: #FD9800;
	--ct-gl-orange-2: #E98C00;
	--ct-gl-bg: #0F172A;
	--ct-gl-text: #fff;
}

/* ---------- Begriff im Text ---------- */

.ct-gl {
	position: relative;
	display: inline;
}

.ct-gl__term {
	cursor: help;
	text-decoration: underline dotted var(--ct-gl-orange-1);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
	border-radius: 2px;
}

.ct-gl__term:hover,
.ct-gl__term:focus-visible,
.ct-gl.is-open .ct-gl__term {
	color: var(--ct-gl-orange-2);
	outline: none;
}

.ct-gl__term:focus-visible {
	box-shadow: 0 0 0 2px var(--ct-gl-orange-1);
}

/* ---------- Tooltip ---------- */

.ct-gl__tip {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 60;
	display: block;
	width: max-content;
	max-width: min(320px, 85vw);
	margin-top: 8px;
	padding: 0.75em 0.95em;
	border: 1px solid var(--ct-gl-orange-1);
	border-radius: 8px;
	background: var(--ct-gl-bg);
	color: var(--ct-gl-text);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
	font-size: 0.9rem;
	font-weight: 400;
	font-style: normal;
	line-height: 1.45;
	text-align: left;
	text-transform: none;
	letter-spacing: 0;
	white-space: normal;
	visibility: hidden;
	opacity: 0;
	transform: translateY(-4px);
	transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}

/* Unsichtbare Brücke zwischen Begriff und Tooltip, damit Hover nicht abreißt */
.ct-gl__tip::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: -10px;
	height: 10px;
}

@media (hover: hover) {
	.ct-gl:hover .ct-gl__tip {
		visibility: visible;
		opacity: 1;
		transform: none;
	}
}

.ct-gl.is-open .ct-gl__tip,
.ct-gl:focus-within .ct-gl__tip {
	visibility: visible;
	opacity: 1;
	transform: none;
}

.ct-gl__name {
	display: block;
	margin-bottom: 0.2em;
	color: var(--ct-gl-orange-1);
	font-weight: 700;
}

.ct-gl__text {
	display: block;
}

.ct-gl__tip a.ct-gl__more {
	display: inline-block;
	margin-top: 0.5em;
	color: var(--ct-gl-orange-1) !important;
	font-weight: 700;
	text-decoration: none !important;
}

.ct-gl__tip a.ct-gl__more:hover,
.ct-gl__tip a.ct-gl__more:focus-visible {
	color: var(--ct-gl-orange-2) !important;
	text-decoration: underline !important;
}

/* Handy: Tooltip als Karte am unteren Bildschirmrand */
@media (max-width: 600px) {
	.ct-gl__tip {
		position: fixed;
		top: auto;
		left: 12px !important;
		right: 12px;
		bottom: 12px;
		width: auto;
		max-width: none;
		margin: 0;
		font-size: 0.95rem;
		transform: translateY(8px);
	}
	.ct-gl__tip::before {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ct-gl__tip {
		transition: none;
	}
}

@media print {
	.ct-gl__tip {
		display: none !important;
	}
	.ct-gl__term {
		text-decoration: none;
	}
}

/* ---------- „Erwähnt in“ auf Glossar-Seiten ---------- */

.ct-gl-mentions {
	margin: 2.5em 0 1.5em;
	padding: 1.1em 1.25em;
	border: 1px solid rgba(253, 152, 0, 0.35);
	border-top: 4px solid var(--ct-gl-orange-1);
	border-radius: 6px;
}

.ct-gl-mentions__title {
	margin: 0 0 0.6em !important;
	font-weight: 700;
	font-size: 1.1em;
}

.ct-gl-mentions ul {
	margin: 0 0 0 1.2em;
	padding: 0;
}

.ct-gl-mentions li {
	margin: 0.3em 0;
}

.ct-gl-mentions li::marker {
	color: var(--ct-gl-orange-1);
}

.ct-gl-mentions a {
	text-decoration: none;
	font-weight: 600;
}

.ct-gl-mentions a:hover {
	color: var(--ct-gl-orange-2);
	text-decoration: underline;
}

/* ---------- A–Z-Übersicht ---------- */

.ct-glossar__intro {
	font-size: 1.1em;
}

.ct-glossar__az {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35em;
	margin: 1.5em 0 2em;
}

.ct-glossar__az a,
.ct-glossar__az span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2em;
	height: 2em;
	border-radius: 6px;
	font-weight: 700;
}

.ct-glossar__az a {
	border: 1px solid var(--ct-gl-orange-1);
	text-decoration: none;
}

.ct-glossar__az a:hover,
.ct-glossar__az a:focus-visible {
	background: rgba(253, 152, 0, 0.15);
	color: var(--ct-gl-orange-2);
}

.ct-glossar__az span {
	opacity: 0.3;
}

.ct-glossar__group {
	scroll-margin-top: var(--ct-anchor-offset, 100px);
}

.ct-glossar__letter {
	margin-top: 1.5em;
	padding-bottom: 0.2em;
	border-bottom: 2px solid var(--ct-gl-orange-1);
	color: var(--ct-gl-orange-1);
}

.ct-glossar__list {
	margin: 0;
}

.ct-glossar__entry {
	padding: 0.8em 0;
	border-bottom: 1px solid rgba(127, 127, 127, 0.2);
	scroll-margin-top: var(--ct-anchor-offset, 100px);
}

.ct-glossar__entry:target {
	animation: ct-gl-target 2.6s ease-out;
	border-radius: 4px;
}

@keyframes ct-gl-target {
	0%, 35% { background-color: rgba(253, 152, 0, 0.2); }
	100% { background-color: transparent; }
}

.ct-glossar__entry dt {
	font-weight: 700;
	font-size: 1.1em;
}

.ct-glossar__entry dt a {
	text-decoration: none;
}

.ct-glossar__entry dt a:hover {
	color: var(--ct-gl-orange-2);
	text-decoration: underline;
}

.ct-glossar__entry dd {
	margin: 0.25em 0 0;
}

/* ---------- Filter nach Universum ---------- */

.ct-glossar [hidden] {
	display: none !important;
}

.ct-glossar__filter {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	margin: 1.5em 0 0;
}

.ct-glossar__chip {
	display: inline-flex;
	align-items: center;
	gap: 0.45em;
	margin: 0;
	padding: 0.45em 0.95em;
	border: 1px solid var(--ct-gl-orange-1);
	border-radius: 999px;
	background: transparent;
	color: inherit;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color 0.15s, color 0.15s;
}

.ct-glossar__chip:hover,
.ct-glossar__chip:focus-visible {
	background: rgba(253, 152, 0, 0.15);
	color: inherit;
	outline: none;
}

.ct-glossar__chip:focus-visible {
	box-shadow: 0 0 0 2px var(--ct-gl-orange-1);
}

.ct-glossar__chip.is-active {
	background: var(--ct-gl-orange-1);
	border-color: var(--ct-gl-orange-1);
	color: var(--ct-gl-bg);
}

.ct-glossar__count {
	font-size: 0.8em;
	font-weight: 700;
	opacity: 0.7;
}

.ct-glossar__az a.is-off {
	opacity: 0.3;
	border-color: transparent;
	pointer-events: none;
}

.ct-glossar__badge {
	display: inline-block;
	margin-left: 0.5em;
	padding: 0.1em 0.55em;
	border: 1px solid rgba(253, 152, 0, 0.5);
	border-radius: 999px;
	color: var(--ct-gl-orange-2);
	font-size: 0.65em;
	font-weight: 600;
	letter-spacing: 0.02em;
	vertical-align: middle;
	white-space: nowrap;
}

.ct-glossar__empty {
	font-style: italic;
	opacity: 0.7;
}

@media (prefers-reduced-motion: reduce) {
	.ct-glossar__chip {
		transition: none;
	}
}

/* ---------- Einleitung aus der Übersichtsseite ---------- */

div.ct-glossar__intro {
	font-size: 1em;
}

div.ct-glossar__intro > p:first-child {
	font-size: 1.1em;
}

div.ct-glossar__intro h2 {
	margin-top: 1.2em;
}
