/* iOS-Zoom-Fix */
input, button, select, textarea {
  font-size: 16px;
}

/* Fixierter Button unten rechts mit Glow-Gradient */
#gsai-toggle-icon-wrapper {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(270deg, 
    #ff416c,
    #ffaf40,
    #32ff7e,
    #18dcff,
    #ff416c);
  background-size: 800% 800%;
  animation: gradientGlow 6s ease infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.15);
  z-index: 10000;
}

/* Innerer Button ohne Hover-Effekt */
#gsai-toggle-icon {
  width: 60px;
  height: 60px;
  font-size: 26px;
  background: #00354d;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: transform 0.2s ease;
  border: none;
}

/* Optional: Kein Hover-Effekt mehr */
#gsai-toggle-icon:hover {
  transform: none;
}


@keyframes gradientGlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Sichtbarkeit */
#gsai-chatbot {
  display: none;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
  position: fixed;
  bottom: 100px;
  right: 20px;
  width: 340px;
  font-family: 'Inter', sans-serif;
  border-radius: 20px;
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 12px 28px rgba(0,0,0,0.3);
  overflow: hidden;
  z-index: 9999;
  border: 1px solid rgba(255,255,255,0.2);
  flex-direction: column;
}
#gsai-chatbot.gsai-visible {
  display: flex;
  opacity: 1;
}

/* Intro-Animation */
.gsai-intro {
  position: absolute;
  inset: 0;
  background: #00354d;
  color: #fff;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeInUp 0.4s ease-out;
}
.gsai-intro-content {
  text-align: center;
  animation: pulse 1.2s infinite;
}
.gsai-logo-img {
  width: 72px;
  height: 72px;
  margin-bottom: 12px;
  animation: bounceIn 0.8s ease;
  border-radius: 12px;
}

.gsai-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1.5px;
  white-space: nowrap;
  overflow: hidden;
  border-right: 2px solid #fff;
  width: 0;
  margin: 0 auto;
  animation: typing 0.7s steps(12, end) forwards;
}
.gsai-sub {
  font-size: 14px;
  opacity: 0;
  margin-top: 10px;
  animation: fadeIn 0.6s ease forwards;
  animation-delay: 0.8s;
}
.gsai-intro.fade-out {
  animation: fadeOutDown 0.5s forwards;
  pointer-events: none;
  z-index: 0;
}

/* Overlay während Intro */
.gsai-cover {
  position: absolute;
  inset: 0;
  background: #00354d;
  z-index: 1000;
  transition: opacity 0.4s ease;
}
.gsai-cover.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* Sichtbarkeit der UI */
.hidden-during-intro {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.visible-after-intro {
  opacity: 1;
  pointer-events: all;
}

/* Nachrichtenbereich */
.gsai-messages {
  height: 280px;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
}
.gsai-msg {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 14px;
  border-radius: 14px;
  max-width: 85%;
  word-wrap: break-word;
  backdrop-filter: blur(10px);
  background: rgba(255,255,255,0.4);
  color: #00354d;
  font-size: 14px;
  line-height: 1.4;
}
.gsai-msg.user {
  background: #ffef42;
  align-self: flex-end;
  color: #000;
}
.gsai-msg.bot {
  background: rgba(255,255,255,0.3);
  color: #00354d;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.gsai-avatar-img {
  width: 22px;
  height: 22px;
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 2px;
}
.gsai-msg.bot .gsai-avatar {
  flex-shrink: 0;
}
.gsai-msg.bot .gsai-text {
  flex: 1;
}

/* Eingabe-Bereich */
.gsai-input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* Gradient-Rahmen außen */
.gsai-input-wrapper {
  flex: 1;
  padding: 2px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff5f6d, #ffc371, #47e7b5, #6a82fb);
  background-size: 300% 300%;
  animation: moveGradient 4s ease infinite;
}

/* Transparentes Inputfeld */
.gsai-input-wrapper input[type="text"] {
  width: 100%;
  padding: 10px 16px;
  border: none;
  border-radius: 999px;
  background: #00354d !important;
  backdrop-filter: blur(6px);
  color: #ffffff; /* <- hier auf weiß geändert */
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
}

.gsai-input-wrapper input::placeholder {
  color: #fff;
}

.gsai-input-wrapper input:disabled {
  opacity: 0.5;
}

/* Sendebutton */
.gsai-input button {
  background: #ffef42;
  color: #00354d;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
  padding: 0;
}

.gsai-input button:hover {
  background: #ffe924;
}

.gsai-input-wrapper input[type="text"] {
  color: #ffffff !important;
}


/* Fullscreen-Button im Header */
#gsai-fullscreen-toggle {
  margin-left: auto;
  background: none;
  border: none;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  opacity: 0.8;
  padding: 4px;
  transition: opacity 0.2s ease;
}
#gsai-fullscreen-toggle:hover {
  opacity: 1;
}

