/* === Zylinder-Trigger-Button === */
#zylinderTrigger {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  cursor: pointer;
  z-index: 2147483647 !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
#zylinderTrigger img {
  width: 100%;
  height: auto;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(75, 155, 52, 0.4);
}
#zylinderTrigger img:hover {
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(75, 155, 52, 0.6);
}
#chatbotPopup.active ~ #zylinderTrigger {
  display: none;
}

/* === Chatbot-Popup === */
#chatbotPopup {
  position: fixed;
  top: 10vh;
  right: 0;
  width: 400px;
  max-width: 95vw;
  height: 80vh;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: -8px 8px 24px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  z-index: 2147483646;
  transform: translateX(100%);
  transition: transform 0.5s ease;
  font-family: 'Segoe UI', 'Helvetica Neue', sans-serif;
  color: #222;
  display: flex;
  flex-direction: column;
  border-top-left-radius: 28px;
  border-bottom-left-radius: 28px;
}
#chatbotPopup.active {
  transform: translateX(0);
}
#chatbotPopup.expand-left {
  width: 720px;
}

/* === Wrapper für Sidepanel + Chatbereich === */
.chatbot-wrapper {
  display: flex;
  flex-direction: row;
  height: 100%;
  width: 100%;
  min-height: 0;
}

/* === Seitenpanel === */
.zcb-sidepanel {
  display: none;
  width: 300px;
  background: rgba(255, 255, 255, 0.3);
  padding: 1rem;
  border-right: 1px solid rgba(0, 0, 0, 0.05);
  overflow-y: auto;
  color: #222;
}
.chatbot-popup.expand-left .zcb-sidepanel {
  display: block;
}

/* === Dynamischer Content im Panel === */
#zcb-dynamic-content {
  display: none;
}
#zcb-dynamic-content * {
  max-width: 100%;
  box-sizing: border-box;
  word-break: break-word;
}
#chatbotPopup.expand-left #zcb-dynamic-content {
  display: block;
  background: rgba(255, 255, 255, 0.3);
  border-left: 2px solid #4b9b34;
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 16px;
  font-size: 0.95rem;
  color: #222;
  overflow-y: auto;
}

/* === Haupt-Chatbereich === */
.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

/* === Header === */
.chat-header {
  background: rgba(75, 155, 52, 0.95);
  color: white;
  padding: 1rem 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 1.1rem;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.2);
}
.popup-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.3rem;
  cursor: pointer;
  transition: transform 0.3s ease;
}
.popup-close:hover {
  transform: scale(1.2);
}

/* === Nachrichtenverlauf === */
.chat-content {
  flex: 1;
  padding: 1rem 1.2rem;
  overflow-y: auto;
  background: transparent;
  color: #222;
  min-height: 0;
}
.message {
  max-width: 85%;
  margin-bottom: 1rem;
  padding: 0.8rem 1rem;
  border-radius: 18px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  line-height: 1.6;
}
.message.user {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(6px);
  margin-left: auto;
  text-align: right;
  border: 1px solid rgba(0, 0, 0, 0.05);
}
.message.bot {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(0, 0, 0, 0.05);
  backdrop-filter: blur(6px);
  text-align: left;
}

/* === Denkpunkt (Animation) === */
.thinking-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin: 8px 2px;
  background: #4b9b34;
  border-radius: 50%;
  animation: pulsiere 1s infinite ease-in-out;
}
@keyframes pulsiere {
  0% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.5); opacity: 1; }
  100% { transform: scale(1); opacity: 0.4; }
}

/* === Eingabebereich === */
.chat-input {
  background: rgba(255, 255, 255, 0.3);
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  padding: 1rem;
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.chat-input textarea {
  flex: 1;
  resize: none;
  border: none;
  padding: 0.7rem 1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.8);
  color: #222;
  font-size: 0.95rem;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}
.chat-input button {
  background: #4b9b34;
  color: white;
  border: none;
  padding: 0.65rem 1.2rem;
  font-weight: bold;
  font-size: 0.95rem;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
}
.chat-input button:hover {
  background: #3c8c2f;
  transform: scale(1.05);
}

/* === Mobil-Optimierung === */
@media (max-width: 768px) {
  #chatbotPopup {
    width: 95vw !important;
    height: auto !important;
    top: 0;
    right: 0;
    margin: 0;
    border-radius: 0;
  }
  #chatbotPopup.expand-left {
    width: 95vw !important;
  }
  .chatbot-wrapper {
    flex-direction: column;
  }
  .zcb-sidepanel {
    width: 100% !important;
    display: block !important;
    order: -1;
    border: none;
    border-bottom: 1px solid #ccc;
  }
  #zcb-dynamic-content {
    display: block !important;
    margin: 0;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 0;
    border-top: 1px solid #ccc;
  }
}

.zcb-sidepanel {
  position: relative; /* nötig für absolute Positionierung */
}

