#chat-widget {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

#chat-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background: #000000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 9999;
}

.chat-title {
    color: white;
    font-weight: bold;
}

#chat-button:hover {
  transform: scale(1.05);
}

#chat-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 400px;
  height: 650px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  z-index: 9999;
  overflow: hidden;
}

#chat-container.hidden {
  display: none;
}

#chat-header {
  background: #000000;
  color: white;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: none;
  position: relative;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  border-bottom: 3px solid white;
}

#chat-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.3px;
}


#chat-menu-container {
  position: relative;
}

#chat-menu-button {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  padding: 8px 12px;
  line-height: 1;
  transition: all 0.2s;
  font-weight: bold;
  border-radius: 8px;
}

#chat-menu-button:hover {
  background: rgba(255,255,255,0.2);
}

#chat-menu {
  position: absolute;
  top: 45px;
  right: 0;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 12px;
  min-width: 200px;
  z-index: 10000;
  overflow: hidden;
}

#chat-menu.hidden {
  display: none;
}

#chat-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px 18px;
  background: none;
  border: none;
  color: #1a1a1a;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  font-weight: 500;
}

#chat-menu button:last-child {
  border-bottom: none;
}

#chat-menu button:hover {
  background: #f5f5f5;
}

#chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #ffffff;
  scroll-behavior: smooth;
}

.message {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: 18px;
  word-wrap: break-word;
  line-height: 1.5;
  font-size: 14px;
  animation: messageSlideIn 0.3s ease;
}

@keyframes messageSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.user-message {
  background: #000000;
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.bot-message {
  background: #f5f5f5;
  color: #1a1a1a;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  border: 1px solid rgba(0,0,0,0.06);
}

/* Inline Questions Container */
.inline-questions-container {
  width: 100%;
  margin-top: 16px;
  animation: messageSlideIn 0.3s ease;
}

.inline-questions-title {
  font-size: 12px;
  color: #666;
  margin-bottom: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.inline-question {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  margin-bottom: 10px;
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  color: #1a1a1a;
  transition: all 0.2s;
  font-weight: 500;
}

.inline-question:hover {
  background: #f5f5f5;
  border-color: #000000;
  transform: translateX(4px);
}

.inline-question:active {
  transform: translateX(2px);
}

#chat-input-container {
  display: flex;
  padding: 16px 20px;
  border-top: 1px solid rgba(0,0,0,0.08);
  gap: 10px;
  background: #ffffff;
  align-items: center;
}

#chat-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 24px;
  font-size: 14px;
  outline: none;
  background: #f9f9f9;
  color: #1a1a1a;
  transition: all 0.2s;
  font-family: inherit;
}

#chat-input:focus {
  border-color: #000000;
  background: #ffffff;
}

#chat-input::placeholder {
  color: #999;
}

#send-button {
  background: #000000;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 24px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
  white-space: nowrap;
}

#send-button:hover {
  background: #1a1a1a;
  transform: translateY(-1px);
}

#send-button:active {
  transform: translateY(0);
}

/* Typing Indicator - Lottie Animation */
.typing-indicator {
  display: flex !important;
  align-items: center;
  justify-content: center;
  max-width: fit-content !important;
  min-height: auto;
  background: #f5f5f5 !important;
  border: 1px solid rgba(0,0,0,0.06) !important;
  padding: 12px 16px !important;
}

/* Fallback: Animierte Punkte (falls Lottie nicht lädt) */
.typing-dots {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
}

.typing-dots span {
  width: 8px;
  height: 8px;
  background: #666;
  border-radius: 50%;
  animation: typing-bounce 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(1) {
  animation-delay: 0s;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing-bounce {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-8px);
    opacity: 1;
  }
}

/* Scrollbar-Styling */
#chat-messages::-webkit-scrollbar {
  width: 6px;
}

#chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

#chat-messages::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.15);
  border-radius: 3px;
}

#chat-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(0,0,0,0.25);
}

/* Responsive Design */
@media (max-width: 480px) {
  #chat-container {
    width: calc(100vw - 20px);
    height: calc(100vh - 20px);
    bottom: 10px;
    right: 10px;
    border-radius: 12px;
  }
  
  #chat-button {
    bottom: 15px;
    right: 15px;
    width: 56px;
    height: 56px;
  }
}

@media (max-width: 400px) {
  #chat-container {
    width: 100vw;
    height: 100vh;
    bottom: 0;
    right: 0;
    border-radius: 0;
  }
  
  #chat-header {
    border-radius: 0;
  }
}