/* ──────────────────────────────────────────────────────────────
   EQui-T Chatbot — base shell, header, sidebar, footer
   Mirrors equi-t-academy.eu: monochrome, Nunito Sans,
   sharp corners (0 radius), no shadows.
   ────────────────────────────────────────────────────────────── */

:root {
  --font-sans:   "Nunito Sans", Verdana, Helvetica, Arial, sans-serif;
  --font-bold:   "Nunito Sans", Verdana, Helvetica, Arial, sans-serif;
  --font-xbold:  "Nunito Sans", Verdana, Helvetica, Arial, sans-serif;

  --weight-regular:  400;
  --weight-bold:     700;
  --weight-xbold:    800;

  --color-bg:           #ffffff;
  --color-bg-dark:      #000000;
  --color-text:         #000000;
  --color-text-on-dark: #ffffff;
  --color-near-black:   rgb(20, 20, 19);
  --color-light-gray:   #efefef;
  --color-off-white:    rgb(250, 249, 245);
  --color-field-bg:     rgb(234, 234, 234);
  --color-rule:         #000000;

  --radius: 0;

  --page-max: 1280px;
  --sidebar-w: 320px;
}

/* ── Font scale: set on html so rem units cascade everywhere ── */
html                    { font-size: 16px; }
html[data-font="small"] { font-size: 13px; }
html[data-font="large"] { font-size: 20px; }

/* ── Contrast theme overrides ── */
html[data-contrast="high-bw"] {
  --color-bg:           #000000;
  --color-text:         #ffffff;
  --color-bg-dark:      #ffffff;
  --color-text-on-dark: #000000;
  --color-near-black:   #eeeeee;
  --color-light-gray:   #222222;
  --color-off-white:    #111111;
  --color-field-bg:     #333333;
  --color-rule:         #ffffff;
}

html[data-contrast="yellow-black"] {
  --color-bg:           #000000;
  --color-text:         #ffff00;
  --color-bg-dark:      #ffff00;
  --color-text-on-dark: #000000;
  --color-near-black:   #cccc00;
  --color-light-gray:   #333300;
  --color-off-white:    #111100;
  --color-field-bg:     #222200;
  --color-rule:         #ffff00;
}

html[data-contrast="black-yellow"] {
  --color-bg:           #ffff00;
  --color-text:         #000000;
  --color-bg-dark:      #000000;
  --color-text-on-dark: #ffff00;
  --color-near-black:   #333300;
  --color-light-gray:   #eeee00;
  --color-off-white:    #ffffe0;
  --color-field-bg:     #dddd00;
  --color-rule:         #000000;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: var(--font-sans);
  font-weight: var(--weight-regular);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─────────── Site header ─────────── */
.site-header {
  width: 100%;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-rule);
  flex-shrink: 0;
}

.site-header-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 10px 32px;
  display: flex;
  align-items: center;
  gap: 20px;
}

/* ── Brand blocks: publisher (left) + project (right) ──
   Each is an <a> with a small eyebrow label above a white logo box.
   The eyebrow uses the themed --color-text so contrast modes follow.
   The logo box is always white because the SVGs are designed on white. */
.brand-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  flex-shrink: 0;
  text-decoration: none;
  color: var(--color-text);
  transition: opacity 0.12s;
}
.brand-block:hover { opacity: 0.75; }
.brand-block:focus-visible {
  outline: 2px solid var(--color-rule);
  outline-offset: 3px;
}

.brand-block--project { align-items: flex-end; }

.brand-eyebrow {
  font-family: var(--font-xbold);
  font-weight: var(--weight-xbold);
  font-size: 0.625rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text);
  line-height: 1;
  white-space: nowrap;
}

/* Legacy alias still used in markup elsewhere */
.header-logo-link {
  display: block;
  flex-shrink: 0;
  text-decoration: none;
}

/* White bg wrapper — stays white regardless of contrast theme so the
   colourful EQui-T mark and the Wohlhart wordmark remain legible. */
