/* Global styles for Chatly */
body {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  background-color: #f8f9fa;
  color: #333;
}

a {
  color: #007bff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Container */
.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 1rem;
}

/* Card style for forms */
.card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  padding: 2rem;
}

.card h2 {
  margin-top: 0;
  margin-bottom: 1rem;
}

/* Form elements */
label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

input[type='email'],
input[type='password'],
input[type='text'] {
  width: 100%;
  padding: 0.75rem;
  margin-bottom: 1rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 1rem;
  box-sizing: border-box;
}

button {
  background-color: #007bff;
  color: #fff;
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.15s ease-in-out;
}

button:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
}

button:hover:not(:disabled) {
  background-color: #0056b3;
}

/* Chat layout */
.chat-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.chat-header {
  padding: 1rem;
  background-color: #fff;
  border-bottom: 1px solid #e9ecef;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.message-list {
  flex-grow: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.message {
  max-width: 70%;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background-color: #e9ecef;
  align-self: flex-start;
  word-break: break-word;
}

.message.me {
  background-color: #007bff;
  color: #fff;
  align-self: flex-end;
}

.chat-input {
  display: flex;
  padding: 0.75rem;
  background-color: #fff;
  border-top: 1px solid #e9ecef;
}

.chat-input input {
  flex-grow: 1;
  padding: 0.5rem 0.75rem;
  border: 1px solid #ced4da;
  border-radius: 4px;
  margin-right: 0.5rem;
}

.chat-input button {
  padding: 0.5rem 1rem;
}
