/* Hanseranking · Design „Tiefe“ für LibreChat (KI OS).
   Regeln: _doku/design-neu/GUIDELINE.md. LibreChat bleibt unverändert; diese Datei wird beim Bau des
   Abbilds an die index.html gehängt (Dockerfile.api). LibreChat setzt seine Farben als RGB-Tripel in
   Variablen am <html>-Element (theme-boot.json), teils inline – deshalb !important.
   Nach jedem LibreChat-Update im Browser prüfen: hell, dunkel, 390 px. */

@font-face {
  font-family: "HR Montserrat";
  src: url("/assets/hr/montserrat-vf.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Schrift: überall Montserrat, außer Code und Formeln. */
html, body, button, input, textarea, select, [role="dialog"], [role="menu"] {
  font-family: "HR Montserrat", system-ui, sans-serif !important;
  font-feature-settings: "tnum" 1, "lnum" 1;
}
pre, code, kbd, samp, .katex, .katex * {
  font-family: revert !important;
}

/* Hell */
html:root:not(.dark) {
  --surface-submit: 0 130 185 !important;
  --surface-submit-hover: 0 110 158 !important;
  --button-primary: 0 130 185 !important;
  --button-primary-hover: 0 110 158 !important;
  --accent-primary: 0 130 185 !important;
  --accent-primary-hover: 0 110 158 !important;
  --link: 0 110 158 !important;
  --link-hover: 0 86 125 !important;
  --link-prose: 0 110 158 !important;
  --ring-primary: 0 130 185 !important;
  --focus-outline: 0 130 185 !important;
  --border-field-focus: 0 130 185 !important;
  --surface-canvas: 238 242 245 !important;
  --text-primary: 10 28 39 !important;
  --text-secondary: 77 95 107 !important;
}

/* Dunkel */
html.dark {
  --surface-submit: 0 130 185 !important;
  --surface-submit-hover: 24 160 218 !important;
  --button-primary: 0 130 185 !important;
  --button-primary-hover: 24 160 218 !important;
  --accent-primary: 73 190 238 !important;
  --accent-primary-hover: 120 208 243 !important;
  --link: 73 190 238 !important;
  --link-hover: 120 208 243 !important;
  --link-prose: 73 190 238 !important;
  --ring-primary: 73 190 238 !important;
  --focus-outline: 73 190 238 !important;
  --border-field-focus: 73 190 238 !important;
  --surface-canvas: 4 11 16 !important;
  --text-primary: 234 241 245 !important;
  --text-secondary: 148 169 182 !important;
}

/* Blauer Himmel auf der leeren Startseite (neuer Chat), nur oben, damit Lesbarkeit bleibt. */
html.hr-start main {
  background-image: linear-gradient(180deg, rgba(0, 130, 185, .20) 0%, rgba(0, 130, 185, .06) 260px, transparent 520px) !important;
}
html.dark.hr-start main {
  background-image: linear-gradient(180deg, rgba(7, 40, 56, .95) 0%, rgba(4, 11, 16, 0) 520px) !important;
}

/* Hanseranking-Zeichen über der Begrüßung (Skript setzt nur die Klasse). */
.hr-begruessung { flex-wrap: wrap !important; justify-content: center; }
.hr-begruessung::before {
  content: "";
  display: block;
  flex: 0 0 100%;
  height: 66px;
  margin-bottom: 18px;
  background: url("/assets/hr/logo.svg") center / contain no-repeat;
}
html.dark .hr-begruessung::before { background-image: url("/assets/hr/logo-dunkel.svg"); }

/* Fester Link zur Verwaltung, nur für ADMIN (vom Skript eingesetzt). */
.hr-verwaltung {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 4px auto;
  border-radius: 12px;
  color: rgb(0 130 185);
  background: rgba(0, 130, 185, .12);
  transition: background-color .15s ease, translate .15s ease;
}
.hr-verwaltung:hover { background: rgba(0, 130, 185, .22); translate: 0 -1px; }
.hr-verwaltung:focus-visible { outline: 2px solid rgb(0 130 185); outline-offset: 2px; }
html.dark .hr-verwaltung { color: rgb(73 190 238); background: rgba(73, 190, 238, .14); }
.hr-verwaltung svg { width: 20px; height: 20px; }
.hr-verwaltung-frei {
  position: fixed;
  left: 12px;
  bottom: 72px;
  z-index: 40;
  box-shadow: 0 6px 12px -6px rgba(8, 34, 52, .32);
}

/* Ausgeblendete LibreChat-Bereiche (vom Skript markiert). */
.hr-aus { display: none !important; }

/* Eigenes Wochenbudget (vom Skript eingesetzt), unten rechts, klein. Orange nur, wenn es knapp wird. */
.hr-budget {
  position: fixed;
  right: 14px;
  bottom: 6px;
  z-index: 30;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: rgb(0 110 158);
  background: rgba(0, 130, 185, .1);
  pointer-events: none;
}
html.dark .hr-budget { color: rgb(73 190 238); background: rgba(73, 190, 238, .12); }
.hr-budget-knapp, html.dark .hr-budget-knapp { color: #2b1b00; background: #f6aa42; }
/* Am Handy liegt unten das Eingabefeld: dort oben unter der Kopfleiste. */
@media (max-width: 600px) { .hr-budget { right: auto; bottom: auto; left: 50%; top: 66px; translate: -50% 0; white-space: nowrap; font-size: 11px; } }

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