:root {
  --gfr-green: #52a230;
  --gfr-dark: #0b1b12;
  --gfr-bg: #f6f8f7;

  --chat--color-primary: var(--gfr-green);
  --chat--color-primary-shade-50: var(--gfr-green);
  --chat--color-primary-shade-100: var(--gfr-green);

  --chat--color--primary: var(--gfr-green);
  --chat--color--primary-shade-50: var(--gfr-green);
  --chat--color--primary-shade-100: var(--gfr-green);

  --chat--message--user--background: var(--gfr-green);
  --chat--message--user--color: #ffffff;

  --chat--color-light: #ffffff;
  --chat--color-dark: var(--gfr-dark);
  --chat--border-radius: 14px;
  --chat--spacing: 1rem;
  --chat--window--width: 100%;
  --chat--window--height: 100%;

  --chat--header--background: var(--gfr-green);
  --chat--header--color: #ffffff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
  background: var(--gfr-bg);
  color: #0f172a;
}

.topbar {
  background: #ffffff;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  min-width: 240px;
  height: 48px;
  overflow: visible;
}

.brand-logo {
  height: 48px;
  width: auto;
  display: block;
  object-fit: contain;
  transform: scale(1.15);
  transform-origin: left center;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.privacy-link {
  font-size: 13px;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.85);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.15);
  background: #ffffff;
  transition: background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
  cursor: pointer;
}

.privacy-link:hover {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.25);
}

.mobile-info-btn {
  display: none;
  appearance: none;
  -webkit-appearance: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(82, 162, 48, 0.25);
  background: rgba(82, 162, 48, 0.08);
  color: rgba(15, 23, 42, 0.85);
  padding: 8px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
}

.badge i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--gfr-green);
  display: inline-block;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 22px 18px 28px;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 980px) {
  .grid {
    grid-template-columns: 420px 1fr;
    gap: 18px;
  }
}

.card {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(2, 6, 23, 0.06);
  padding: 18px;
}

.headline {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 850;
  letter-spacing: 0.2px;
  color: rgba(15, 23, 42, 0.92);
}

.text {
  margin: 0 0 12px;
  color: rgba(15, 23, 42, 0.72);
  line-height: 1.5;
  font-size: 14px;
}

.divider {
  height: 1px;
  background: rgba(15, 23, 42, 0.08);
  margin: 14px 0;
}

.chat-wrap {
  padding: 0;
  overflow: hidden;
  border-radius: 18px;
}

#n8n-chat {
  height: 72vh;
  min-height: 520px;
  width: 100%;
  display: none;
  background: #ffffff;

  --chat--color-primary: var(--gfr-green);
  --chat--color-primary-shade-50: var(--gfr-green);
  --chat--color-primary-shade-100: var(--gfr-green);

  --chat--color--primary: var(--gfr-green);
  --chat--color--primary-shade-50: var(--gfr-green);
  --chat--color--primary-shade-100: var(--gfr-green);

  --chat--message--user--background: var(--gfr-green);
  --chat--message--user--color: #ffffff;
}

.card.info {
  display: flex;
  flex-direction: column;
  min-height: 520px;
}

.info-top {
  flex: 1 1 auto;
}

.gate-wrap {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  border-radius: 14px;
  background: rgba(2, 6, 23, 0.02);
}

.gate-title {
  font-size: 14px;
  font-weight: 800;
  margin: 0 0 8px;
  color: rgba(15, 23, 42, 0.88);
}

.gate-hint {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(15, 23, 42, 0.70);
}

.gate-error {
  margin: 10px 0 0;
  font-size: 13px;
  color: #991b1b;
  display: none;
}

.foot {
  margin-top: 14px;
  font-size: 12px;
  color: rgba(15, 23, 42, 0.55);
  line-height: 1.45;
}

.page-title {
  margin: 0 0 8px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0.2px;
  color: rgba(15, 23, 42, 0.92);
}

.link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #ffffff;
  color: rgba(15, 23, 42, 0.9);
  text-decoration: none;
  font-weight: 800;
  font-size: 14px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.link-btn:hover {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.22);
}

.link-btn.primary {
  background: var(--gfr-green);
  border-color: var(--gfr-green);
  color: #ffffff;
}

.link-btn.primary:hover {
  background: rgba(82, 162, 48, 0.92);
  border-color: rgba(82, 162, 48, 0.92);
}

.small-note {
  margin: 10px 0 0;
  font-size: 12px;
  color: rgba(15, 23, 42, 0.6);
  line-height: 1.5;
}

/* ➡️ Neuer grüner Kopfbereich für Impressum / Datenschutz */
.legal-header {
  background: var(--gfr-green);
  color: #ffffff;
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 0.2px;
  padding: 10px 18px;
  border-radius: 16px 16px 0 0;
  margin: -18px -18px 14px -18px;
}

