
.chatbot-container {
  margin: 0;
  font-family: sans-serif;
  background: #fff;
}

/* Greeting bubble */
#greeting {
  position: fixed;
  bottom: 100px;
  /* bottom: 170px; */
  right: 20px;
  background: rgb(66, 52, 118);
  color: #fff;
  padding: 10px 15px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
  cursor: pointer;
  pointer-events: none;
  max-width: 200px;
  text-align: center;
  z-index: 1001;
}
#greeting.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* avatar toggle button */
#chat-toggle {
  position: fixed;
  bottom: 20px;
  /* bottom: 90px; */
  right: 20px;
  width: 75px;       /* was 60px */
  height: 75px;      /* was 60px */
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: opacity 0.3s;
  z-index: 1001;
}
#chat-toggle.hidden {
  opacity: 0;
  pointer-events: none;
}

/* Chat widget */
#chat-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 400px;
  height: 600px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border-radius: 8px;
  overflow: hidden;
  background: #f7f7f7;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1000;
}
#chat-widget.open {
  opacity: 1;
  pointer-events: auto;
}

/* Top bar */
#chat-header {
  background: rgb(66, 52, 118);
  color: #fff;
  padding: 10px;
  cursor: pointer;
  user-select: none;
  font-size: 16px;
  position: relative;
  padding-right: 30px;
}

#chat-widget.open #chat-header::after {
  content: "▼";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  pointer-events: none;
}

/* Role-selection pill buttons with gradient border */
.choice-btn {
  padding: 8px 20px;
  margin: 0 5px;
  font-size: 14px;
  font-weight: 500;
  color: rgb(66, 52, 118);
  background:
    linear-gradient(white, white) padding-box,
    linear-gradient(45deg, rgb(66, 52, 118), rgb(202, 64, 124)) border-box;
  border: 2px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
}
.choice-btn:hover {
  background:
    linear-gradient(45deg, rgb(66, 52, 118), rgb(202, 64, 124)) padding-box,
    linear-gradient(45deg, rgb(66, 52, 118), rgb(202, 64, 124)) border-box;
  color: #fff;
}

/* Chat body */
#chat-body {
  display: none;
  flex: 1;
  flex-direction: column;
  height: calc(100% - 40px);
}
#messages {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.message {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 12px;
  margin: 4px 0;
  max-width: 80%;
  line-height: 1.4;
  word-wrap: break-word;
}
.message.user {
  background: rgb(202, 64, 124);
  color: #fff;
  align-self: flex-end;
  margin-left: auto;
  text-align: right;
}
.message.bot {
  background: #e5e5ea;
  color: #000;
  align-self: flex-start;
  margin-right: auto;
  text-align: left;
}

/* Spinner-dot typing indicator */
.typing {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0;
  align-self: flex-start;
}
.spinner-dot {
  width: 10px;
  height: 10px;
  border: 2px solid;
  border-color: rgba(66, 52, 118, 0.3);
  border-right-color: rgb(202, 64, 124);
  border-top-color: rgb(66, 52, 118);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Input bar & send button */
#chat-form {
  display: flex;
  background: #f7f7f7;
  padding: 8px;
}
#chat-input {
  flex: 1;
  border: 1px solid #ccc;
  padding: 10px 14px;
  font-size: 14px;
  outline: none;
  border-radius: 20px;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
  transition: border-color 0.3s ease;
}
#chat-input:focus {
  border-color: rgb(66, 52, 118);
}
#chat-form button {
  margin-left: 8px;
  padding: 10px 18px;
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 20px;
  background: linear-gradient(45deg, rgb(66, 52, 118), rgb(202, 64, 124));
  color: white;
  cursor: pointer;
  transition: opacity 0.3s ease, transform 0.2s ease;
}
#chat-form button:hover {
  opacity: 0.9;
  transform: scale(1.05);
}
#chat-form button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 600px) {
  #chat-widget.open {
    width: 100%;
    max-height: 60vh;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 12px 12px 0 0;
  }
  #chat-header {
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
  }

  #chat-form {
    padding: 0;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
  }

  #chat-input {
    padding: 14px;
    font-size: 18px;
  }

  #chat-form button {
    padding: 0 20px;
    font-size: 24px;
    align-self: stretch;
  }
}
/* 
 Move reCAPTCHA v3 badge to the left */
 
 .grecaptcha-badge {
  width: 70px !important;
  overflow: hidden !important;
  transition: all 0.3s ease !important;
  left: 0px !important;
}
.grecaptcha-badge:hover {
  width: 256px !important;
}