.chat-section {
  padding: 4rem 0;
  background-color: var(--light-purple);
}

.chat-init {
  max-width: 500px;
  margin: 0 auto;
  text-align: center;
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 350px;
}

.name-form {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.name-form input {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

.chat-modal {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 350px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.chat-modal.hidden {
  display: none;
}

.chat-now.hidden {
  display: none;
}

.chat-modal-content {
  display: flex;
  flex-direction: column;
  height: 500px;
}

.chat-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #eee;
}

.chat-init.hidden {
  display: none;
}

.close-chat {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.load-more-messages {
  display: block;
  width: 100%;
  padding: 0.5rem;
  background: var(--light-purple);
  border: none;
  border-radius: 4px;
  color: var(--royal-purple);
  cursor: pointer;
  margin-bottom: 1rem;
  transition: background-color 0.2s;
}

.load-more-messages:hover {
  background: var(--royal-purple);
  color: white;
}

.chat-message {
  max-width: 80%;
  padding: 0.75rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.chat-message.own-message {
  align-self: flex-start;
  background: var(--light-gold);
  border-radius: 8px 8px 8px 0;
}

.chat-message.other-message {
  align-self: flex-end;
  background: #f0f0f0;
  border-radius: 8px 8px 0 8px;
}

.message-content {
  display: flex;
  flex-direction: column;
}

.chat-message strong {
  color: var(--royal-purple);
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.chat-message p {
  margin: 0;
  color: #333;
  word-break: break-word;
}

.chat-message small {
  color: #666;
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.chat-form {
  display: flex;
  padding: 1rem;
  border-top: 1px solid #eee;
  gap: 0.5rem;
}

.chat-form input {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
}

.chat-form button {
  padding: 0.75rem 1.5rem;
}

.send-text {
  display: inline; /* Default: show the text */
}

.send-icon {
  display: none; /* Default: hide the icon */
}

@media (max-width: 768px) {
  .chat-form button {
    padding: 0.2rem 0.7rem;
}

.send-text {
  display: none; /* Hide the text on smaller screens */
}

.send-icon {
  display: inline; /* Show the icon on smaller screens */
}
}