.ds-title {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: 900;
  color: rgba(15, 23, 42, 0.9);
}

.ds-h {
  margin: 12px 0 6px;
  font-size: 14px;
  font-weight: 900;
  color: rgba(15, 23, 42, 0.9);
}

.ds-list {
  margin: 0 0 12px 18px;
  padding: 0;
  color: rgba(15, 23, 42, 0.72);
  font-size: 14px;
  line-height: 1.5;
}

#n8n-chat button[type="submit"],
#n8n-chat .chat-input-send-button,
#n8n-chat .n8n-chat__send-button,
#n8n-chat .chat-input__send-button {
  background: #ffffff !important;
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
  border-radius: 14px !important;
  color: var(--gfr-green) !important;
}

#n8n-chat button[type="submit"]:hover,
#n8n-chat .chat-input-send-button:hover,
#n8n-chat .n8n-chat__send-button:hover,
#n8n-chat .chat-input__send-button:hover {
  background: rgba(82, 162, 48, 0.08) !important;
  border-color: rgba(82, 162, 48, 0.35) !important;
  color: var(--gfr-green) !important;
}

#n8n-chat button[type="submit"] svg,
#n8n-chat .chat-input-send-button svg,
#n8n-chat .n8n-chat__send-button svg,
#n8n-chat .chat-input__send-button svg {
  fill: var(--gfr-green) !important;
  stroke: var(--gfr-green) !important;
  color: var(--gfr-green) !important;
}

#n8n-chat button[type="submit"] svg path,
#n8n-chat .chat-input-send-button svg path,
#n8n-chat .n8n-chat__send-button svg path,
#n8n-chat .chat-input__send-button svg path {
  fill: var(--gfr-green) !important;
  stroke: var(--gfr-green) !important;
}

#n8n-chat button[type="submit"]:disabled,
#n8n-chat .chat-input-send-button:disabled,
#n8n-chat .n8n-chat__send-button:disabled,
#n8n-chat .chat-input__send-button:disabled {
  opacity: 0.45 !important;
}

#n8n-chat .chat-header h1,
#n8n-chat .n8n-chat__header h1,
#n8n-chat .chat-header .title,
#n8n-chat .n8n-chat__header .title,
#n8n-chat [class*="chatHeader"] h1,
#n8n-chat [class*="chatHeader"] [class*="title"] {
  white-space: nowrap !important;
  max-width: none !important;
}

#n8n-chat .chat-header p,
#n8n-chat .n8n-chat__header p,
#n8n-chat .chat-header .subtitle,
#n8n-chat .n8n-chat__header .subtitle,
#n8n-chat [class*="chatHeader"] p,
#n8n-chat [class*="chatHeader"] [class*="subtitle"] {
  white-space: nowrap;
}

@media (max-width: 720px) {
  #n8n-chat .chat-header h1,
  #n8n-chat .n8n-chat__header h1,
  #n8n-chat .chat-header .title,
  #n8n-chat .n8n-chat__header .title,
  #n8n-chat [class*="chatHeader"] h1,
  #n8n-chat [class*="chatHeader"] [class*="title"] {
    position: relative;
    top: -10px;
  }
}

@media (min-width: 980px) {
  #n8n-chat .chat-header h1,
  #n8n-chat .n8n-chat__header h1,
  #n8n-chat .chat-header .title,
  #n8n-chat .n8n-chat__header .title,
  #n8n-chat [class*="chatHeader"] h1,
  #n8n-chat [class*="chatHeader"] [class*="title"] {
    position: relative;
    top: -25px;
  }
}

#n8n-chat .chat-header,
#n8n-chat .n8n-chat__header,
#n8n-chat [class*="chatHeader"],
#n8n-chat [class*="chat-header"] {
  position: relative;
  padding-right: 140px;
  overflow: hidden;
  padding-bottom: 4px;
}

#n8n-chat .chat-header::after,
#n8n-chat .n8n-chat__header::after,
#n8n-chat [class*="chatHeader"]::after,
#n8n-chat [class*="chat-header"]::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: -50px;

  width: 220px;
  height: 220px;

  background: url("/robot.png?v=20251220") no-repeat;
  background-size: contain;
  background-position: right bottom;

  pointer-events: none;
  opacity: 0.98;
}