.header-logo-bg {
  background: #ffffff;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* Wohlhart is the publisher → primary brand, slightly larger */
.header-logo-wohlhart { height: 36px; width: auto; display: block; }
/* EQui-T project mark */
.header-logo-equit    { height: 40px; width: auto; display: block; }

/* Center title */
.header-center {
  flex: 1;
  min-width: 0;
}

.site-title {
  font-family: var(--font-xbold);
  font-weight: var(--weight-xbold);
  font-size: 1.15rem;
  line-height: 1.3;
  color: var(--color-text);
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Right cluster: a11y controls + wohlhart logo */
.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

/* ── Accessibility controls wrapper ── */
.a11y-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  align-self: center;
}

/* ── Shared picker styles (font + contrast + language) ── */
.a11y-picker,
.lang-picker {
  position: relative;
}

.a11y-btn,
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-bg);
  border: 1px solid var(--color-text);
  padding: 7px 12px;
  cursor: pointer;
  font-family: var(--font-sans);
  font-weight: var(--weight-regular);
  font-size: 0.875rem;
  line-height: 1;
  color: var(--color-text);
  white-space: nowrap;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.lang-btn { min-width: 110px; }
.a11y-btn:hover,
.lang-btn:hover {
  background: var(--color-bg-dark);
  color: var(--color-text-on-dark);
  border-color: var(--color-bg-dark);
}
.a11y-btn svg,
.lang-btn svg { stroke: currentColor; transition: stroke 0.12s; }

/* Dropdown popup — always dark for maximum legibility */
.a11y-dropdown,
.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: #000;
  border: 1px solid #000;
  list-style: none;
  z-index: 100;
}
.a11y-dropdown.open,
.lang-dropdown.open { display: block; }

/* Language dropdown — vertical list */
.lang-dropdown { min-width: 130px; }

.a11y-option,
.lang-option {
  padding: 10px 16px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: #fff;
  cursor: pointer;
  transition: background 0.1s;
}
.a11y-option:hover,
.a11y-option.active,
.lang-option:hover,
.lang-option.active { background: #333; }

/* ── Font size dropdown — horizontal row ── */
.font-dropdown {
  display: none;
  flex-direction: row;
  min-width: 0;
  white-space: nowrap;
  left: 0;
  right: auto;
}
.font-dropdown.open { display: flex; }

.font-dropdown .a11y-option {
  padding: 12px 16px;
  font-weight: var(--weight-bold);
  display: flex;
  align-items: baseline;
  gap: 1px;
}
.font-dropdown .a11y-option:nth-child(1) { font-size: 0.6875rem; }
.font-dropdown .a11y-option:nth-child(2) { font-size: 0.875rem; }
.font-dropdown .a11y-option:nth-child(3) { font-size: 1.125rem; }

/* ── Contrast dropdown — horizontal row of swatches ── */
.contrast-dropdown {
  display: none;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  padding: 8px;
  min-width: 0;
  left: 0;
  right: auto;
}
.contrast-dropdown.open { display: flex; }

.contrast-dropdown .a11y-option {
  padding: 3px;
  line-height: 0;
  border: 2px solid transparent;
}
.contrast-dropdown .a11y-option:hover,
.contrast-dropdown .a11y-option.active {
  background: #444;
  border-color: #aaa;
}

/* Contrast swatches */
.swatch {
  display: block;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.sw-default      { background: linear-gradient(135deg, #ffffff 50%, #000000 50%); }
.sw-black-yellow { background: linear-gradient(135deg, #ffff00 50%, #000000 50%); }
.sw-yellow-black { background: linear-gradient(135deg, #000000 50%, #ffff00 50%); }
.sw-high-bw      { background: linear-gradient(135deg, #000000 50%, #ffffff 50%); }

/* ── Font Aa icon ── */
.font-aa-icon {
  font-family: var(--font-xbold);
  font-weight: var(--weight-xbold);
  font-size: 0.875rem;
  line-height: 1;
  letter-spacing: -0.02em;
}
.font-aa-icon span {
  font-size: 0.6875rem;
  vertical-align: -1px;
}

/* ─────────── Main: sidebar + chat ─────────── */
.site-main {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  flex: 1;
  display: flex;
  align-items: stretch;
  background: var(--color-bg);
}

/* Info sidebar (left) */
.info-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  border-right: 1px solid var(--color-rule);
  padding: 28px 28px 36px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  background: var(--color-bg);
}

.info-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--color-rule);
}
.info-eyebrow {
  font-family: var(--font-xbold);
  font-weight: var(--weight-xbold);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text);
}

.info-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.info-body p {
  font-family: var(--font-sans);
  font-weight: var(--weight-regular);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-text);
}
.info-body strong {
  font-family: var(--font-bold);
  font-weight: var(--weight-bold);
}

/* Back link — solid dark bar with light text + arrow */
.info-back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--color-bg-dark);
  color: var(--color-text-on-dark);
  text-decoration: none;
  padding: 14px 16px;
  font-family: var(--font-sans);
  font-weight: var(--weight-regular);
  font-size: 0.9375rem;
  border: 1px solid var(--color-rule);
  transition: background 0.12s, color 0.12s;
}
.info-back-link:hover {
  background: var(--color-bg);
  color: var(--color-text);
}
.info-back-arrow {
  font-family: var(--font-xbold);
  font-weight: var(--weight-xbold);
  font-size: 1.125rem;
  line-height: 1;
  transition: transform 0.15s;
}
.info-back-link:hover .info-back-arrow { transform: translateX(-3px); }

.info-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px 0;
  padding-top: 18px;
  border-top: 1px solid var(--color-rule);
  font-size: 0.875rem;
}
.info-meta-label {
  font-family: var(--font-xbold);
  font-weight: var(--weight-xbold);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-text);
  margin-top: 8px;
}
.info-meta-label:first-child { margin-top: 0; }
.info-meta-value {
  font-family: var(--font-sans);
  font-weight: var(--weight-regular);
  font-size: 0.875rem;
  line-height: 1.43;
  color: var(--color-text);
}

/* ─────────── Footer ─────────── */
.site-footer {
  width: 100%;
  background: var(--color-bg);
  color: var(--color-text);
  border-top: 1px solid var(--color-rule);
  flex-shrink: 0;
}

.footer-inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 22px 48px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.footer-disclaimer {
  flex: 1;
  font-family: var(--font-sans);
  font-weight: var(--weight-regular);
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--color-text);
  min-height: calc(3 * 0.75rem * 1.5);
}

