/* Linux-und-Ich-Gestaltung für Galene (meet.linuxandi.net).
   Wird nach Galenes eigenen Stylesheets geladen (siehe Dockerfile) und überschreibt nur Farben,
   Schriften und ein paar Abstände. Farben aus lui-theme/theme.json. */
@font-face { font-family: "Inter"; src: url(/lui/inter-variable.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Space Grotesk"; src: url(/lui/space-grotesk-variable.woff2) format("woff2"); font-weight: 500 700; font-display: swap; }

:root {
	--lui-accent: #ff6600;
	--lui-accent-dark: #cc5200;
	--lui-contrast: #1a1a1a;
	--lui-contrast-2: #2b2a2a;
	--lui-base-2: #f5f4f2;
	--lui-line: #e3e1dd;
	--lui-muted: #63625f;
	--lui-heading: "Space Grotesk", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

body, textarea {
	font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
body, .app, .login-container {
	color: var(--lui-contrast);
	background-color: var(--lui-base-2) !important;
}
#chat { background-color: #fbfaf8; }
.message-sender { background: #ecebe8; }
#users > div:hover { background-color: var(--lui-base-2); }

/* Kopfzeile und Kopf der Seitenleiste: Anthrazit statt Lila */
.navbar, .topnav, .users-header {
	background: var(--lui-contrast) !important;
}
.header-title, .navbar-brand {
	font-family: var(--lui-heading);
	letter-spacing: -0.01em;
}
.header-title { color: #f2f1ed; }

/* Logo links oben: Terminal-Icon + Wortmarke */
.galene-header {
	display: flex !important;
	align-items: center;
	gap: 8px;
	font-family: var(--lui-heading);
	font-weight: 700;
	font-size: 1.05rem;
	line-height: 34px;
	color: #f2f1ed;
	white-space: nowrap;
}
.galene-header svg { flex: none; }
.lui-w-accent { color: var(--lui-accent); }
.lui-w-muted { color: #a19e97; font-weight: 400; }

/* Hover- und Aktiv-Farben: Orange statt Flieder */
.nav-link:hover, .sidenav a:hover, header .collapse:hover { color: var(--lui-accent) !important; }
#chpwspan a, .sidenav .user-logout a { color: var(--lui-accent-dark); }
.peer-active { border-color: var(--lui-accent) !important; }
#invite-dialog { border-color: var(--lui-accent) !important; }
.file-progress { accent-color: var(--lui-accent); }
@keyframes blink { 0% { box-shadow: 0 0 15px var(--lui-accent); } 50% { box-shadow: 0 0 0 transparent; } 100% { box-shadow: 0 0 15px var(--lui-accent); } }
@-webkit-keyframes blink { 0% { box-shadow: 0 0 15px var(--lui-accent); } 50% { box-shadow: 0 0 0 transparent; } 100% { box-shadow: 0 0 15px var(--lui-accent); } }

/* Knöpfe wie im Blog: Orange, Space Grotesk, Versalien */
.btn-blue, .btn-success, #submitbutton {
	color: #fff !important;
	background-color: var(--lui-accent) !important;
	border-color: var(--lui-accent) !important;
	font-family: var(--lui-heading);
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	border-radius: 3px;
}
.btn-blue:hover, .btn-success:hover, #submitbutton:hover {
	background-color: var(--lui-accent-dark) !important;
	border-color: var(--lui-accent-dark) !important;
}

/* Anmeldekasten: weiße Karte mit orangem Rand links, wie die Hinweis-Kästen im Blog */
.login-box {
	height: auto;
	background: #fff;
	border: 1px solid var(--lui-line);
	border-left: 3px solid var(--lui-accent);
	border-radius: 0 6px 6px 0;
	padding: 1.5em 1.5em 1.75em;
}
.login-box h2 {
	font-family: var(--lui-heading);
	color: var(--lui-contrast);
	margin-bottom: 24px;
}
.loginform label { color: var(--lui-muted); }
.loginform input[type="text"]:focus, .loginform input[type="password"]:focus, .form-control:focus {
	border-color: var(--lui-accent) !important;
	box-shadow: 0 0 0 2px rgba(255, 102, 0, 0.2) !important;
	outline: none;
}
input[type="radio"], input[type="checkbox"] { accent-color: var(--lui-accent); }

/* Startseite */
.home .navbar-brand { color: var(--lui-contrast); font-size: 1.8rem; margin-bottom: 2.5rem; }
a { color: var(--lui-accent-dark); }
a:hover { color: var(--lui-accent); }
.signature { color: var(--lui-muted); font-size: 0.85rem; }

/* Startseite (branding/index.html) */
body.lui-start .home { display: flex; justify-content: center; align-items: flex-start; padding: 8vh 16px 32px; }
.lui-card {
	width: 100%; max-width: 520px;
	background: #fff;
	border: 1px solid var(--lui-line);
	border-left: 3px solid var(--lui-accent);
	border-radius: 0 6px 6px 0;
	padding: 28px 30px 26px;
}
.lui-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; margin-bottom: 26px; }
.lui-wordmark { font-family: var(--lui-heading); font-weight: 700; font-size: 1.5rem; color: var(--lui-contrast); letter-spacing: -0.01em; }
.lui-kicker { font: 700 0.75rem/1 "JetBrains Mono", ui-monospace, monospace; text-transform: uppercase; letter-spacing: 0.06em; color: var(--lui-accent-dark); margin: 0 0 10px; }
body.lui-start #title.navbar-brand { display: block; text-align: left; font-size: 1.6rem; font-weight: 700; line-height: 1.2; margin: 0 0 16px; color: var(--lui-contrast); white-space: normal; }
.lui-card p { margin: 0 0 10px; line-height: 1.6; }
.lui-en { color: var(--lui-muted); font-size: 0.9rem; }
.lui-small { font-size: 0.9rem; color: var(--lui-muted); }
body.lui-start #groupform { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--lui-line); }
body.lui-start #groupform label { font-size: 0.8rem; color: var(--lui-muted); margin-bottom: 6px; }
.lui-row { display: flex; gap: 8px; }
.lui-row #group { flex: 1; min-width: 0; height: auto; }
body.lui-start #errormessage { color: #dc2626; font-weight: 600; height: auto; min-height: 0; }
body.lui-start .signature { text-align: center; padding: 14px 16px; border-top: 1px solid var(--lui-line); }
body.lui-start .signature p { margin: 0; }

/* Startseite zweisprachig: jeweils die andere Sprache ausblenden, Umschalter oben rechts */
html[lang="de"] body.lui-start [lang="en"],
html[lang="en"] body.lui-start [lang="de"] { display: none !important; }
.lui-card { position: relative; }
.lang-switch { position: absolute; top: 16px; right: 16px; display: flex; border: 1px solid var(--lui-line); border-radius: 3px; overflow: hidden; }
.lang-switch button { font: 700 0.72rem/1 ui-monospace, "JetBrains Mono", monospace; letter-spacing: 0.04em; padding: 6px 8px; border: 0; background: transparent; color: var(--lui-muted); cursor: pointer; }
.lang-switch button[aria-pressed="true"] { background: var(--lui-accent); color: #fff; }

/* Einstellungen (Seitenpanel rechts) und Profil */
.sidenav { background-color: var(--lui-contrast) !important; }
.sidenav-header h2 { font-family: var(--lui-heading); font-weight: 700; color: #f2f1ed; }
.sidenav a { color: #dbd9d9; }
.sidenav-content { background: #fff; }
.profile-logo { background: var(--lui-contrast-2) !important; color: var(--lui-accent) !important; }
.profile-info { color: var(--lui-contrast); }
#permspan { color: var(--lui-accent-dark) !important; font-style: normal; font-weight: 600; text-transform: none; }
fieldset { border-color: var(--lui-line) !important; border-radius: 6px; }
legend { color: var(--lui-muted); font-family: var(--lui-heading); font-weight: 700; padding: 0 6px; }
.sidenav select, .sidenav .form-control { border-color: var(--lui-line); border-radius: 3px; }

/* Chat-Eingabe und neutrale Knöpfe: Anthrazit statt Bootstrap-Grau */
.btn-default {
	background-color: var(--lui-contrast-2) !important;
	border-color: var(--lui-contrast-2) !important;
	color: #fff !important;
	border-radius: 3px;
}
.btn-default:hover { background-color: var(--lui-accent) !important; border-color: var(--lui-accent) !important; }

/* Meldungen (Toasts) in den Farben der Blog-Hinweiskästen */
.toastify.info { background: var(--lui-contrast) !important; color: #f2f1ed !important; border-left: 4px solid var(--lui-accent); }
.toastify.info .toast-close { color: #f2f1ed !important; }
.toastify.warning { background: #fff7ed !important; color: var(--lui-contrast) !important; border-left: 4px solid var(--lui-accent); }
.toastify.error { background: #dc2626 !important; }

/* Schriften überall nach CI: Formularelemente erben die Schrift sonst nicht */
@font-face { font-family: "JetBrains Mono"; src: url(/lui/jetbrains-mono-variable.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }
button, input, select, textarea, label, .btn, .form-control, .nav-link, .toastify, #users, .message, .message-content {
	font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}
.btn, .btn-blue, .btn-success, .btn-cancel, #submitbutton, .nav-text { font-family: var(--lui-heading) !important; }
.fas, .far, .fa { font-family: "Font Awesome 6 Free" !important; }

/* Einstellungsfenster: ruhigere Größen, Abschnittsüberschriften wie die Kästen im Blog */
.sidenav-content { font-size: 0.875rem; }
.sidenav-content label, .sidenav-label, .sidenav-label-first { font-size: 0.8rem; font-weight: 600; color: var(--lui-muted); }
.sidenav-content input[type="checkbox"] + label, .sidenav-content label.checkbox, .sidenav-content .form-check label { font-weight: 400; color: var(--lui-contrast); font-size: 0.875rem; }
.sidenav-content select, .sidenav-content .form-control { font-size: 0.875rem !important; text-align: left !important; text-align-last: left !important; padding: 0.3rem 0.5rem !important; }
legend {
	font-family: "JetBrains Mono", ui-monospace, monospace !important;
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--lui-accent-dark) !important;
}
.profile-info span:first-child { font-family: var(--lui-heading); font-weight: 700; font-size: 1rem; }
.sidenav-header h2 { font-size: 1.25rem; }
.header-title { font-size: 1rem; font-weight: 700; }
#users > div { font-size: 0.9rem; }

/* Kopfleiste: alles auf einer Mittellinie, ruhigere Größen */
.topnav, .users-header { height: 56px !important; }
.users-header { display: flex; align-items: center; padding: 0 14px !important; border-right: 1px solid #333; }
#left-sidebar .galene-header { line-height: 1; }
#header { display: flex; align-items: center; height: 56px; }
header .collapse { float: none; font-size: 17px; margin: 0 14px 0 14px; color: #a19e97; }
.header-title { float: none; font-size: 1.05rem !important; line-height: 1; }
.topnav .nav-menu { display: flex; align-items: center; height: 56px; padding-right: 6px; }
.nav-menu li { float: none; display: flex; align-items: center; max-height: none; }

/* Enable/Disable: so breit wie der Inhalt */
#presentbutton, #unpresentbutton {
	width: auto !important;
	display: inline-flex; align-items: center; gap: 8px;
	height: 34px; padding: 0 14px !important; margin: 0 12px 0 0 !important;
	font-size: 0.78rem !important; letter-spacing: 0.06em; line-height: 1;
}
#presentbutton .fas, #unpresentbutton .fas { font-size: 0.72rem; }
#presentbutton.invisible, #unpresentbutton.invisible { display: none !important; }
.btn-cancel { background-color: #dc2626 !important; border-color: #dc2626 !important; color: #fff !important; border-radius: 3px; text-transform: uppercase; font-family: var(--lui-heading); font-weight: 700; }

/* Symbol-Knöpfe mit Beschriftung */
.nav-link { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 46px; margin: 0 6px; color: #dbd9d9; line-height: 1; }
.nav-link.invisible { display: none !important; }
.nav-button { font-size: 18px !important; }
.nav-link label {
	font-family: "JetBrains Mono", ui-monospace, monospace !important;
	font-size: 0.6rem !important; font-weight: 600;
	text-transform: uppercase; letter-spacing: 0.05em;
	color: #a19e97 !important; white-space: nowrap; margin: 0;
}
.nav-link:hover, .nav-link:hover label { color: var(--lui-accent) !important; }
.nav-cancel, .muted, .nav-cancel label, .muted label { color: #f87171 !important; }
.nav-more { padding: 0 8px !important; font-size: 18px; }
@media only screen and (max-width: 1024px) {
	.nav-link label { display: none; }
	.nav-link { margin: 0 3px; }
}

/* Einstellungsfenster als Karten im Blog-Stil (überschreibt die Regeln weiter oben) */
.sidenav-header { height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 0 6px 0 16px; border-bottom: 1px solid #333; }
.sidenav-header h2 { font-size: 1.05rem !important; padding: 0 !important; line-height: 1 !important; max-width: none; }
.sidenav .closebtn { position: static; height: auto; padding: 8px 10px !important; font-size: 18px !important; color: #a19e97 !important; }
.sidenav .closebtn:hover { color: var(--lui-accent) !important; }
.sidenav-content { background: var(--lui-base-2) !important; padding: 14px !important; }

/* Profil */
.profile { width: auto; background: #fff; border: 1px solid var(--lui-line); border-radius: 6px; padding: 12px; }
.profile-user { display: flex; align-items: center; gap: 12px; }
.profile-user:after, .profile-user:before { content: none !important; }
.profile-logo { float: none; width: 40px; height: 40px; flex: none; padding: 0; display: flex; align-items: center; justify-content: center; font-size: 1.05em; }
.profile-info { float: none; margin: 0; width: auto; flex: 1; min-width: 0; }
.profile-info span { line-height: 1.35; }
.user-logout { float: none; }
.sidenav .user-logout a { font-size: 1em; padding: 0; line-height: 1; }
.logout-icon { font-size: 1.1em; margin-bottom: 3px; }
.logout-text { font-size: 0.62rem; font-family: "JetBrains Mono", ui-monospace, monospace; text-transform: uppercase; letter-spacing: 0.05em; }

/* Gruppen als weiße Karten, Überschrift innen statt im Rahmen */
fieldset { background: #fff; border: 1px solid var(--lui-line) !important; border-radius: 6px; padding: 12px 14px 10px !important; margin-top: 12px !important; }
legend { float: left; width: 100%; padding: 0 !important; margin: 0 0 10px; }
legend + * { clear: both; }
.sidenav-label-first, .sidenav-label { display: block; margin: 12px 0 4px !important; }
.sidenav-label-first { margin-top: 0 !important; }
.sidenav-content select { width: 100%; height: 32px; background: #fff; }
.sidenav form { margin-top: 8px !important; display: flex; align-items: center; gap: 8px; }
.sidenav form:first-of-type { margin-top: 12px !important; }
.sidenav form input[type="checkbox"] { margin: 0; width: 15px; height: 15px; flex: none; }
.sidenav form label { margin: 0 !important; font-weight: 400 !important; color: var(--lui-contrast) !important; font-size: 0.875rem !important; }

/* Wasserzeichen in der leeren Bildfläche; geteilte Bildschirme liegen darüber */
.coln-right {
	background-image: url(/lui/watermark.svg);
	background-repeat: no-repeat;
	background-position: center 46%;
	background-size: min(240px, 30%);
}

/* DE/EN-Umschalter im Kopf des Einstellungsfensters (dunkler Grund) */
.sidenav-header .lui-room-lang { position: static; margin-left: auto; margin-right: 6px; border-color: #444; }
.sidenav-header .lui-room-lang button { color: #a19e97; }
.sidenav-header .lui-room-lang button[aria-pressed="true"] { background: var(--lui-accent); color: #fff; }

/* Einstellungsfenster breiter (Galene öffnet es mit 250 px – zu schmal für Umschalter + Titel) */
#sidebarnav[style*="250px"] { width: 300px !important; max-width: 100vw; }
.sidenav-header h2 { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidenav-header .lui-room-lang { flex: none; }
/* Beschriftungen immer über den Auswahllisten, auch unter „Weitere Einstellungen“ */
.sidenav-content fieldset > label:not(.sidenav-label-first):not(.sidenav-label) { display: block; margin: 12px 0 4px; font-size: 0.8rem; font-weight: 600; color: var(--lui-muted); }
.sidenav-content fieldset > select { display: block; width: 100% !important; }
