:root {
  --teal: #008f8f;
  --teal-dark: #025f5f;
  --teal-light: #5b8f8f;
  --text: #4a4b4c;
  --title: #212121;
  --white-link: #e4fbfd;
  --radius: 20px;
}

.chat-toggle-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  border-radius: 18px;
  font-size: 24px;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), #008f8fc4);
  border: none;
  box-shadow: 0 20px 35px rgba(15, 23, 42, 0.25);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: pointer;
  z-index: 1100;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}
.chat-toggle-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 40px rgba(15, 23, 42, 0.3);
}
.chatbot-sidebar {
  position: fixed;
  bottom: 92px;
  right: 24px;
  width: min(24rem, calc(100vw - 32px));
  height: 35rem;
  max-height: calc(100vh - 140px);
  display: flex;
  flex-direction: column;
  color: #0f172a;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  transform: translateY(130%);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.35s ease,
    opacity 0.35s ease;
  overflow: hidden;
  z-index: 1050;
  margin: 0;
  padding: 0;
}
.chatbot-sidebar.active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.chatbot-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.65) 0%,
    rgba(255, 255, 255, 0.35) 50%,
    rgba(255, 255, 255, 0.50) 100%
  );
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}
.chatbot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem 1rem;
}
.chatbot-title {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.chatbot-heading {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.chatbot-status {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.18);
  animation: chatbot-status-pulse 2.5s infinite ease-out;
}
@keyframes chatbot-status-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.3);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(13, 110, 253, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(13, 110, 253, 0);
  }
}
.chatbot-name {
  font-weight: 600;
  color: #0f172a;
  font-size: 1rem;
}
.chatbot-subtitle {
  display: block;
  margin-top: 2px;
  color: rgba(15, 23, 42, 0.65);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}
.chatbot-close {
  opacity: 0.5;
  transition: opacity 0.2s ease;
}
.chatbot-close:hover {
  opacity: 1;
}
.chatbot-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
}
.chatbox-scroll,
#chatBox {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem 0 1.25rem;
  overflow-y: auto;
  scroll-behavior: smooth;
  color: #0f172a;
  padding: 0 1.5rem;
}
#chatBox::-webkit-scrollbar {
  width: 6px;
}
#chatBox::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.25);
  border-radius: 999px;
}
.chatbot-footer {
  padding: 1rem 1.5rem 1.5rem;
}
.chat-input {
  font-family: inherit;
  font-size: 14px;
}
.chat-input .input-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem;
  background: #ffffff;
  border-radius: 16px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
#msg {
  flex: 1;
  border: none;
  background: transparent;
  color: #0f172a;
  font-size: 0.95rem;
  padding: 0.5rem 1.25rem;
  height: auto;
}
#msg::placeholder {
  color: rgba(15, 23, 42, 0.45);
}
#msg:focus {
  box-shadow: none;
}
.chat-input .btn {
  border-radius: 12px !important;
  padding: 0.5rem 1.25rem;
  font-weight: 600;
  border: none;
  background: var(--teal);
  box-shadow: 0 10px 20px rgb(0 150 136 / 19%)
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}
.chat-input .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgb(0 150 136 / 39%)
}
.chatbot-sidebar,
.bubble {
  font-family: inherit;
  font-size: 14px;
}
.msg {
  margin-bottom: 10px;
  display: flex;
}
.user {
  justify-content: flex-end;
}
.assistant {
  justify-content: flex-start;
}
.bubble {
  padding: 0.75rem 1rem;
  border-radius: 18px;
  font-size: 0.92rem;
  line-height: 1.5;
  max-width: 78%;
  word-wrap: break-word;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.typing-bubble {
  display: flex;
  gap: 4px;
  padding: 10px 12px;
}
.typing-bubble span {
  width: 6px;
  height: 6px;
  background: #666;
  border-radius: 50%;
  display: inline-block;
  animation: blink 1.4s infinite both;
}
.typing-bubble span:nth-child(2) { animation-delay: 0.2s; }
.typing-bubble span:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink {
  0% { opacity: 0.2; transform: translateY(0); }
  20% { opacity: 1; transform: translateY(-3px); }
  40% { opacity: 0.2; transform: translateY(0); }
  100% { opacity: 0.2; transform: translateY(0); }
}
.user .bubble {
  margin-left: auto;
  background: linear-gradient(135deg, var(--teal), #008f8fc4);
  color: #fff;
  border-bottom-right-radius: 6px;
}
.assistant .bubble {
  background: rgba(255, 255, 255, 0.75);
  color: #0f172a;
  border: none;
  border-bottom-left-radius: 6px;
}
@media (max-width: 576px) {
  .chatbot-sidebar {
    right: 16px;
    left: 16px;
    width: auto;
    height: calc(100vh - 120px);
    bottom: 96px;
    border-radius: 20px;
  }
  .chatbot-header {
    padding: 1.1rem 1.25rem 0.85rem;
  }
  .chatbot-body {
    padding: 0 1.25rem;
  }
  .chatbot-footer {
    padding: 1rem 1.25rem 1.35rem;
  }
}
.bubble.examples {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  background: transparent;
  box-shadow: none;
}
.example-btn {
  display: block;
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--teal);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.22);
  color: var(--teal);
  font-size: 0.85rem;
  text-align: left;
  cursor: pointer;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition:
    transform 0.2s ease,
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}
.example-btn:hover {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(13, 110, 253, 0.3);
}
