:root {
  --chat--color-primary: #c40079;
  --chat--color-primary-shade-50: #ad006b;
  --chat--color-primary-shade-100: #96005d;
  --chat--color-secondary: #c40079;
  --chat--color-white: #ffffff;
  --chat--color-light: #f7f7f9;
  --chat--color-medium: #d2d4d9;
  --chat--color-dark: #1f1f24;
  --chat--color-typing: #8e8ea0;
  --chat--border-radius: 0.75rem;
  --chat--font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --chat--window--width: 400px;
  --chat--window--height: 600px;
  --chat--header--background: #c40079;
  --chat--header--color: #ffffff;
  --chat--heading--font-size: 1.5rem;
  --chat--subtitle--font-size: 0.9rem;
  --chat--message--bot--background: #f0f0f3;
  --chat--message--bot--color: #1f1f24;
  --chat--message--user--background: #c40079;
  --chat--message--user--color: #ffffff;
  --chat--toggle--background: #c40079;
  --chat--toggle--hover--background: #ad006b;
  --chat--toggle--active--background: #96005d;
  --chat--toggle--color: #ffffff;
  --chat--toggle--size: 68px;
}

/* Standardfragen-Buttons */
.gg-chat-suggestions { display:flex; flex-wrap:wrap; gap:8px; padding:10px 16px; }
.gg-chat-suggestions button {
  border:1px solid #d0d0d0; background:#f7f7f7; border-radius:16px;
  padding:6px 12px; font-size:13px; cursor:pointer; color:#222;
}
.gg-chat-suggestions button:hover { background:#ececec; }

/* Hervorgehobener Lead-/Kontakt-Button */
.gg-chat-suggestions .gg-lead-trigger { border:1px solid #c40079; background:#c40079; color:#fff; }
.gg-chat-suggestions .gg-lead-trigger:hover { background:#ad006b; }

/* Feste Fußzeile mit Telefonnummer */
.chat-input::before {
  content: "Lieber direkt sprechen? 📞 07835 / 540 20 87";
  display: block; text-align: center; font-size: 0.8rem;
  color: #c40079; padding: 6px 0; border-top: 1px solid #eee;
}

/* Kleiner Datenschutz-Hinweis unter dem Eingabefeld */
.chat-input::after {
  content: "Bitte keine sensiblen Daten eingeben. Für ein Angebot „📝 Angebot / Kontakt“ nutzen.";
  display: block; text-align: center; font-size: 0.68rem;
  color: #9a9aa5; padding: 2px 10px 8px; line-height: 1.3;
}

/* Absendebutton einfärben */
.chat-input-send-button, .chat-inputs button { color: #c40079 !important; }
.chat-input-send-button svg, .chat-inputs button svg { fill: #c40079 !important; color: #c40079 !important; }

/* Position: fest unten rechts */
#n8n-chat { position: fixed !important; bottom: 24px !important; right: 24px !important; z-index: 9999 !important; }

/* Abgedunkelter Hintergrund (Lightbox) */
#gg-chat-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  opacity: 0; transition: opacity .3s ease; z-index: 9998; cursor: pointer;
}
#gg-chat-backdrop.sichtbar { opacity: 1; }
.chat-window-wrapper, .chat-window, .chat-layout, .chat-window-toggle { z-index: 9999 !important; }

/* Aufmerksamkeit: Schatten + Pulsieren */
.chat-window-toggle {
  box-shadow: 0 8px 24px rgba(196,0,121,0.45) !important;
  animation: chatPulse 2.5s ease-in-out infinite;
}
@keyframes chatPulse {
  0%   { box-shadow: 0 8px 24px rgba(196,0,121,0.45), 0 0 0 0 rgba(196,0,121,0.5); }
  70%  { box-shadow: 0 8px 24px rgba(196,0,121,0.45), 0 0 0 18px rgba(196,0,121,0); }
  100% { box-shadow: 0 8px 24px rgba(196,0,121,0.45), 0 0 0 0 rgba(196,0,121,0); }
}

/* Einwilligungs-Banner */
#gg-consent {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - 32px);
  max-width: 520px;
  background: #fff; color: #1f1f24;
  border: 1px solid #d2d4d9; border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 16px 18px; z-index: 10000;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px; line-height: 1.5;
}
#gg-consent a { color: #c40079; }
.gg-consent-buttons { display: flex; gap: 10px; margin-top: 12px; }
.gg-consent-buttons button {
  flex: 1; padding: 10px 14px; border-radius: 8px; font-size: 14px; cursor: pointer; border: 1px solid #c40079;
}
#gg-consent-no  { background: #fff;    color: #c40079; }
#gg-consent-yes { background: #c40079; color: #fff; }

/* Lead-/Kontaktformular im Chatfenster */
.gg-lead-form {
  position: fixed; inset: 0; z-index: 10001; background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center; padding: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.gg-lead-inner {
  width: 100%; max-width: 360px; background: #fff; border-radius: 12px;
  padding: 20px; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0,0,0,.3);
}
.gg-lead-inner h3 { margin: 0 0 12px; color: #c40079; font-size: 1.1rem; }
.gg-lead-inner label { display: block; font-size: 0.8rem; margin-bottom: 10px; color: #333; }
.gg-lead-inner input[type="text"],
.gg-lead-inner input[type="email"],
.gg-lead-inner input[type="tel"],
.gg-lead-inner textarea {
  width: 100%; box-sizing: border-box; margin-top: 3px; padding: 8px;
  border: 1px solid #ccc; border-radius: 6px; font-size: 0.85rem; font-family: inherit;
}
.gg-lead-inner input[type="file"] { display: block; width: 100%; margin-top: 4px; font-size: 0.78rem; }
.gg-lead-consent { display: flex; gap: 7px; align-items: flex-start; font-size: 0.72rem; color: #555; }
.gg-lead-consent input { margin-top: 2px; flex: none; }
.gg-lead-consent a { color: #c40079; }
.gg-lead-submit {
  width: 100%; margin-top: 12px; padding: 10px; border: none; border-radius: 6px;
  background: #c40079; color: #fff; font-size: 0.9rem; cursor: pointer;
}
.gg-lead-submit:disabled { opacity: .5; cursor: not-allowed; }
.gg-lead-close {
  float: right; border: none; background: transparent; font-size: 1.5rem; line-height: 1;
  cursor: pointer; color: #888; margin: -4px -4px 0 0;
}
.gg-lead-status { margin-top: 10px; font-size: 0.8rem; text-align: center; line-height: 1.4; }
