.chat-container * {
  box-sizing: border-box;
}
.chat-container {
  font-family: 'Nunito', sans-serif;
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 100%;
  max-width: 420px;
  height: 80vh;
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
}
#chat-box {
  flex-grow: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #f9fafb;
}
#chat-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 20px;
  background: #f9fafb;
}
.chat-option-btn {
  padding: 8px 14px;
  font-size: 14px;
  border-radius: 20px;
  border: 1px solid #2563eb;
  background-color: white;
  color: #2563eb;
  cursor: pointer;
  transition: all 0.2s;
}
.chat-option-btn:hover {
  background-color: #2563eb;
  color: white;
}
form {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
input[type="text"],
input[type="email"] {
  flex: 1;
  padding: 12px 16px;
  font-size: 15px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  outline: none;
  transition: border-color 0.2s;
}
input[type="text"]:focus,
input[type="email"]:focus {
  border-color: #2563eb;
}
button[type="submit"] {
  background-color: #2563eb;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 15px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.2s;
}
button[type="submit"]:hover {
  background-color: #1d4ed8;
}
.msg-user,
.msg-bot {
  font-size: 15px;
  line-height: 1.4;
  max-width: 80%;
  word-wrap: break-word;
  animation: fadeIn 0.35s ease forwards;
  opacity: 0;
}
.msg-user {
  align-self: flex-end;
  background-color: #2563eb;
  color: white;
  padding: 10px 14px;
  border-radius: 18px 18px 0 18px;
}
.msg-bot {
  align-self: flex-start;
  background-color: #e5e7eb;
  color: #111827;
  padding: 10px 14px;
  border-radius: 18px 18px 18px 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 4px;
}
.msg-bot .avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  background-size: cover;
  background-position: center;
  background-color: #d1d5db;
  border-radius: 50%;
}

/* ── Typing indicator ── */
.typing-indicator .text {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 0;
  min-height: 20px;
}
.typing-indicator .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9ca3af;
  animation: bounce 1.2s infinite ease-in-out;
  display: inline-block;
}
.typing-indicator .dot:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator .dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
  0%, 60%, 100% { transform: translateY(0); }
  30%           { transform: translateY(-6px); }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hidden {
  display: none !important;
}

@media (max-width: 600px) {
  .chat-container {
    left: 20px;
    right: 20px;
    width: auto;
    max-width: none;
  }
}