.zcb-close-button {
  position: absolute;
  top: 12px;
  right: 400px;
  background: none;
  border: none;
  color: #222;
  font-size: 1.6rem;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  z-index: 10000000;
  transition: background 0.2s ease;
}

.zcb-close-button:hover {
  background: rgba(0, 0, 0, 0.05);
}
/* === Mobile: wie Desktop, ohne Sidepanel === */
@media (max-width: 768px) {
  /* Popup-Erscheinung wie Desktop behalten */
  #chatbotPopup {
    width: 95vw !important;   /* deine Breite bleibt */
    height: 80vh !important;  /* fix auf 80vh */
    top: 10vh !important;     /* wie Desktop */
    right: 0 !important;
    border-top-left-radius: 28px !important;
    border-bottom-left-radius: 28px !important;
  }

  /* Layout NICHT stapeln */
  .chatbot-wrapper {
    flex-direction: row !important;
  }

  /* Sidepanel komplett ausblenden */
  .zcb-sidepanel,
  #zcb-dynamic-content {
    display: none !important;
  }

  /* Hauptbereich korrekt flexen */
  .chat-main {
    height: 100% !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
  }

  /* Nachrichtenbereich scrollen lassen */
  .chat-content {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch; /* sanftes Scrollen iOS */
  }

  /* Input bleibt sichtbar */
  .chat-input {
    flex: 0 0 auto !important;
  }
}

/* Sicherheitshalber auch außerhalb vom Media-Query: */
.chat-content {
  min-height: 0;            /* verhindert „no scroll“ in flex-Containern */
  overflow-y: auto;
}

/* =========================================
   Wizard-Buttons (FE Wizard): untereinander + gleiche Breite
   ========================================= */

#chatbotPopup .fe-choices {
  margin-top: 10px;
}

#chatbotPopup .fe-choices-title {
  margin: 8px 0 10px;
  font-weight: 600;
}

/* Liste als Spalte */
#chatbotPopup .fe-choices-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Buttons */
#chatbotPopup .fe-choice {
  width: 100%;
  display: block;
  text-align: left;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(75, 155, 52, 0.35);
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #222;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

#chatbotPopup .fe-choice:hover {
  background: rgba(241, 248, 233, 0.9);
  border-color: #4b9b34;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(75, 155, 52, 0.18);
}

#chatbotPopup .fe-choice:active {
  transform: scale(0.98);
}

/* =========================================
   Fix: Wizard-Buttons bleiben innerhalb der Chat-Bubble
   ========================================= */

/* Choices-Block darf nicht "breiter als Bubble" werden */
#chatbotPopup .message.bot .fe-choices,
#chatbotPopup .message.bot .fe-choices-list {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden; /* schützt gegen 1-2px Überlauf */
}

/* Buttons sauber in der Bubble halten */
#chatbotPopup .message.bot .fe-choice {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

/* Falls irgendwo inline-widths gesetzt werden: */
#chatbotPopup .message.bot .fe-choice {
  margin: 0;
}

/* Optional: Bubble selbst darf nicht überlaufen */
#chatbotPopup .message.bot {
  overflow-wrap: anywhere;
}

/* =========================================================
   Zylinder Chatbot – Booking Wizard Button Overrides
   Ziel:
   - Buttons untereinander
   - 90% Breite der Chat-Bubble
   - nur für Wizard-Auswahl (nicht für KI-Antworten)
   ========================================================= */

/* Container mit Wizard-Buttons */
.zcb-message .zcb-choices,
.zcb-message .chat-choices,
.zcb-message .wizard-choices {
  display: flex !important;
  flex-direction: column !important;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

/* Einzelner Button */
.zcb-message .zcb-choice,
.zcb-message .chat-choice,
.zcb-message .wizard-choice,
.zcb-message button {
  width: 90% !important;
  max-width: 90% !important;
  display: block !important;
  text-align: center;
  white-space: normal;
  border-radius: 12px;
  padding: 10px 12px;
}

/* Hover / Fokus – dezent, aber klar */
.zcb-message .zcb-choice:hover,
.zcb-message .chat-choice:hover,
.zcb-message .wizard-choice:hover {
  filter: brightness(0.97);
}

/* Mobile Feinschliff */
@media (max-width: 600px) {
  .zcb-message .zcb-choice,
  .zcb-message .chat-choice,
  .zcb-message .wizard-choice {
    width: 95% !important;
    max-width: 95% !important;
  }
}

/* =========================================
   OVERRIDE: Booking Wizard Choices
   Buttons untereinander + 90% Bubble-Breite
   (Wizard nutzt: .fe-choices / .fe-choices-list / .fe-choice)
   ========================================= */

/* Choices-Wrapper soll die Bubble-Breite nutzen */
#chatbotPopup .message.bot .fe-choices {
  width: 100%;
  max-width: 100%;
}

