/* ==========================================================================
   noxlime secrets (OTS, secrets.noxlime.com) – eigenes Design über app.css hinaus.
   Liegt mit den Schriften im overlayFSPath von OTS und wird per nginx-sub_filter
   als zusätzliches Stylesheet eingebunden (CSP: style-src/font-src 'self' – deshalb
   Schriften lokal statt von noxlime.com). Immer dunkel wie die Website;
   im customize.yaml zusätzlich disableThemeSwitcher: true setzen.
   ========================================================================== */

@font-face {
	font-family: "noxlime-inter";
	src: url("inter-v19-latin-regular.woff2") format("woff2");
	font-weight: 400;
	font-display: swap;
}
@font-face {
	font-family: "noxlime-inter";
	src: url("inter-v19-latin-500.woff2") format("woff2");
	font-weight: 500;
	font-display: swap;
}
@font-face {
	font-family: "noxlime-satoshi";
	src: url("Satoshi-Bold.woff2") format("woff2");
	font-weight: 700;
	font-display: swap;
}

/* Hell- und Dunkelmodus bekommen dieselben Werte (html[data-bs-theme] schlägt [data-bs-theme=…]). */
html[data-bs-theme] {
	color-scheme: dark;
	--nx-accent: #84cc16;
	--nx-accent-ink: #1e1f23;
	--nx-fg: #fffefe;
	--nx-muted: #d9dce1;
	--nx-line: rgba(255, 255, 255, 0.1);
	--nx-line-strong: rgba(255, 255, 255, 0.22);
	--nx-surface: rgba(255, 255, 255, 0.03);
	--nx-surface-hover: rgba(255, 255, 255, 0.06);
	--nx-heading: "noxlime-satoshi", "noxlime-inter", system-ui, sans-serif;

	--bs-body-font-family: "noxlime-inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--bs-body-bg: #1e1f23;
	--bs-body-bg-rgb: 30, 31, 35;
	--bs-body-color: #fffefe;
	--bs-body-color-rgb: 255, 254, 254;
	--bs-emphasis-color: #fffefe;
	--bs-secondary-color: #d9dce1;
	--bs-tertiary-color: rgba(217, 220, 225, 0.7);
	--bs-secondary-bg: #2a2b2f;
	--bs-tertiary-bg: #26272b;
	--bs-border-color: rgba(255, 255, 255, 0.1);
	--bs-border-color-translucent: rgba(255, 255, 255, 0.1);
	--bs-heading-color: #fffefe;
	--bs-link-color: #fffefe;
	--bs-link-color-rgb: 255, 254, 254;
	--bs-link-hover-color: #84cc16;
	--bs-link-hover-color-rgb: 132, 204, 22;
	--bs-primary-bg-subtle: transparent;
	--bs-primary-border-subtle: rgba(255, 255, 255, 0.1);
	--bs-primary-text-emphasis: #fffefe;
	/* Hinweise: Ampel wie im Website-Check (Erfolg = Lime, Warnung = gedämpftes Gelb, Fehler = gedämpftes Rot) */
	--bs-success-text-emphasis: #84cc16;
	--bs-success-bg-subtle: rgba(132, 204, 22, 0.08);
	--bs-success-border-subtle: rgba(132, 204, 22, 0.35);
	--bs-info-text-emphasis: #fffefe;
	--bs-info-bg-subtle: rgba(255, 255, 255, 0.04);
	--bs-info-border-subtle: rgba(255, 255, 255, 0.14);
	--bs-warning-text-emphasis: #e8b84a;
	--bs-warning-bg-subtle: rgba(232, 184, 74, 0.08);
	--bs-warning-border-subtle: rgba(232, 184, 74, 0.35);
	--bs-danger-text-emphasis: #ef7a72;
	--bs-danger-bg-subtle: rgba(239, 122, 114, 0.08);
	--bs-danger-border-subtle: rgba(239, 122, 114, 0.35);
}

html[data-bs-theme] ::selection {
	background: rgba(132, 204, 22, 0.35);
	color: #fffefe;
}

html[data-bs-theme] body {
	min-height: 100vh;
	background: #141518 linear-gradient(180deg, #1e1f23 0%, #141518 100%) no-repeat;
	letter-spacing: 0.25px;
	-webkit-font-smoothing: antialiased;
}

