/**
 * Reaktionen – Aussehen
 *
 * Die Farben passen sich dem Style an (Linkfarbe, Schrift). Wer etwas
 * ändern möchte, überschreibt die Variablen unten, z. B. in der CSS-Datei
 * des eigenen Styles:
 *   :root { --reak-akzent: #e05a47; }
 *
 * @author Maggan22
 * @license GPL-2.0-only
 */

:root {
	--reak-flaeche: #ffffff;
	--reak-pille: rgba(0, 0, 0, 0.045);
	--reak-pille-hover: rgba(0, 0, 0, 0.085);
	--reak-rand: rgba(0, 0, 0, 0.1);
	--reak-schatten: 0 6px 24px rgba(0, 0, 0, 0.16), 0 1px 3px rgba(0, 0, 0, 0.12);
	--reak-akzent: #105289;
	--reak-akzent-weich: rgba(16, 82, 137, 0.1);
	--reak-text-leise: #6b6b6b;
}

/* ---------- Leiste unter dem Beitrag ---------- */

.reak-leiste {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 6px 10px;
	clear: both;
	margin: 10px 0 4px;
	padding-top: 8px;
	border-top: 1px dashed var(--reak-rand);
	font-size: 1em;
	line-height: 1.4;
}

.reak-summe {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	min-height: 28px;
}

.reak-summe-link {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px;
	text-decoration: none !important;
	border-radius: 999px;
}

a.reak-summe-link:focus-visible {
	outline: 2px solid var(--reak-akzent);
	outline-offset: 2px;
}

.reak-zahl {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 2px 9px 2px 4px;
	border-radius: 999px;
	background: var(--reak-pille);
	color: inherit;
	font-weight: bold;
	font-size: 0.95em;
	transition: background-color 0.15s ease;
}

a.reak-summe-link:hover .reak-zahl {
	background: var(--reak-pille-hover);
}

.reak-zahl-meine {
	background: var(--reak-akzent-weich);
	box-shadow: inset 0 0 0 1px var(--reak-akzent);
}

.reak-bild {
	display: inline-block;
	width: 20px;
	height: 20px;
	object-fit: contain;
	vertical-align: middle;
	flex-shrink: 0;
}

.reak-anzahl {
	min-width: 0.6em;
	text-align: center;
}

/* ---------- Knopf „Reagieren“ ---------- */

.reak-knopf-box {
	display: none;
	margin-left: auto;
}

.reak-js .reak-knopf-box {
	display: block;
}

