/* =============================   CHAT-WIDGET GESAMTE CSS   Farbschema: Dunkelblau (#003366) + Goldgelb (#ffcc00)   ============================= */

@keyframes fadeOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

/* 🔲 Container-Stil */

#chat-widget {
  position: fixed;
  bottom: 0px;
  right: 0px;
  width: 150px;
  height: auto;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
  border-radius: 10px 10px 0 0;
  overflow: hidden;
  z-index: 9999;
  transition: all 0.3s ease-in-out;
  font-size: 1rem;
}

/* 🔲 Header-Stil */

#chat-header {
  background-color: #003366 !important;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 48px;
  height: 48px;
  padding: 0.25rem 0.5rem !important;
  font-size: 0.95rem;
}

#chat-header i {
  color: #ffcc00;
  font-size: 1.2rem;
}

#chat-header span {
  font-weight: bold;
  font-size: 0.95rem;
}

/* 🔲 Agenten-Anzeige als farbige Punkte */

#agent-list {
  display: flex;
  gap: 4px;
  align-items: center;
}

.agent-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  background-color: #ffcc00;
  border: 1px solid white;
}

/* 🔲 Toggle-Button */

#chat-toggle {
  background-color: #003366 !important;
  color: #ffcc00 !important;
  border: none;
  padding: 6px 12px;
  font-size: 1.2rem;
}

#chat-toggle i {
  color: #ffcc00 !important;
}

/* 🔲 Ein- und Ausklappen */

.chat-collapsed {
  height: 48px;
  width: 400px;
  transition: all 0.3s ease-in-out;
}

.chat-collapsed #chat-body {
  display: none;
}

.chat-expanded {
  height: 500px !important;
  width: 500px !important;
  display: flex;
  flex-direction: column;
}

.chat-expanded #chat-toggle i {
  transform: rotate(180deg);
  transition: transform 0.3s;
}

.chat-collapsed #chat-toggle i {
  transform: rotate(0deg);
  transition: transform 0.3s;
}

/* 🔲 Chat-Body */

#chat-body {
  background-color: #1a1f2b !important;
  color: #e0e0e0;
  padding: 1rem;
  font-size: 1rem;
  flex-grow: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#chat-input-wrapper {
  min-height: 3rem;
}

/* 🔲 Nachrichtenbereich */

#chat-messages {
  background-color: #ffffff;
  color: #003366;
  padding: 0.75rem;
  border-radius: 5px;
  flex-grow: 1;
  overflow-y: auto;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

/* 🔲 Statusmeldung */

#chat-status-message {
  color: #666666 !important;
  font-size: 0.9rem;
  padding-bottom: 0.5rem;
}

/* 🔲 Start-Button */

#start-chat-btn {
  background-color: #ffcc00 !important;
  color: #003366 !important;
  border: none;
  font-size: 1rem;
  padding: 0.5rem;
}

#start-chat-btn:hover {
  background-color: #e6b800;
}

/* 🔲 Eingabefeld */

#chat-input-wrapper {
  margin-top: 0;
  padding-top: 0.5rem;
  border-top: 1px solid #ccc;
}

#chat-input {
  background-color: #ffffff !important;
  border: 1px solid #003366;
  color: #003366 !important;
  font-size: 1rem;
  padding: 0.5rem;
  width: 100%;
}

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

/* 🔲 Modal für Namenseingabe */

#username-modal {
  width: 360px;
  background-color: #003366;
  z-index: 10000;
  color: white;
  box-shadow: 0 0 15px rgba(0,0,0,0.5);
  font-size: 1rem;
}

#username-modal input {
  background-color: #ffffff;
  color: #003366;
  border: 1px solid #003366;
  font-size: 1rem;
  padding: 0.5rem;
  width: 100%;
}

#username-modal input.form-control {
  background-color: #ffffff !important;
  color: #003366 !important;
  border: 1px solid #003366 !important;
}

#username-modal input.form-control:not(:disabled):not([readonly]) {
  color: #003366 !important;
}

#username-input::placeholder {
  color: #888888;
}

#username-confirm {
  background-color: #ffcc00 !important;
  color: #003366 !important;
  border: none;
  font-size: 1rem;
  padding: 0.5rem;
  width: 100%;
}

@keyframes wiggle {
  0% {
    transform: rotate(0deg);
  }
  15% {
    transform: rotate(-5deg);
  }
  30% {
    transform: rotate(5deg);
  }
  45% {
    transform: rotate(-4deg);
  }
  60% {
    transform: rotate(4deg);
  }
  75% {
    transform: rotate(-2deg);
  }
  90% {
    transform: rotate(2deg);
  }
  100% {
    transform: rotate(0deg);
  }
}

.chat-wiggle {
  animation: wiggle 0.6s ease-in-out;
}

