*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f3f4f6;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.chat {
  max-width: 480px;
  height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  background: #ffffff;
}

.chat-header {
  padding: 14px;
  background: #b91c1c;
  color: #ffffff;
  font-weight: 600;
  text-align: center;
  font-size: 16px;
}

.chat-messages {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  background: #f9fafb;
  display: flex;
  flex-direction: column;
}

.msg {
  max-width: 80%;
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 16px;
  line-height: 1.4;
  font-size: 15px;
  word-wrap: break-word;
}

.msg.santa {
  background: #fee2e2;
  color: #7f1d1d;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.msg.child {
  background: #dcfce7;
  color: #14532d;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.msg.typing {
  font-style: italic;
  opacity: 0.7;
}

.chat-input {
  display: flex;
  padding: 8px;
  border-top: 1px solid #e5e7eb;
  background: #ffffff;
}

.chat-input input {
  flex: 1;
  padding: 10px;
  font-size: 15px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
}

.chat-input input:focus {
  outline: none;
  border-color: #b91c1c;
}

.chat-input button {
  margin-left: 8px;
  padding: 0 16px;
  border: none;
  border-radius: 8px;
  background: #b91c1c;
  color: #ffffff;
  font-size: 15px;
  cursor: pointer;
}

.chat-input button:hover {
  background: #991b1b;
}

.chat-input button:disabled,
.chat-input input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
