
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Manrope", sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  height: 100vh;
  overflow: hidden;
}

.chat-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-width: 800px;
  margin: 0 auto;
  background: white;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
}


.chat-header {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: white;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.clinic-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-logo {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.3);
}

.clinic-info h1 {
  font-family: "Outfit", sans-serif;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 5px;
}

.clinic-info p {
  font-size: 14px;
  opacity: 0.9;
}

.close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 32px;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s ease;
}

.close-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
}


.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: #f8f9fa;
}

.message {
  display: flex;
  margin-bottom: 20px;
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  flex-shrink: 0;
}

.bot-message .message-avatar {
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
}

.user-message .message-avatar {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
}

.message-content {
  flex: 1;
  background: white;
  padding: 15px 18px;
  border-radius: 18px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: relative;
}

.bot-message .message-content {
  margin-right: 60px;
}

.user-message .message-content {
  margin-left: 60px;
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
}

.user-message {
  flex-direction: row-reverse;
}

.user-message .message-avatar {
  margin-right: 0;
  margin-left: 12px;
}

.message-content p {
  margin-bottom: 10px;
  line-height: 1.6;
}

.message-content p:last-child {
  margin-bottom: 0;
}

.message-content ul {
  margin: 10px 0;
  padding-left: 20px;
}

.message-content li {
  margin-bottom: 5px;
  line-height: 1.5;
}

.error-message .message-content {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}


.quick-actions {
  padding: 15px 20px;
  background: white;
  border-top: 1px solid #e9ecef;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.quick-btn {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border: 1px solid #dee2e6;
  color: #495057;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.quick-btn:hover {
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
  border-color: #007bff;
  transform: translateY(-1px);
}


.chat-input-container {
  background: white;
  border-top: 1px solid #e9ecef;
  padding: 20px;
}

.input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  background: #f8f9fa;
  border-radius: 25px;
  padding: 8px;
  border: 2px solid #e9ecef;
  transition: border-color 0.3s ease;
}

.input-wrapper:focus-within {
  border-color: #007bff;
}

#messageInput {
  flex: 1;
  border: none;
  background: none;
  padding: 12px 16px;
  font-size: 16px;
  font-family: "Manrope", sans-serif;
  resize: none;
  outline: none;
  min-height: 20px;
  max-height: 120px;
  line-height: 1.4;
}

#messageInput::placeholder {
  color: #6c757d;
}

#sendBtn {
  background: linear-gradient(135deg, #007bff, #0056b3);
  border: none;
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

#sendBtn:hover:not(:disabled) {
  background: linear-gradient(135deg, #0056b3, #004085);
  transform: scale(1.05);
}

#sendBtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.input-footer {
  margin-top: 10px;
  text-align: center;
}

.input-footer small {
  color: #6c757d;
  font-size: 12px;
}


.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  z-index: 1000;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.loading-overlay p {
  color: white;
  font-size: 16px;
  font-weight: 500;
}


@media (max-width: 768px) {
  .chat-container {
    height: 100vh;
    border-radius: 0;
  }

  .clinic-info h1 {
    font-size: 20px;
  }

  .clinic-info p {
    font-size: 12px;
  }

  .header-logo {
    width: 40px;
    height: 40px;
  }

  .message-content {
    padding: 12px 15px;
  }

  .bot-message .message-content {
    margin-right: 40px;
  }

  .user-message .message-content {
    margin-left: 40px;
  }

  .quick-actions {
    padding: 10px 15px;
  }

  .quick-btn {
    font-size: 12px;
    padding: 6px 12px;
  }

  .chat-input-container {
    padding: 15px;
  }
}

@media (max-width: 480px) {
  .quick-actions {
    flex-direction: column;
  }

  .quick-btn {
    width: 100%;
    text-align: center;
  }

  .header-content {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
  }
}