/* Liste: untereinander + zentriert */
#chatbotPopup .message.bot .fe-choices-list {
  display: flex;              /* bleibt wie vorgesehen */
  flex-direction: column;     /* untereinander */
  align-items: center;        /* Buttons mittig */
  gap: 10px;                  /* Abstand wie bisher */
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Button: 90% der Bubble */
#chatbotPopup .message.bot .fe-choice {
  width: 90% !important;      /* überschreibt die bisherigen width:100% Regeln */
  max-width: 90% !important;
  box-sizing: border-box;
  margin: 0 auto !important;  /* sauber mittig */
  text-align: left;           /* so wie dein Wizard-Design */
}

/* Mobile: etwas breiter (optional angenehm) */
@media (max-width: 600px) {
  #chatbotPopup .message.bot .fe-choice {
    width: 95% !important;
    max-width: 95% !important;
  }
}

/* =========================================
   OVERRIDE: Wizard-Auswahlbuttons (Booking Wizard)
   Klassen aus ZIP:
   - Wrapper: .wiz-choices
   - Button:  .wiz-option
   Ziel:
   - Buttons untereinander
   - 90% Breite der Chat-Bubble
   ========================================= */

#chatbotPopup .message.bot .wiz-choices {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
  box-sizing: border-box !important;
  margin-top: 10px !important;
}

#chatbotPopup .message.bot .wiz-choices .wiz-option {
  width: 90% !important;
  max-width: 90% !important;
  display: block !important;
  box-sizing: border-box !important;
  margin: 0 auto !important;

  /* falls eure Button-Styles inline/anders sind */
  white-space: normal !important;
  text-align: left !important;
}

/* Mobil: etwas breiter, damit’s nicht gequetscht wirkt */
@media (max-width: 600px) {
  #chatbotPopup .message.bot .wiz-choices .wiz-option {
    width: 95% !important;
    max-width: 95% !important;
  }
}

/* =========================================
   Wizard Buttons – optisch nicer (Cards/Chips)
   Ziel:
   - untereinander, 90% Bubble
   - modern, gut klickbar
   - klare Hover/Focus States
   ========================================= */

#chatbotPopup .message.bot .wiz-choices{
  display:flex !important;
  flex-direction:column !important;
  align-items:center !important;
  gap:10px !important;
  width:100% !important;
  margin-top:10px !important;
}

/* Button-Card Look */
#chatbotPopup .message.bot .wiz-choices .wiz-option{
  width:90% !important;
  max-width:90% !important;
  box-sizing:border-box !important;

  /* Layout */
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;

  padding:12px 14px !important;
  border-radius:14px !important;

  /* Look */
  background:rgba(255,255,255,0.9) !important;
  border:1px solid rgba(0,0,0,0.10) !important;

  /* Typo */
  font-size:15px !important;
  font-weight:600 !important;
  line-height:1.25 !important;
  text-align:left !important;
  white-space:normal !important;

  /* Feel */
  cursor:pointer !important;
  transition:transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, background 140ms ease !important;
  box-shadow:0 2px 10px rgba(0,0,0,0.08) !important;
}

/* Hover: minimaler Lift */
#chatbotPopup .message.bot .wiz-choices .wiz-option:hover{
  transform:translateY(-1px) !important;
  box-shadow:0 8px 22px rgba(0,0,0,0.12) !important;
  border-color:rgba(0,0,0,0.18) !important;
  background:rgba(255,255,255,0.98) !important;
}

/* Active: "drück" Effekt */
#chatbotPopup .message.bot .wiz-choices .wiz-option:active{
  transform:translateY(0px) scale(0.99) !important;
  box-shadow:0 4px 14px rgba(0,0,0,0.10) !important;
}

/* Keyboard Focus: gut sichtbar */
#chatbotPopup .message.bot .wiz-choices .wiz-option:focus,
#chatbotPopup .message.bot .wiz-choices .wiz-option:focus-visible{
  outline:none !important;
  border-color:rgba(0,0,0,0.28) !important;
  box-shadow:0 0 0 3px rgba(0,0,0,0.12), 0 10px 26px rgba(0,0,0,0.12) !important;
}

/* Optional: Nummern/Icons vorne (falls du sie im Text nutzt) etwas Abstand */
#chatbotPopup .message.bot .wiz-choices .wiz-option::before{
  content:"";
  display:inline-block;
  width:0;
  margin-right:0;
}

/* Mobile: bisschen breiter */
@media (max-width: 600px){
  #chatbotPopup .message.bot .wiz-choices .wiz-option{
    width:95% !important;
    max-width:95% !important;
    padding:12px 12px !important;
    border-radius:16px !important;
  }
}

/* Dark-Mode Fallback (falls Popup dunkel ist) */
@media (prefers-color-scheme: dark){
  #chatbotPopup .message.bot .wiz-choices .wiz-option{
    background:rgba(20,20,20,0.88) !important;
    border-color:rgba(255,255,255,0.12) !important;
    box-shadow:0 2px 10px rgba(0,0,0,0.35) !important;
  }
  #chatbotPopup .message.bot .wiz-choices .wiz-option:hover{
    background:rgba(20,20,20,0.96) !important;
    border-color:rgba(255,255,255,0.18) !important;
  }
}