:root {
  --pr-bg: #0F1012;
  --pr-surface: #1A1C1F;
  --pr-surface-user: #26282C;
  --pr-input-bg: #161719;
  --pr-border: rgba(255,255,255,0.08);
  --pr-border-strong: rgba(255,255,255,0.12);
  --pr-accent: #F05A28;
  --pr-accent-ink: #2A0E03;
  --pr-text: #F3F3F1;
  --pr-text-muted: #8E8E8C;
  --pr-placeholder: #6F6F6D;
  --pr-bubble-text: #DADAD8;
}

/* Launcher-Button nur für die lokale Testseite */
#bot-open {
  padding: 14px 26px; font-size: 15px; font-weight: 500; letter-spacing: 0.02em;
  color: var(--pr-accent-ink); background: var(--pr-accent); border: 0;
  border-radius: 10px; cursor: pointer;
}

/* Overlay / Backdrop */
.bot-panel {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(5,6,7,0.6);
  display: none; align-items: center; justify-content: center;
  padding: 24px;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
.bot-panel.open { display: flex; }

/* Modal */
.pr-modal {
  position: relative;
  width: 100%; max-width: 600px; max-height: 88vh;
  background: var(--pr-bg);
  border: 0.5px solid var(--pr-border);
  border-radius: 18px;
  display: flex; flex-direction: column; overflow: hidden;
}

.pr-close {
  position: absolute; top: 18px; right: 20px;
  width: 34px; height: 34px; line-height: 34px; text-align: center;
  background: transparent; border: 0; color: var(--pr-text-muted);
  font-size: 24px; cursor: pointer;
}

/* Kopfbereich, scrollt nicht mit */
.pr-head { padding: 28px 30px 16px; flex: 0 0 auto; }
.pr-eyebrow { color: var(--pr-accent); font-size: 13px; font-weight: 500; letter-spacing: 0.22em; margin: 0 0 12px; }
.pr-rule { display: block; width: 56px; height: 3px; background: var(--pr-accent); margin-bottom: 20px; }
.pr-title { color: var(--pr-text); font-size: 26px; font-weight: 500; line-height: 1.25; margin: 0 0 6px; }
.pr-sub { color: var(--pr-text-muted); font-size: 15px; margin: 0; }

/* Gesprächsbereich */
.bot-log { flex: 1 1 auto; overflow-y: auto; padding: 8px 30px 4px; display: flex; flex-direction: column; gap: 12px; }
.bot-msg { font-size: 15px; line-height: 1.55; padding: 12px 16px; max-width: 88%; white-space: pre-wrap; }
.bot-assistant { align-self: flex-start; background: var(--pr-surface); color: var(--pr-bubble-text); border-radius: 14px 14px 14px 4px; }
.bot-user { align-self: flex-end; background: var(--pr-surface-user); color: var(--pr-text); border-radius: 14px 14px 4px 14px; max-width: 80%; }

/* Eingabebereich */
.pr-input { flex: 0 0 auto; padding: 16px 26px 22px; }
.pr-inputbox {
  background: var(--pr-input-bg); border: 0.5px solid var(--pr-border-strong);
  border-radius: 14px; padding: 12px 12px 12px 16px;
  display: flex; align-items: flex-end; gap: 10px;
}
.pr-inputbox textarea {
  flex: 1; resize: none; border: 0; background: transparent;
  color: var(--pr-text); font: inherit; font-size: 15px; line-height: 1.5;
  max-height: 120px; outline: none; padding: 4px 0;
}
.pr-inputbox textarea::placeholder { color: var(--pr-placeholder); }
.pr-send {
  flex: 0 0 auto; width: 40px; height: 40px; border: 0; border-radius: 50%;
  background: var(--pr-accent); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.pr-send:disabled { opacity: 0.5; cursor: default; }
.pr-send svg { stroke: var(--pr-accent-ink); }

.pr-classic {
  display: block; margin: 14px auto 0; background: none; border: 0;
  color: var(--pr-text-muted); font-size: 13px; text-decoration: underline;
  text-underline-offset: 3px; cursor: pointer;
}

/* Kontaktformular am Gesprächsende */
.bot-form { display: flex; flex-direction: column; gap: 6px; padding: 4px 0 8px; }
.pr-flabel { color: var(--pr-text-muted); font-size: 12px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; margin-top: 8px; }
.pr-field {
  background: var(--pr-input-bg); border: 0.5px solid var(--pr-border-strong);
  border-radius: 12px; padding: 12px 14px; color: var(--pr-text); font: inherit; font-size: 15px; outline: none;
}
.pr-field::placeholder { color: var(--pr-placeholder); }
.bot-consent { color: var(--pr-text-muted); font-size: 13px; display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; line-height: 1.4; }
.bot-consent a { color: var(--pr-text-muted); }
.pr-submit {
  margin-top: 14px; width: 100%; padding: 14px; border: 0; border-radius: 12px;
  background: var(--pr-accent); color: var(--pr-accent-ink); font-size: 15px; font-weight: 500;
  letter-spacing: 0.02em; cursor: pointer;
}
.pr-submit:disabled { opacity: 0.6; cursor: default; }
.bot-error { color: #F08A6A; font-size: 13px; margin-top: 6px; }

/* Mobil: Vollbild */
@media (max-width: 600px) {
  .bot-panel { padding: 0; }
  .pr-modal { max-width: 100%; width: 100%; height: 100%; max-height: 100%; border-radius: 0; border: 0; }
}
