#guest-chat-box {
  max-width: 600px;
  margin: 20px auto;
  font-family: 'Segoe UI', Tahoma, sans-serif;
  border: 1px solid #ccc;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  background: #f7f9fc;
  display: flex;
  flex-direction: column;
  height: 80vh;
}

#chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  background: #e5e8f0;
  display: flex;
  flex-direction: column;
}

.chat-msg {
  max-width: 80%;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  word-wrap: break-word;
  position: relative;
  display: inline-block;
  clear: both;
  animation: fadeIn 0.3s ease;
}

.chat-msg .nick {
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 4px;
  display: block;
}

.chat-msg.sent {
  background-color: #daf0ff;
  color: #000;
  align-self: flex-end;
  border-bottom-right-radius: 0;
}

.chat-msg.received {
  background-color: #f0f0f0;
  color: #000;
  align-self: flex-start;
  border-bottom-left-radius: 0;
}

#guest-chat-form {
  display: flex;
  padding: 10px;
  border-top: 1px solid #ccc;
  background: white;
}

#guest-chat-form input[type="text"] {
  flex: 1;
  padding: 10px;
  margin-right: 8px;
  border-radius: 8px;
  border: 1px solid #bbb;
}

#guest-chat-form button {
  padding: 10px 18px;
  background-color: #0088cc;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s;
}

#guest-chat-form button:hover {
  background-color: #0072a3;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}
