

#chat-toggle {
  position: fixed;
  bottom: 80px;
  right: 20px;
  background-color: #5cb85c;
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 65px;
  height: 65px;
  cursor: pointer;
  font-size: 24px;
  z-index: 1000;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#chat-container {
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  padding: 0;
  position: fixed;
  bottom: 145px;
  right: 20px;
  width: 300px;
  background: #fff;
  box-shadow: 0 0 10px rgba(0,0,0,0.2);
  border-radius: 8px;
  overflow: hidden;
  transform: translateX(100%);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
  pointer-events: none;
  z-index: 9999;
}

/* When chat is open */
#chat-container.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

#chat-container #chat-header {
  background: #5cb85c;
  color: white;
  padding: 16px;
  font-weight: 600;
}

#chat-container #messages {
  padding: 12px;
  height: 320px;
  overflow-y: auto;
  background: #f4f4f8;
}

#chat-container .message {
  max-width: 75%;
  margin-bottom: 10px;
  padding: 10px 14px;
  border-radius: 16px;
  line-height: 1.4;
  word-wrap: break-word;
}

#chat-container .user {
  background-color: #dcfce7;
  align-self: flex-end;
  text-align: right;
}

#chat-container .bot {
  background-color: #e5e7eb;
  align-self: flex-start;
  text-align: left;
}

#chat-container #input-form {
  display: flex;
  padding: 12px;
  border-top: 1px solid #ddd;
  background: #fff;
  flex-direction: column;
}

#chat-container #user-input {
  flex-grow: 1;
  border: 1px solid #ccc;
  border-radius: 30px;
  padding: 14px 20px;
  font-size: 14px;
  outline: none;
}

#chat-container #input-form button {
  margin-left: 4px;
  background: transparent;
  border: none;
  color: white;
  padding: 8px 0px;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 500;
  margin-right: 4px;
}

#chat-container .book-consult {
  margin-left: 8px;
  background: #5cb85c;
  border: none;
  color: white;
  padding: 14px 20px !important;
  border-radius: 30px;
  cursor: pointer;
  font-weight: 500;
}

#chat-container a {
  color: #2563eb;
  text-decoration: underline;
}

#chat-container .secondary-btn {
  background-color: #e0e0e0;
  color: #333;
  border: none;
  border-radius: 8px;
  padding: 12px 16px;
  cursor: pointer;
}

#chat-container .secondary-btn:hover {
  background-color: #d0d0d0;
}

.input-row {
  display: flex;
  gap: 8px;
}

#chat-container #input-form .book-consult {
  background: #5cb85c;
  color: #fff;
}

#chat-container #input-form .book-consult,
#chat-container #input-form #end-chat {
  width: 100%;
  margin: 12px 0 8px 0;
  padding: 12px 16px;
  display: block;
  text-align: center;
  font-size: 13px;
  border-radius: 50px;
  text-decoration: none;
}

#chat-container #input-form #end-chat {
  background-color: #e0e0e0 !important;
  color: #333 !important;
  margin-top: 0;
}

#chat-container .button-row {
  margin-top: 8px;
  text-align: right; /* optional */
}

@media screen and (max-width: 400px) {
    #chat-container {
      bottom: 90px;
      right: 10px;
      max-width: 90%;
    }

    #chat-toggle {
      position: fixed;
      bottom: 30px;
      right: 20px;
    }

    #chat-container #messages {
      height: 200px;
    }
}