.footer-eu-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}
.footer-eu-badge .eu-flag {
  display: block;
  border: 0;
  border-radius: 0;
}
.footer-eu-label {
  font-family: var(--font-bold);
  font-weight: var(--weight-bold);
  font-size: 0.75rem;
  line-height: 1.33;
  color: #003399;
}

.footer-legal {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 12px 48px 18px;
  border-top: 1px solid var(--color-rule);
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--color-text);
  flex-wrap: wrap;
}
.footer-legal a {
  color: var(--color-text);
  text-decoration: none;
}
.footer-legal a:hover { text-decoration: underline; }
.footer-legal .footer-dot { opacity: 0.5; }

/* ─────────── Responsive ─────────── */
@media (max-width: 980px) {
  .site-header-inner { padding: 8px 20px; gap: 12px; }
  .header-logo-equit  { height: 32px; }
  .header-logo-wohlhart { height: 28px; }
  .brand-eyebrow { font-size: 0.5625rem; letter-spacing: 0.14em; }

  .site-main { flex-direction: column; }
  .info-sidebar {
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid var(--color-rule);
    padding: 22px 24px;
  }

  .footer-inner { flex-direction: column; align-items: flex-start; gap: 16px; padding: 20px 24px; }
  .footer-legal { padding: 12px 24px 16px; }
}

@media (max-width: 700px) {
  .header-center { display: none; }
  .site-header-inner { gap: 10px; }
  .a11y-controls { flex-wrap: wrap; }
  /* Drop the eyebrow labels on small screens — the alt text + link target
     still tell screen readers which site they're on. */
  .brand-eyebrow { display: none; }
}

@media (max-width: 480px) {
  .site-header-inner { padding: 8px 12px; gap: 8px; }
  .header-logo-equit  { height: 26px; }
  .header-logo-wohlhart { height: 22px; }
  .header-logo-bg { padding: 4px 6px; }
}