/* Wenn Chatbot fullscreen ist */
#gsai-chatbot.gsai-fullscreen {
  width: 100vw !important;
  height: 100vh !important;
  max-width: none;
  max-height: none;
  bottom: 0 !important;
  right: 0 !important;
  border-radius: 0 !important;
  border: none !important;
}
#gsai-chatbot.gsai-fullscreen .gsai-messages {
  height: calc(100vh - 150px);
}

#gsai-chatbot.gsai-fullscreen {
  padding: 40px 60px;
  box-sizing: border-box;
}

#gsai-chatbot.gsai-fullscreen .gsai-ui {
  max-width: 960px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  flex-direction: column;
}

#gsai-chatbot.gsai-fullscreen .gsai-messages {
  height: calc(100vh - 200px);
}


/* Header */
.gsai-header {
  background: linear-gradient(135deg, #00354d, #004a68);
  color: white;
  padding: 14px 16px;
  font-weight: 600;
  font-size: 15px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.gsai-header::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 18px;
  background-image: url('assets/images/roboter.webp');
  background-size: contain;
  background-repeat: no-repeat;
  margin-bottom: 4px;
}

/* Loader */
.gsai-loader {
  display: flex;
  gap: 4px;
}
.gsai-loader span {
  width: 6px;
  height: 6px;
  background: #00354d;
  border-radius: 50%;
  animation: blink 1.2s infinite both;
}
.gsai-loader span:nth-child(2) { animation-delay: 0.2s; }
.gsai-loader span:nth-child(3) { animation-delay: 0.4s; }

/* Animations */
@keyframes moveGradient {
  0% {
    background-position: 0% 0%;
  }
  25% {
    background-position: 50% 50%;
  }
  50% {
    background-position: 100% 100%;
  }
  75% {
    background-position: 50% 50%;
  }
  100% {
    background-position: 0% 0%;
  }
}

@keyframes blink {
  0%, 80%, 100% { transform: scale(0.8); opacity: 0.3; }
  40% { transform: scale(1); opacity: 1; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeOutDown {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(30px); }
}
@keyframes bounceIn {
  0%   { transform: scale(0.3); opacity: 0; }
  50%  { transform: scale(1.1); opacity: 1; }
  70%  { transform: scale(0.9); }
  100% { transform: scale(1); }
}
@keyframes typing {
  from { width: 0 }
  to { width: 220px }
}
@keyframes fadeIn {
  to { opacity: 1; }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}



#gsai-chatbot.gsai-fullscreen .gsai-input {
  background: transparent !important;
  backdrop-filter: none !important;
  border-top: none !important;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
}

#gsai-chatbot.gsai-fullscreen .gsai-input-wrapper {
  flex: 1;
  padding: 2px !important;
  border-radius: 999px !important;
  background: linear-gradient(135deg, #ff5f6d, #ffc371, #47e7b5, #6a82fb) !important;
  background-size: 300% 300% !important;
  animation: moveGradient 6s ease-in-out infinite !important;
}

#gsai-chatbot.gsai-fullscreen .gsai-input-wrapper input[type="text"] {
  width: 100%;
  padding: 10px 16px !important;
  border: none !important;
  border-radius: 999px !important;
  background: #00354d !important;
  color: #fff !important;
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
  backdrop-filter: blur(6px) !important;
}

