body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif, sans-serif;
  background: #eef2f5;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  overflow-x: hidden; /* Prevent horizontal scrollbar */
}

.chat-box {
  width: 100%;
  max-width: 600px;
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  height: 80vh;
}

h2 {
  margin-top: 0;
  text-align: center;
  color: #333;
}

#chat-log {
  flex: 1;
  overflow-y: auto;
  padding: 1em;
  margin-bottom: 10px;

  /* hide scrollbar */
  scrollbar-width: none;      /* Firefox */
  -ms-overflow-style: none;   /* IE/Edge */
}
#chat-log::-webkit-scrollbar { display: none; }

/* Chat bubbles */
.message {
  margin-bottom: 10px;
  padding: 10px 15px;
  border-radius: 15px;
  max-width: 85%;
  white-space: pre-wrap;
  line-height: 1.4;
  box-shadow: 0 3px 2px rgba(0,0,0,0.1);

  /* animation */
  opacity: 0;
  transform: translateY(20px);
  animation: slideUp 0.5s ease forwards;
}

@keyframes slideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.user {
  background: #97b6ce;
  color: rgb(0, 0, 0);
  margin-left: auto;
  border-bottom-right-radius: 0;
}

.assistant {
  background: #e8e1ccaf;
  margin-right: auto;
  border-bottom-left-radius: 0;
}

.sender-label {
  font-size: 0.8em;
  font-weight: bold;
  margin-bottom: 0.2em;
  color: #555;
}

/* Input form */
form {
  display: flex;
  gap: 10px;
}

input[type="text"] {
  flex: 1;
  padding: 12px;
  font-size: 16px;
  border-radius: 8px;
  border: 1px solid #ccc;
  outline: none;
}

button {
  background-color: #009688;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
button:hover {
  background-color: #00796b;
}

#confirmation-buttons {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}
#confirmation-buttons button {
  flex: 1;
}

#typing-indicator {
  font-style: italic;
  color: #999;
  margin-top: 8px;
  text-align: center;
}

.footer-text {
  color: #919191;
  margin-top: 10px;
  display: block;
  text-align: center;
  font-size: 0.8em; /* Make font a bit smaller */
}

/* Mobile */
@media (max-width: 600px) {
  body {
    padding: 10px;
    width: 100%; /* Ensure body takes full width */
  }
  .chat-box {
    height: 90vh;
    padding: 15px;
    box-shadow: none;
    box-sizing: border-box; /* Include padding in the element's total width */
  }
  input[type="text"], button {
    font-size: 14px;
    padding: 10px;
  }
  form {
    flex-direction: column;
    gap: 5px;
  }
  button {
    width: 100%;
  }
  #chat-log {
    padding-right: 5px;
  }
}
