.chatbot {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1000;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

.chatbot__prompt {
  position: absolute;
  right: 10px;
  bottom: 82px;
  width: max-content;
  max-width: min(260px, calc(100vw - 52px));
  padding: 15px 19px;
  border: 2px solid #0f766e;
  border-radius: 30px;
  color: #0f172a;
  background: #e8fff8;
  box-shadow: 0 18px 44px rgba(18, 27, 45, 0.22), 0 8px 20px rgba(22, 132, 102, 0.16);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
  pointer-events: none;
  animation: chatbot-cloud-in 0.65s ease both, chatbot-cloud-float 4.8s ease-in-out 0.9s infinite;
}

.chatbot__prompt::before {
  content: "";
  position: absolute;
  left: 22px;
  top: -14px;
  width: 30px;
  height: 30px;
  border-top: 2px solid #0f766e;
  border-left: 2px solid #0f766e;
  border-radius: 50%;
  background: #e8fff8;
  box-shadow: 34px -7px 0 8px #e8fff8, 34px -9px 0 8px #0f766e, 76px 1px 0 2px #e8fff8, 76px -1px 0 2px #0f766e;
  z-index: -1;
}

.chatbot__prompt::after {
  content: "";
  position: absolute;
  right: 22px;
  bottom: -9px;
  width: 16px;
  height: 16px;
  border-right: 2px solid #0f766e;
  border-bottom: 2px solid #0f766e;
  background: #e8fff8;
  transform: rotate(45deg);
}

.chatbot__toggle {
  position: relative;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border: 0;
  border-radius: 50%;
  color: #ffffff;
  background: #168466;
  box-shadow: 0 14px 32px rgba(22, 132, 102, 0.26);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: chatbot-button-pulse 3.8s ease-in-out infinite;
}

.chatbot__toggle:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(22, 132, 102, 0.34);
}

.chatbot__toggle-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
}

.chatbot__toggle-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.chatbot__panel {
  width: min(380px, calc(100vw - 28px));
  height: min(620px, calc(100vh - 28px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 22px 70px rgba(18, 27, 45, 0.26);
}

.chatbot__panel[hidden] {
  display: none;
}

.chatbot__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  color: #ffffff;
  background: #171717;
}

.chatbot__header strong,
.chatbot__header span {
  display: block;
}

.chatbot__header span {
  margin-top: 3px;
  color: #bec7d4;
  font-size: 12px;
}

.chatbot__close {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.chatbot__messages {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  padding: 16px;
  background: #f4f6f9;
}

.chatbot__message {
  max-width: 86%;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.42;
  white-space: pre-wrap;
}

.chatbot__message--bot {
  align-self: flex-start;
  color: #1f2937;
  background: #ffffff;
  border: 1px solid #dde3ed;
}

.chatbot__message--user {
  align-self: flex-end;
  color: #ffffff;
  background: #168466;
}

.chatbot__message--status {
  align-self: flex-start;
  color: #667085;
  background: transparent;
  border: 0;
  padding-left: 0;
}

.chatbot__quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.chatbot__quick-replies button {
  min-height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 0 12px;
  color: #171717;
  background: #ffffff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.chatbot__quick-replies button:hover {
  border-color: #168466;
  color: #168466;
}

.chatbot__form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid #dde3ed;
  background: #ffffff;
}

.chatbot__form input {
  min-width: 0;
  flex: 1;
  height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 0 12px;
  font-size: 14px;
}

.chatbot__form button {
  height: 42px;
  border: 0;
  border-radius: 6px;
  padding: 0 14px;
  color: #ffffff;
  background: #171717;
  cursor: pointer;
  font-weight: 700;
}

.chatbot__form button:disabled,
.chatbot__form input:disabled {
  cursor: not-allowed;
  opacity: 0.64;
}

.chatbot__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@keyframes chatbot-cloud-in {
  from {
    opacity: 0;
    transform: translate(18px, 16px) scale(0.86);
  }

  to {
    opacity: 1;
    transform: translate(0, 0) scale(1);
  }
}

@keyframes chatbot-cloud-float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}

@keyframes chatbot-button-pulse {
  0%,
  100% {
    box-shadow: 0 14px 32px rgba(22, 132, 102, 0.26);
  }

  45% {
    box-shadow: 0 14px 32px rgba(22, 132, 102, 0.26), 0 0 0 10px rgba(22, 132, 102, 0.1);
  }
}

@media (max-width: 520px) {
  .chatbot {
    right: 14px;
    bottom: 14px;
  }

  .chatbot__prompt {
    right: 4px;
    bottom: 70px;
    max-width: calc(100vw - 36px);
    padding: 11px 14px;
    font-size: 13px;
  }

  .chatbot__toggle {
    width: 58px;
    height: 58px;
  }

  .chatbot__panel {
    width: calc(100vw - 28px);
    height: calc(100vh - 28px);
  }
}