#gsai-chatbot.gsai-fullscreen .gsai-input-wrapper input::placeholder {
  color: #ccc !important;
}

#gsai-chatbot.gsai-fullscreen .gsai-input-wrapper input:disabled {
  opacity: 0.5 !important;
}

/* Button komplett neu stylen */
#gsai-chatbot.gsai-fullscreen .gsai-input button {
  background: #ffef42 !important;
  color: #000 !important;
  border: none !important;
  border-radius: 999px !important;
  padding: 10px 16px !important;
  cursor: pointer;
  box-shadow: none !important;
}

/* Button Hover */
#gsai-chatbot.gsai-fullscreen .gsai-input button:hover {
  background: #ffe400 !important;
}

/* Sicherheitsmaßnahme: Keine Hintergrundfarbe oder Schatten auf äußeren Ebenen */
#gsai-chatbot.gsai-fullscreen .gsai-input *,
#gsai-chatbot.gsai-fullscreen .gsai-input-wrapper * {
  background: transparent !important;
  box-shadow: none !important;
}



/* Nachrichten-Fix: Max-Breite einheitlich */
.gsai-msg {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

/* Optional: Inhalte innerhalb begrenzen */
.gsai-msg .gsai-text {
  max-width: 100%;
  word-break: break-word;
}


.gsai-msg {
  width: 100%;
  max-width: 85%;
  box-sizing: border-box;
}


#gsai-chatbot.gsai-fullscreen .gsai-ui {
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}


#gsai-chatbot.gsai-fullscreen .gsai-header {
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
}



/* ------------------------------------------
   GS-AI GUIDE BUBBLE (angepasstes Layout)
   ------------------------------------------ */
.gsai-guide-bubble {
  position: absolute;
  bottom: 70px;
  right: 20px;

  /* Maximalbreite und breiter angezeigt */
  width: 500px;
  max-width: 90%;
  background: #00354d;
  color: #fff;
  
  /* Mehr Innenabstand für mehr Luft */
  padding: 16px 24px;
  border-radius: 20px;
  
  font-size: 15px;
  line-height: 1.4;
  font-family: "Inter", sans-serif;
  
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);

  display: flex;
  align-items: center;
  animation: fadeInUp 0.3s ease forwards;
}

/* Pfeil unter der Bubble */
.gsai-guide-bubble::after {
  content: "";
  position: absolute;
  bottom: -8px;
  right: 28px;
  border-width: 8px;
  border-style: solid;
  border-color: #00354d transparent transparent transparent;
}

/* Text: maximal 2 Zeilen, dann … */
.gsai-guide-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2; /* genau 2 Zeilen */
  overflow: hidden;
  flex: 1;
  margin-right: 12px;    /* Abstand zum X-Button */
}

/* X-Button oben rechts */
.gsai-guide-close {
  background: transparent;
  border: none;
  color: #fff;           /* jetzt Weiß statt Gelb */
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

/* Verstecken-Klasse */
.gsai-guide-bubble.hide {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Fade-In-Up Keyframes */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#gsai-chatbot.gsai-fullscreen .gsai-header {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 24px 36px;
  font-size: 18px;
  font-weight: 600;
  background: linear-gradient(135deg, #00354d, #004a68);
	border-radius: 24px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  color: #fff;
  position: relative;
  z-index: 2;
}

#gsai-chatbot.gsai-fullscreen .gsai-header strong {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

#gsai-chatbot.gsai-fullscreen .gsai-header a {
  font-size: 14px;
  font-weight: 500;
  color: #ffef42;
  opacity: 0.9;
  text-decoration: underline;
  margin-left: 24px;
  transition: opacity 0.2s ease;
}
#gsai-chatbot.gsai-fullscreen .gsai-header a:hover {
  opacity: 1;
}


.gsai-header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px;
  background: #00354d;
  color: white;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
  overflow: hidden;
}

.gsai-bot-animation {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 80px;
  height: 80px;
  pointer-events: none;
  z-index: 9;
}

.gsai-bot-animation lottie-player {
  width: 100%;
  height: 100%;
}