.reak-knopf {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 4px 11px;
	border: 1px solid transparent;
	border-radius: 999px;
	background: transparent;
	color: var(--reak-text-leise);
	font-family: inherit;
	font-size: 0.95em;
	font-weight: bold;
	line-height: 1.4;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.reak-knopf .icon {
	font-size: 15px;
}

.reak-knopf .reak-bild {
	width: 18px;
	height: 18px;
}

.reak-knopf:hover,
.reak-knopf:focus-visible,
.reak-knopf-offen {
	background: var(--reak-pille);
	border-color: var(--reak-rand);
	color: inherit;
	outline: none;
}

.reak-knopf:focus-visible {
	box-shadow: 0 0 0 2px var(--reak-akzent);
}

.reak-knopf-aktiv {
	color: var(--reak-akzent);
	background: var(--reak-akzent-weich);
}

.reak-knopf-ping .reak-bild {
	animation: reak-ping 0.45s ease-out;
}

.reak-laedt {
	opacity: 0.6;
	pointer-events: none;
}

@keyframes reak-ping {
	0%   { transform: scale(0.6); }
	60%  { transform: scale(1.25); }
	100% { transform: scale(1); }
}

/* ---------- Auswahl ---------- */

.reak-auswahl {
	position: absolute;
	z-index: 1000;
	display: flex;
	gap: 2px;
	padding: 6px 8px;
	background: var(--reak-flaeche);
	border: 1px solid var(--reak-rand);
	border-radius: 999px;
	box-shadow: var(--reak-schatten);
	animation: reak-auf 0.16s ease-out;
}

.reak-auswahl[hidden] {
	display: none;
}

.reak-auswahl-unten {
	animation-name: reak-ab;
}

@keyframes reak-auf {
	from { opacity: 0; transform: translateY(6px) scale(0.96); }
	to   { opacity: 1; transform: none; }
}

@keyframes reak-ab {
	from { opacity: 0; transform: translateY(-6px) scale(0.96); }
	to   { opacity: 1; transform: none; }
}

.reak-auswahl-knopf {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
}

.reak-auswahl-knopf img {
	width: 32px;
	height: 32px;
	object-fit: contain;
	transition: transform 0.15s cubic-bezier(0.3, 1.6, 0.6, 1);
	transform-origin: 50% 80%;
}

.reak-auswahl-knopf:hover img,
.reak-auswahl-knopf:focus-visible img {
	transform: scale(1.3) translateY(-3px);
}

.reak-auswahl-knopf:focus-visible {
	outline: 2px solid var(--reak-akzent);
	outline-offset: -2px;
}

.reak-auswahl-gewaehlt {
	background: var(--reak-akzent-weich);
}

.reak-auswahl-name {
	position: absolute;
	bottom: calc(100% + 6px);
	left: 50%;
	transform: translateX(-50%);
	padding: 2px 8px;
	border-radius: 6px;
	background: rgba(30, 30, 30, 0.9);
	color: #fff;
	font-size: 11px;
	font-weight: bold;
	line-height: 1.5;
	white-space: nowrap;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.12s ease;
}

.reak-auswahl-knopf:hover .reak-auswahl-name,
.reak-auswahl-knopf:focus-visible .reak-auswahl-name {
	opacity: 1;
}

.reak-auswahl-unten .reak-auswahl-name {
	bottom: auto;
	top: calc(100% + 6px);
}

@media (max-width: 480px) {
	.reak-auswahl {
		flex-wrap: wrap;
		justify-content: center;
		max-width: calc(100vw - 16px);
		border-radius: 22px;
	}
	.reak-auswahl-knopf {
		width: 40px;
		height: 40px;
	}
	.reak-auswahl-knopf img {
		width: 30px;
		height: 30px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.reak-auswahl,
	.reak-knopf-ping .reak-bild,
	.reak-auswahl-knopf img {
		animation: none;
		transition: none;
	}
}

/* ---------- „Wer hat reagiert?“ ---------- */

.reak-wer-fenster {
	width: 420px;
	max-width: calc(100vw - 32px);
	box-sizing: border-box;
}

.reak-wer-fenster .alert_text {
	text-align: left;
}

.reak-wer-kopf {
	margin: 0 0 8px;
	color: var(--reak-text-leise);
}

.reak-reiter {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 10px;
	padding: 0 0 8px;
	list-style: none;
	border-bottom: 1px solid var(--reak-rand);
}

.reak-reiter li {
	margin: 0;
	list-style: none;
}

.reak-reiter-knopf {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 10px;
	border: 1px solid transparent;
	border-radius: 999px;
	background: var(--reak-pille);
	color: inherit;
	font-family: inherit;
	font-size: 1em;
	font-weight: bold;
	line-height: 1.5;
	cursor: pointer;
	text-decoration: none !important;
}

.reak-reiter-knopf:hover {
	background: var(--reak-pille-hover);
}

.reak-reiter-aktiv,
.reak-reiter-aktiv:hover {
	background: var(--reak-akzent-weich);
	border-color: var(--reak-akzent);
}

.reak-wer-liste,
.reak-eintraege {
	margin: 0;
	padding: 0;
	list-style: none;
}

.reak-wer-liste {
	max-height: 50vh;
	overflow-y: auto;
}

.reak-wer-liste li,
.reak-eintraege li {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 6px 2px;
	border-bottom: 1px solid var(--reak-rand);
	list-style: none;
}

.reak-wer-liste li:last-child,
.reak-eintraege li:last-child {
	border-bottom: 0;
}

.reak-wer-avatar,
.reak-wer-avatar img,
.reak-wer-ohne {
	flex-shrink: 0;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	object-fit: cover;
}

.reak-wer-avatar {
	display: inline-block;
	overflow: hidden;
}

.reak-wer-ohne {
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--reak-pille);
	color: var(--reak-text-leise);
}

.reak-wer-name,
.reak-eintrag-text {
	flex: 1;
	min-width: 0;
}

.reak-wer-zeit,
.reak-eintrag-inhalt {
	display: block;
	font-size: 0.9em;
	color: var(--reak-text-leise);
}

.reak-eintrag-inhalt {
	color: inherit;
	overflow-wrap: anywhere;
}

.reak-wer-bild {
	width: 24px;
	height: 24px;
}

.reak-zurueck {
	margin-top: 12px;
}

/* Eigene Seiten: etwas größere Schrift wie im Beitragstext */
.panel .reak-wer,
.reak-eintraege {
	font-size: 1.2em;
}

.reak-leer {
	margin: 8px 0;
}

/* ---------- Profil und Mini-Profil ---------- */

.reak-profil-liste {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-left: 6px;
	vertical-align: middle;
}

.reak-profil-liste .reak-zahl {
	padding: 1px 7px 1px 3px;
	font-size: 0.9em;
}

.reak-profil-liste .reak-bild {
	width: 18px;
	height: 18px;
}

/* ---------- Bestenliste ---------- */

.reak-reiter-links {
	border-bottom: 0;
}

.reak-bestenliste .reak-platz {
	width: 60px;
	text-align: center;
}

.reak-bestenliste .reak-zahlspalte {
	width: 22%;
	text-align: center;
}

.reak-bestenliste td {
	vertical-align: middle;
	padding-top: 6px;
	padding-bottom: 6px;
}

.reak-platz-zahl {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 26px;
	height: 26px;
	padding: 0 4px;
	box-sizing: border-box;
	border-radius: 999px;
	background: var(--reak-pille);
	font-weight: bold;
}

.reak-platz-1 { background: #f6d365; color: #5b4300; }
.reak-platz-2 { background: #dfe3e8; color: #3c4650; }
.reak-platz-3 { background: #ecc3a0; color: #5a3416; }

.reak-bl-avatar img {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	object-fit: cover;
	vertical-align: middle;
	margin-right: 6px;
}

/* ---------- Benachrichtigung ---------- */

.reak-noti-bild {
	width: 16px;
	height: 16px;
	vertical-align: text-bottom;
}

@media (max-width: 700px) {
	.reak-knopf-text {
		display: none;
	}
	.reak-knopf {
		padding: 5px 9px;
	}
	.reak-bestenliste .reak-zahlspalte:last-child,
	.reak-bestenliste th.reak-zahlspalte:last-child {
		display: none;
	}
}
