/* ==========================================================================
   bw lilylee – profile-tabs.css
   Profilseite (Template member_profile) in drei Reitern: Kurzinfos,
   Charakter, Weiteres. Umschalten ohne Neuladen und ohne JavaScript.
   Eckig und umrandet wie der Rest des Themes, Farben und Schriften aus
   global.css (Variablen --ll-…).
   ========================================================================== */

/******************* REITER *******************/

/* Optionsfelder unsichtbar, aber per Tastatur erreichbar (Pfeiltasten wechseln die Seite) */
.ll-profil-radio {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
	pointer-events: none;
}

.ll-profil-reiter {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin: 6px 0 0;
}

/* Eckige, umrandete Symbole wie in der Seitenleiste */
.ll-profil-reiter label {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	background: var(--ll-glass-dark);
	border: 1px solid var(--ll-border);
	border-radius: 0;
	color: var(--ll-text);
	font-size: 19px;
	cursor: pointer;
	-webkit-backdrop-filter: var(--ll-glass-blur);
	backdrop-filter: var(--ll-glass-blur);
}

/* Ausgewähltes Symbol: oranger Rahmen, Symbol in Orange */
#ll-profil-1:checked ~ .ll-profil-reiter label[for="ll-profil-1"],
#ll-profil-2:checked ~ .ll-profil-reiter label[for="ll-profil-2"],
#ll-profil-3:checked ~ .ll-profil-reiter label[for="ll-profil-3"] {
	background: rgba(78, 78, 78, 0.9);
	border-color: var(--ll-contrast);
	box-shadow: inset 0 -3px 0 var(--ll-contrast);
	color: var(--ll-contrast);
}

/* Tastaturfokus sichtbar machen */
#ll-profil-1:focus-visible ~ .ll-profil-reiter label[for="ll-profil-1"],
#ll-profil-2:focus-visible ~ .ll-profil-reiter label[for="ll-profil-2"],
#ll-profil-3:focus-visible ~ .ll-profil-reiter label[for="ll-profil-3"] {
	outline: 2px solid var(--ll-highlight);
	outline-offset: 2px;
}

/******************* SEITEN *******************/

.ll-profil-seite {
	display: none;
	animation: ll-tab-fade 0.3s ease;
}

#ll-profil-1:checked ~ .ll-profil-seite-1,
#ll-profil-2:checked ~ .ll-profil-seite-2,
#ll-profil-3:checked ~ .ll-profil-seite-3 {
	display: block;
}

/******************* KOPF (SEITE 1) *******************/

/* Links Zitat, darunter Kurzinfos mit Allgemeines daneben, ganz rechts Name, Avatar und Icon */
.ll-profil-kopf {
	display: grid;
	grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto;
	grid-template-areas:
		"zitat zitat person"
		"kurz  allg  person";
	/* Die rechte Spalte ist höher: der zusätzliche Platz geht in die zweite Zeile, nicht unter das Zitat */
	grid-template-rows: auto 1fr;
	align-items: start;
	gap: 16px;
	margin: 0 0 16px;
}

.ll-profil-kopf-zitat {
	grid-area: zitat;
	margin: 0;
}

/* Kurzinfos reichen bis zum unteren Ende von Avatar und Icon */
.ll-profil-kopf-kurz {
	grid-area: kurz;
	align-self: stretch;
}

.ll-profil-kopf-kurz .ll-profil-box-text {
	flex: 1;
	max-height: 360px;
}

.ll-profil-kopf-allg {
	grid-area: allg;
	margin: 0;
}