/* ---- Kopfzeile ---- */
html[data-bs-theme] .navbar {
	--bs-navbar-color: #d9dce1;
	--bs-navbar-hover-color: #fffefe;
	--bs-navbar-active-color: #fffefe;
	--bs-navbar-brand-color: #fffefe;
	--bs-navbar-brand-hover-color: #fffefe;
	--bs-navbar-toggler-border-color: rgba(255, 255, 255, 0.14);
	--bs-navbar-toggler-border-radius: 10px;
	--bs-navbar-toggler-focus-width: 0;
	padding: 14px 8px;
	border-bottom: 1px solid var(--nx-line);
	background-color: transparent;
}
html[data-bs-theme] .navbar.bg-primary-subtle {
	background-color: transparent;
}
html[data-bs-theme] .navbar-brand {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-family: var(--nx-heading);
	font-size: 24px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.02em;
}
html[data-bs-theme] .navbar-brand img {
	height: 30px;
}
html[data-bs-theme] .navbar .nav-link {
	font-size: 15px;
	font-weight: 500;
	transition: color 0.2s ease;
}
html[data-bs-theme] .navbar .nav-link .fas {
	margin-right: 4px;
	color: var(--nx-accent);
	font-size: 0.85em;
}
html[data-bs-theme] .navbar-toggler:focus-visible {
	outline: 2px solid var(--nx-accent);
	outline-offset: 2px;
}

/* ---- Inhalt ---- */
html[data-bs-theme] .container.mt-4 {
	max-width: 720px;
	margin-top: 64px;
}

html[data-bs-theme] .card {
	--bs-card-bg: #1f2024;
	--bs-card-border-color: var(--nx-line);
	--bs-card-border-radius: 30px;
	--bs-card-inner-border-radius: 29px;
	--bs-card-cap-bg: transparent;
	--bs-card-cap-color: #fffefe;
	--bs-card-cap-padding-y: 22px;
	--bs-card-cap-padding-x: 36px;
	--bs-card-spacer-y: 28px;
	--bs-card-spacer-x: 36px;
	overflow: hidden;
}
/* OTS färbt Karten je Zustand (z. B. grün bei „Secret erstellt!“); hier bleibt jede Karte gleich */
/* Die Bootstrap-Hilfsklassen setzen Farbe mit !important, daher hier über ihre Variablen */
html[data-bs-theme] .card[class*="border-"] {
	--bs-primary-border-subtle: rgba(255, 255, 255, 0.1);
	--bs-success-border-subtle: rgba(255, 255, 255, 0.1);
	--bs-danger-border-subtle: rgba(255, 255, 255, 0.1);
	--bs-warning-border-subtle: rgba(255, 255, 255, 0.1);
	--bs-info-border-subtle: rgba(255, 255, 255, 0.1);
}
html[data-bs-theme] .card-header[class*="bg-"] {
	--bs-primary-bg-subtle: transparent;
	--bs-success-bg-subtle: transparent;
	--bs-danger-bg-subtle: transparent;
	--bs-warning-bg-subtle: transparent;
	--bs-info-bg-subtle: transparent;
}
html[data-bs-theme] .card-header,
html[data-bs-theme] .card-header[class*="bg-"] {
	background-color: transparent;
	font-size: 1.2rem;
	font-weight: 500;
	text-align: center;
}
/* Fortschrittsbalken-Optik der Formulare: 5px Lime oben an der Karte */
html[data-bs-theme] .card::before {
	content: "";
	display: block;
	height: 5px;
	background: var(--nx-accent);
}

html[data-bs-theme] label,
html[data-bs-theme] .form-label {
	margin-bottom: 8px;
	font-weight: 500;
}

html[data-bs-theme] .form-control,
html[data-bs-theme] .form-select {
	border-color: var(--nx-line);
	border-radius: 10px;
	background-color: var(--nx-surface);
	color: var(--nx-fg);
	transition: border-color 0.2s ease, background-color 0.2s ease;
}
html[data-bs-theme] .form-control:hover:not(:focus):not([readonly]),
html[data-bs-theme] .form-select:hover:not(:focus) {
	border-color: var(--nx-line-strong);
}
html[data-bs-theme] .form-control:focus,
html[data-bs-theme] .form-select:focus {
	border-color: var(--nx-accent);
	background-color: var(--nx-surface);
	color: var(--nx-fg);
	box-shadow: none;
}
html[data-bs-theme] .form-control[readonly] {
	background-color: var(--nx-surface);
}
html[data-bs-theme] .form-text {
	color: var(--nx-muted);
}

