#chat-widget {
  position: fixed;
  bottom: 15px;
  right: 15px;
  width: 300px;
  max-width: 90%;
  font-family: sans-serif;
  z-index: 9999;
}

#chat-header {
  background-color: var(--purple);
  color: white;
  letter-spacing: 0.1rem;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--dark);
  cursor: pointer;
  text-align: center;
  font-weight: bold;
}

#chat-box {
  display: flex;
  flex-direction: column;
  border: 1px solid #ccc;
  border-top: none;
  border-radius: 0 0 10px 10px;
  background: white;
  max-height: 0dvh;
  height: auto;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  transition: all 0.2s ease-out;
}

#chat-log {
  padding: 10px;
  height: 250px;
  overflow-y: auto;
  font-size: 0.9rem;
}

#chat-input-row {
  display: flex;
  border-top: 1px solid #2e2d2d;
}

#chat-input {
  flex: 1;
  padding: 10px;
  border: none;
  outline: none;
  font-size: 0.9rem;
}

#chat-input-row button {
  background: var(--dark);
  color: white;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
}

/* 💬 Message bubbles */
#chat-log div {
  margin-bottom: 8px;
  line-height: 1.4;
}

#chat-log .bot {
  background: var(--blue);
  color: aliceblue;
  padding: 8px 10px;
  border-radius: 10px 10px 10px 0;
  max-width: 90%;
  width: fit-content;
  align-self: flex-start;
}

#chat-log .user {
  background: #111;
  color: white;
  padding: 8px 10px;
  border-radius: 10px 10px 0 10px;
  max-width: 90%;
  width: fit-content;
  margin-left: auto;
}

/* Typing bubble animation */
.typing {
  font-style: italic;
  opacity: 0.7;
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 100% { opacity: 0.7 }
  50% { opacity: 0.2 }
}