@media (max-width: 720px) {
  #n8n-chat .chat-header,
  #n8n-chat .n8n-chat__header,
  #n8n-chat [class*="chatHeader"],
  #n8n-chat [class*="chat-header"] {
    padding-right: calc(clamp(160px, 44vw, 196px) + 18px);

    min-height: 115px !important;
    padding-top: 10px !important;
    padding-bottom: 4px !important;
  }

  #n8n-chat .chat-header h1,
  #n8n-chat .n8n-chat__header h1,
  #n8n-chat .chat-header .title,
  #n8n-chat .n8n-chat__header .title,
  #n8n-chat [class*="chatHeader"] h1,
  #n8n-chat [class*="chatHeader"] [class*="title"] {
    margin: 0 !important;
    line-height: 1.05 !important;
    font-size: clamp(26px, 7vw, 40px) !important;
  }

  #n8n-chat .chat-header p,
  #n8n-chat .n8n-chat__header p,
  #n8n-chat .chat-header .subtitle,
  #n8n-chat .n8n-chat__header .subtitle,
  #n8n-chat [class*="chatHeader"] p,
  #n8n-chat [class*="chatHeader"] [class*="subtitle"] {
    margin: 4px 0 0 0 !important;
    line-height: 1.15 !important;
    font-size: 14px !important;
  }

  #n8n-chat .chat-header::after,
  #n8n-chat .n8n-chat__header::after,
  #n8n-chat [class*="chatHeader"]::after,
  #n8n-chat [class*="chat-header"]::after {
    right: 2px !important;
    top: 0 !important;
    bottom: 0 !important;
    width: clamp(160px, 44vw, 196px) !important;
    height: auto !important;
    background-position: right bottom !important;
  }
}

@media (max-width: 420px) {
  #n8n-chat .chat-header,
  #n8n-chat .n8n-chat__header,
  #n8n-chat [class*="chatHeader"],
  #n8n-chat [class*="chat-header"] {
    padding-right: calc(clamp(150px, 46vw, 184px) + 18px);
  }

  #n8n-chat .chat-header h1,
  #n8n-chat .n8n-chat__header h1,
  #n8n-chat .chat-header .title,
  #n8n-chat .n8n-chat__header .title,
  #n8n-chat [class*="chatHeader"] h1,
  #n8n-chat [class*="chatHeader"] [class*="title"] {
    font-size: clamp(24px, 7.2vw, 34px) !important;
  }

  #n8n-chat .chat-header::after,
  #n8n-chat .n8n-chat__header::after,
  #n8n-chat [class*="chatHeader"]::after,
  #n8n-chat [class*="chat-header"]::after {
    right: 2px !important;
    top: 0 !important;
    bottom: 0 !important;
    width: clamp(150px, 46vw, 184px) !important;
    height: auto !important;
    background-position: right bottom !important;
  }
}

@media (max-width: 979px) {
  .topbar-inner {
    flex-wrap: wrap;
  }

  .grid {
    grid-auto-flow: dense;
  }

  .card.chat-wrap { order: 1; }
  .card.info { order: 2; }

  #n8n-chat {
    height: calc(100dvh - 170px);
    min-height: 520px;
  }

  .card.info {
    min-height: auto;
  }

  .privacy-link {
    padding: 8px 10px;
  }

  .mobile-info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 979px) {
  html.chat-active,
  body.chat-active {
    height: 100%;
    overflow: hidden;
  }

  body.chat-active .container {
    padding: 0;
    height: calc(100dvh - var(--topbar-h, 76px));
    overflow: hidden;
  }

  body.chat-active .grid {
    display: block;
    height: 100%;
  }

  body.chat-active .card.chat-wrap {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--topbar-h, 76px);
    bottom: 0;
    margin: 0;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    z-index: 20;
  }

  body.chat-active .card.info {
    display: none;
  }

  body.chat-active #n8n-chat {
    height: 100%;
    min-height: 0;
  }

  body.chat-active.show-info .card.chat-wrap {
    display: none;
  }

  body.chat-active.show-info .card.info {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    top: var(--topbar-h, 76px);
    bottom: 0;
    margin: 0;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    z-index: 21;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
}
@media (max-width: 979px) {
  #n8n-chat {
    --robot-w: clamp(245px, 66vw, 317px);
    --robot-gap: clamp(2px, 0.6vw, 6px);
    --robot-pad: 18px;
    --robot-size: 130%;
    --robot-drop: clamp(24px, 3.6vw, 36px);
  }

  #n8n-chat .chat-header,
  #n8n-chat .n8n-chat__header,
  #n8n-chat [class*="chatHeader"],
  #n8n-chat [class*="chat-header"] {
    padding-right: calc(var(--robot-w) + var(--robot-pad)) !important;
    overflow: hidden !important;
  }

  #n8n-chat .chat-header::after,
  #n8n-chat .n8n-chat__header::after,
  #n8n-chat [class*="chatHeader"]::after,
  #n8n-chat [class*="chat-header"]::after {
    right: var(--robot-gap) !important;
    top: 0 !important;
    bottom: var(--robot-gap) !important;
    width: var(--robot-w) !important;

    transform: none !important;

    background-size: auto var(--robot-size) !important;
    background-position: right calc(100% + var(--robot-drop)) !important;
  }
}