/* ---- Buttons: Hauptaktion = Lime-Pille, sonst neutrale Pille ---- */
html[data-bs-theme] .btn {
	--bs-btn-padding-y: 10px;
	--bs-btn-padding-x: 20px;
	--bs-btn-font-weight: 500;
	--bs-btn-border-radius: 100px;
	--bs-btn-focus-box-shadow: none;
	letter-spacing: 0.25px;
}
html[data-bs-theme] .btn:focus-visible {
	outline: 2px solid var(--nx-accent);
	outline-offset: 2px;
}
html[data-bs-theme] .btn-success,
html[data-bs-theme] .btn-primary {
	--bs-btn-color: #1e1f23;
	--bs-btn-bg: #84cc16;
	--bs-btn-border-color: #84cc16;
	--bs-btn-hover-color: #1e1f23;
	--bs-btn-hover-bg: #84cc16;
	--bs-btn-hover-border-color: #84cc16;
	--bs-btn-active-color: #1e1f23;
	--bs-btn-active-bg: #84cc16;
	--bs-btn-active-border-color: #84cc16;
	--bs-btn-disabled-color: #1e1f23;
	--bs-btn-disabled-bg: #84cc16;
	--bs-btn-disabled-border-color: #84cc16;
	--bs-btn-disabled-opacity: 0.35;
}
html[data-bs-theme] .btn-success:hover,
html[data-bs-theme] .btn-primary:hover {
	filter: brightness(1.06);
}
html[data-bs-theme] .btn-secondary,
html[data-bs-theme] .btn-outline-secondary,
html[data-bs-theme] .btn-outline-primary,
html[data-bs-theme] .btn-info {
	--bs-btn-color: #fffefe;
	--bs-btn-bg: rgba(255, 255, 255, 0.03);
	--bs-btn-border-color: rgba(255, 255, 255, 0.14);
	--bs-btn-hover-color: #fffefe;
	--bs-btn-hover-bg: rgba(255, 255, 255, 0.06);
	--bs-btn-hover-border-color: rgba(255, 255, 255, 0.22);
	--bs-btn-active-color: #fffefe;
	--bs-btn-active-bg: rgba(255, 255, 255, 0.1);
	--bs-btn-active-border-color: rgba(255, 255, 255, 0.22);
	--bs-btn-disabled-color: #d9dce1;
	--bs-btn-disabled-bg: transparent;
	--bs-btn-disabled-border-color: rgba(255, 255, 255, 0.1);
}
html[data-bs-theme] .btn-danger {
	--bs-btn-color: #1e1f23;
	--bs-btn-bg: #ef7a72;
	--bs-btn-border-color: #ef7a72;
	--bs-btn-hover-color: #1e1f23;
	--bs-btn-hover-bg: #ef7a72;
	--bs-btn-hover-border-color: #ef7a72;
}
/* Knöpfe direkt am Eingabefeld (Kopieren, QR, Löschen) und gestapelte Knöpfe: Radius wie Felder */
html[data-bs-theme] .input-group > .btn,
html[data-bs-theme] .btn-group-vertical > .btn {
	--bs-btn-border-radius: 10px;
	--bs-btn-padding-x: 14px;
}

/* ---- Hinweise ---- */
html[data-bs-theme] .alert {
	--bs-alert-border-radius: 15px;
	--bs-alert-padding-x: 18px;
	--bs-alert-padding-y: 14px;
	font-size: 15px;
	line-height: 1.55;
}

/* ---- „Wie funktioniert das?“ und Listen ---- */
html[data-bs-theme] .list-group {
	--bs-list-group-bg: transparent;
	--bs-list-group-border-color: var(--nx-line);
	--bs-list-group-color: var(--nx-muted);
}
html[data-bs-theme] h1,
html[data-bs-theme] h2,
html[data-bs-theme] h3,
html[data-bs-theme] h4 {
	font-family: var(--nx-heading);
	font-weight: 700;
	letter-spacing: -0.01em;
}
html[data-bs-theme] a:not(.btn):not(.nav-link):not(.navbar-brand) {
	text-decoration: underline;
	text-decoration-color: rgba(255, 255, 255, 0.3);
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
}
html[data-bs-theme] a:not(.btn):not(.nav-link):not(.navbar-brand):hover {
	text-decoration-color: var(--nx-accent);
}

@media (max-width: 767px) {
	html[data-bs-theme] .navbar-brand { font-size: 21px; }
	html[data-bs-theme] .navbar-brand img { height: 26px; }
	html[data-bs-theme] .container.mt-4 { margin-top: 32px; padding-right: 20px; padding-left: 20px; }
	html[data-bs-theme] .card {
		--bs-card-cap-padding-x: 20px;
		--bs-card-spacer-x: 20px;
		--bs-card-spacer-y: 24px;
	}
	html[data-bs-theme] .card-header { font-size: 1.1rem; }
}

@media (hover: none) {
	html[data-bs-theme] .form-control:hover:not(:focus):not([readonly]) { border-color: var(--nx-line); }
}

@media (prefers-reduced-motion: reduce) {
	html[data-bs-theme] .navbar .nav-link,
	html[data-bs-theme] .form-control,
	html[data-bs-theme] .form-select { transition: none; }
}