.ll-profil-person {
	grid-area: person;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	padding: 16px;
	background: var(--ll-glass-dark);
	border: var(--ll-box-border);
	-webkit-backdrop-filter: var(--ll-glass-blur);
	backdrop-filter: var(--ll-glass-blur);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.ll-profil-name {
	min-width: 0;
	max-width: 200px;
	text-align: center;
}

/* Eckiger Avatar mit orangem Rahmen wie in der Seitenleiste */
/* Avatar und Icon gleich breit */
.ll-profil-avatar img {
	display: block;
	box-sizing: border-box;
	width: 180px;
	height: auto;
	border-radius: 0;
	border: 3px solid var(--ll-contrast);
	padding: 3px;
	background: var(--ll-basic-dark);
	box-shadow: 0 0 18px rgba(205, 102, 0, 0.35);
}

/* Name in der schmalen Metal wie in der Seitenleiste (Isometra gibt es nur in einem sehr kräftigen Schnitt) */
.ll-profil-titel {
	font-family: var(--ll-font-ui);
	font-weight: 400;
	font-size: 42px;
	letter-spacing: 0.03em;
	line-height: 1.1;
	color: var(--ll-contrast);
	overflow-wrap: break-word;
}

.ll-profil-titel a:link,
.ll-profil-titel a:visited {
	text-decoration: none;
}

/* Gruppenformatierung wie <strong> beim Benutzernamen nicht fett darstellen */
.ll-profil-titel strong,
.ll-profil-titel b {
	font-weight: 400;
}

.ll-profil-untertitel {
	margin: 4px 0 8px;
	color: var(--ll-text-muted);
	font-family: var(--ll-font-ui);
	font-size: 15px;
	letter-spacing: 0.06em;
}

/******************* ZITATE *******************/

.ll-profil-zitat {
	position: relative;
	min-width: 0;
	padding: 10px 20px 10px 52px;
	text-align: left;
}

/* Großes Anführungszeichen (Font Awesome) */
.ll-profil-zitat::before {
	content: "\f10d";
	position: absolute;
	top: 8px;
	left: 16px;
	font-family: "Font Awesome 6 Free";
	font-weight: 900;
	font-size: 24px;
	color: var(--ll-contrast);
}

/* Cormorant Garamond Kursiv */
.ll-profil-zitat-text {
	font-family: var(--ll-font-text);
	font-weight: 400;
	font-style: italic;
	font-size: 25px;
	line-height: 1.35;
	color: var(--ll-text);
	overflow-wrap: break-word;
}

.ll-profil-zitat-quelle {
	margin-top: 8px;
	font-family: var(--ll-font-ui);
	font-size: 14px;
	letter-spacing: 0.06em;
	color: var(--ll-text-muted);
}

.ll-profil-zitat-quelle::before {
	content: "— ";
	color: var(--ll-contrast);
}

/* Einzelnes Zitat als eigene Box */
.ll-profil-zitat-solo {
	margin: 0 0 16px;
	padding-top: 16px;
	padding-bottom: 16px;
	background: var(--ll-glass-dark);
	border: var(--ll-box-border);
	-webkit-backdrop-filter: var(--ll-glass-blur);
	backdrop-filter: var(--ll-glass-blur);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.ll-profil-zitat-solo::before {
	top: 14px;
}

/******************* ALLGEMEINES / FORENINFOS (SPALTEN) *******************/

.ll-profil-leiste {
	margin: 0 0 16px;
	background: var(--ll-glass-dark);
	border: var(--ll-box-border);
	padding: 1px;
	-webkit-backdrop-filter: var(--ll-glass-blur);
	backdrop-filter: var(--ll-glass-blur);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.ll-profil-leiste-titel {
	background: rgba(78, 78, 78, 0.9);
	border-left: 6px solid var(--ll-contrast);
	border-bottom: 1px solid var(--ll-contrast);
	padding: 8px 16px;
	font-family: var(--ll-font-ui);
	font-size: 22px;
	line-height: 1.2;
	color: #fff;
}

/* Jede Angabe in einer eigenen Spalte, die Spalten verteilen sich gleichmäßig */
.ll-profil-spalten {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.ll-profil-spalte {
	min-width: 0;
	padding: 12px 14px;
	border-left: 1px solid var(--ll-border-soft);
	text-align: center;
	overflow-wrap: break-word;
}

.ll-profil-spalte:first-child {
	border-left: 0;
}

.ll-profil-spalte b {
	display: block;
	margin-bottom: 4px;
	color: var(--ll-text-muted);
	font-family: var(--ll-font-ui);
	font-size: 14px;
	font-weight: 400;
	letter-spacing: 0.04em;
}

.ll-profil-spalte span {
	font-family: var(--ll-font-text);
	font-size: 19px;
	color: var(--ll-text);
}

/******************* ICON (SEITE 1) *******************/

/* Quadratisches Icon mit orangem Rahmen wie der Avatar */
.ll-profil-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 180px;
	height: 180px;
	overflow: hidden;
	border: 3px solid var(--ll-contrast);
	padding: 3px;
	background: var(--ll-basic-dark);
	box-shadow: 0 0 18px rgba(205, 102, 0, 0.35);
	color: var(--ll-text-faint);
	font-family: var(--ll-font-ui);
	font-size: 14px;
}

.ll-profil-icon img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/******************* GIF MIT TEXTBOX (SEITE 2) *******************/

.ll-profil-gifzeile {
	display: grid;
	grid-template-columns: 240px minmax(0, 1fr);
	align-items: start;
	gap: 16px;
	margin: 0 0 16px;
}

/* Gif neben der Charakter-Box: hochkant, etwas höher als breit */
.ll-profil-gifzeile .ll-profil-gif {
	height: 300px;
}

/* Gif neben dem Zitat: quer */
.ll-profil-gifband .ll-profil-gif {
	height: 220px;
}

/* Charakter-Box mindestens so hoch wie das Gif daneben */
.ll-profil-gifzeile .ll-profil-box {
	align-self: stretch;
}

.ll-profil-gifzeile .ll-profil-box-text {
	flex: 1;
	max-height: 260px;
}

/******************* GIFS *******************/

/* Zitat mit Gif rechts daneben */
.ll-profil-gifband {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	align-items: center;
	gap: 16px;
	margin: 0 0 16px;
	padding: 12px;
	background: var(--ll-glass-dark);
	border: var(--ll-box-border);
	-webkit-backdrop-filter: var(--ll-glass-blur);
	backdrop-filter: var(--ll-glass-blur);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

/* Feste Größe: jedes Gif wird zugeschnitten, damit alle Profile gleich aussehen */
.ll-profil-gif {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	height: 190px;
	overflow: hidden;
	border: 3px solid var(--ll-contrast);
	padding: 3px;
	box-shadow: 0 0 18px rgba(205, 102, 0, 0.35);
	background: var(--ll-basic-dark);
	color: var(--ll-text-faint);
	font-family: var(--ll-font-ui);
	font-size: 14px;
}

.ll-profil-gif img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: grayscale(100%); /* Schwarz-Weiß wie das Hintergrundbild; Zeile löschen für Farbe */
}

/******************* TEXTBOXEN *******************/

/* Zwei Spalten, auf schmalen Bildschirmen eine */
.ll-profil-raster {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	margin: 0 0 16px;
}

.ll-profil-breit {
	grid-column: 1 / -1;
}

.ll-profil-box {
	display: flex;
	flex-direction: column;
	min-width: 0;
	background: var(--ll-glass-dark);
	border: var(--ll-box-border);
	border-radius: 0;
	padding: 1px;
	-webkit-backdrop-filter: var(--ll-glass-blur);
	backdrop-filter: var(--ll-glass-blur);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

/* Überschrift wie die Kategorien (.thead): Metal, oranger Balken links */
.ll-profil-box-titel {
	background: rgba(78, 78, 78, 0.9);
	border-left: 6px solid var(--ll-contrast);
	border-bottom: 1px solid var(--ll-contrast);
	padding: 10px 16px;
	font-family: var(--ll-font-ui);
	font-size: 26px;
	line-height: 1.2;
	color: #fff;
}

/* Lange Texte scrollen innerhalb der Box */
.ll-profil-box-text {
	max-height: 320px;
	overflow: auto;
	padding: 14px 18px;
	font-family: var(--ll-font-text);
	font-size: 17px;
	line-height: 1.6;
	color: var(--ll-text);
	text-align: justify;
	hyphens: auto;
	overflow-wrap: break-word;
	scrollbar-width: thin;
	scrollbar-color: var(--ll-contrast) var(--ll-basic-dark);
}

.ll-profil-breit .ll-profil-box-text {
	max-height: 420px;
}

/* Kleine Textboxen oben auf Seite 2 */
.ll-profil-klein .ll-profil-box-titel {
	padding: 7px 14px;
	font-size: 20px;
}

.ll-profil-klein .ll-profil-box-text {
	height: 130px;
	padding: 10px 14px;
	font-size: 16px;
}

.ll-profil-box-text b {
	color: var(--ll-contrast);
}

/* Eine Zeile "Bezeichnung  Wert" */
.ll-profil-fakt {
	padding: 5px 0;
	border-bottom: 1px solid var(--ll-border-soft);
	text-align: left;
}

.ll-profil-fakt:last-child {
	border-bottom: 0;
}

.ll-profil-fakt b {
	display: inline-block;
	min-width: 120px;
	margin-right: 8px;
	color: var(--ll-text-muted);
	font-family: var(--ll-font-ui);
	font-size: 14px;
	font-weight: 400;
	letter-spacing: 0.04em;
}

/******************* KLEINE TEXTBOXEN (SEITE 2) *******************/

/* Ausgefüllte Boxen teilen sich die Breite: zwei nebeneinander, eine allein geht über die ganze Zeile */
.ll-profil-kleinraster {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin: 0 0 16px;
}

.ll-profil-kleinraster > .ll-profil-box {
	flex: 1 1 calc(50% - 8px);
	box-sizing: border-box;
}

@media (max-width: 800px) {
	.ll-profil-kleinraster > .ll-profil-box {
		flex-basis: 100%;
	}
}

/******************* LEERE FELDER AUSBLENDEN *******************/
/* Ein Feld gilt als leer, wenn zwischen den Tags nichts steht (auch kein Leerzeichen).
   So verschwinden nicht ausgefüllte Profilmanager-Felder von selbst. */

/* Textbox ohne Text, Titelzeile ohne Überschrift */
.ll-profil-box:has(> .ll-profil-box-text:empty),
.ll-profil-box-titel:empty {
	display: none;
}

/* Gif oder Icon ohne Bild oder mit leerer Adresse */
.ll-profil-gif:empty,
.ll-profil-gif:has(> img[src=""]),
.ll-profil-icon:empty,
.ll-profil-icon:has(> img[src=""]) {
	display: none;
}

/* Zitat ohne Text, Quelle leer */
.ll-profil-zitat:has(> .ll-profil-zitat-text:empty),
.ll-profil-zitat-quelle:empty {
	display: none;
}

/* Spalte bei „Allgemeines“ ohne Wert */
.ll-profil-spalte:has(> span:empty) {
	display: none;
}

/* Leiste, in der keine Spalte einen Wert hat */
.ll-profil-leiste:not(:has(> .ll-profil-spalten > .ll-profil-spalte > span:not(:empty))) {
	display: none;
}

/* Bereiche, in denen gar nichts ausgefüllt ist, samt Abstand ausblenden */
.ll-profil-kleinraster:not(:has(> .ll-profil-box > .ll-profil-box-text:not(:empty))),
.ll-profil-raster:not(:has(> .ll-profil-box > .ll-profil-box-text:not(:empty))),
.ll-profil-gifzeile:has(> .ll-profil-gif:empty):has(> .ll-profil-box > .ll-profil-box-text:empty),
.ll-profil-gifzeile:has(> .ll-profil-gif > img[src=""]):has(> .ll-profil-box > .ll-profil-box-text:empty),
.ll-profil-gifband:has(> .ll-profil-gif:empty):has(> .ll-profil-zitat > .ll-profil-zitat-text:empty),
.ll-profil-gifband:has(> .ll-profil-gif > img[src=""]):has(> .ll-profil-zitat > .ll-profil-zitat-text:empty) {
	display: none;
}

/* Fehlt das Gif, nimmt die Textbox bzw. das Zitat die ganze Breite ein */
.ll-profil-gifzeile:has(> .ll-profil-gif:empty),
.ll-profil-gifzeile:has(> .ll-profil-gif > img[src=""]),
.ll-profil-gifband:has(> .ll-profil-gif:empty),
.ll-profil-gifband:has(> .ll-profil-gif > img[src=""]) {
	grid-template-columns: minmax(0, 1fr);
}

/* Fehlt das Zitat, steht das Gif allein in der Mitte */
.ll-profil-gifband:has(> .ll-profil-zitat > .ll-profil-zitat-text:empty) {
	grid-template-columns: 320px;
	justify-content: center;
}

/* Ohne Werte bei „Allgemeines“ nehmen die Kurzinfos dessen Platz ein (nur in der breiten Ansicht) */
@media (min-width: 1101px) {
	.ll-profil-kopf:not(:has(> .ll-profil-kopf-allg > .ll-profil-spalten > .ll-profil-spalte > span:not(:empty))) > .ll-profil-kopf-kurz {
		grid-column: 1 / 3;
	}
}

@media (max-width: 1100px) {
	/* Mittlere Breite: Allgemeines unter die Kurzinfos */
	.ll-profil-kopf {
		grid-template-columns: minmax(0, 1fr) auto;
		grid-template-areas:
			"zitat person"
			"kurz  person"
			"allg  allg";
		grid-template-rows: auto 1fr auto;
	}
}

@media (max-width: 800px) {
	.ll-profil-raster {
		grid-template-columns: minmax(0, 1fr);
	}

	/* Auf dem Handy: Name, Avatar und Icon zuerst, dann Zitat, Kurzinfos, Allgemeines */
	.ll-profil-kopf {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas:
			"person"
			"zitat"
			"kurz"
			"allg";
		grid-template-rows: none;
	}

	.ll-profil-titel {
		font-size: 32px;
	}

	.ll-profil-gifzeile {
		grid-template-columns: minmax(0, 1fr);
		justify-items: center;
	}

	.ll-profil-gifzeile .ll-profil-gif {
		width: 240px;
		max-width: 100%;
	}

	.ll-profil-gifzeile .ll-profil-box {
		justify-self: stretch;
	}

	.ll-profil-gifband {
		grid-template-columns: minmax(0, 1fr);
		justify-items: center;
	}

	.ll-profil-gifband .ll-profil-gif {
		width: 320px;
		max-width: 100%;
	}

	.ll-profil-gifband .ll-profil-zitat {
		justify-self: stretch;
	}

	.ll-profil-spalte {
		border-left: 0;
		border-top: 1px solid var(--ll-border-soft);
	}
}
