.ao-chatbot {
  position: fixed;
  right: 24px;
  bottom: 86px;
  z-index: 99998;
  font-family: inherit;
}

.ao-chatbot * {
  box-sizing: border-box;
}

.ao-chatbot__toggle {
  width: 62px;
  height: 62px;
  border: 0;
  border-radius: 50%;
  background: #1f1a5d;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 18px 38px rgba(20, 18, 70, 0.28);
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.ao-chatbot__toggle:hover,
.ao-chatbot__toggle:focus-visible {
  background: #307af6;
  transform: translateY(-2px);
}

.ao-chatbot__toggle i {
  font-size: 25px;
  line-height: 1;
}

.ao-chatbot__panel {
  position: absolute;
  right: 0;
  bottom: 78px;
  width: 390px;
  max-width: calc(100vw - 32px);
  max-height: min(680px, calc(100vh - 130px));
  background: #fff;
  border: 1px solid rgba(31, 26, 93, 0.12);
  border-radius: 8px;
  box-shadow: 0 24px 64px rgba(20, 18, 70, 0.24);
  overflow: hidden;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.ao-chatbot--open .ao-chatbot__panel {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.ao-chatbot__header {
  background: #1f1a5d;
  color: #fff;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.ao-chatbot__title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
}

.ao-chatbot__status {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.78);
}

.ao-chatbot__close {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.ao-chatbot__close:hover,
.ao-chatbot__close:focus-visible {
  background: rgba(255, 255, 255, 0.12);
}

.ao-chatbot__messages {
  height: 360px;
  max-height: calc(100vh - 370px);
  min-height: 260px;
  padding: 18px;
  background: #f6f8fc;
  overflow-y: auto;
}

.ao-chatbot__message {
  display: flex;
  margin-bottom: 12px;
}

.ao-chatbot__message--user {
  justify-content: flex-end;
}

.ao-chatbot__bubble {
  width: fit-content;
  max-width: 86%;
  padding: 11px 13px;
  border-radius: 8px;
  background: #fff;
  color: #14132b;
  font-size: 14px;
  line-height: 1.55;
  box-shadow: 0 6px 20px rgba(20, 18, 70, 0.08);
}

.ao-chatbot__message--user .ao-chatbot__bubble {
  background: #307af6;
  color: #fff;
}

.ao-chatbot__bubble p {
  margin: 0 0 8px;
}

.ao-chatbot__bubble p:last-child,
.ao-chatbot__bubble ul:last-child {
  margin-bottom: 0;
}

.ao-chatbot__bubble ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.ao-chatbot__bubble li {
  margin: 4px 0;
}

.ao-chatbot__bubble a {
  color: #1d65d8;
  font-weight: 700;
  text-decoration: underline;
}

.ao-chatbot__message--user .ao-chatbot__bubble a {
  color: #fff;
}

.ao-chatbot__quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 18px;
  border-top: 1px solid rgba(31, 26, 93, 0.1);
  background: #fff;
}

.ao-chatbot__quick button,
.ao-chatbot__link {
  border: 1px solid rgba(31, 26, 93, 0.16);
  border-radius: 6px;
  background: #fff;
  color: #1f1a5d;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ao-chatbot__quick button:hover,
.ao-chatbot__quick button:focus-visible,
.ao-chatbot__link:hover,
.ao-chatbot__link:focus-visible {
  border-color: #307af6;
  color: #307af6;
}

.ao-chatbot__composer {
  display: flex;
  gap: 8px;
  padding: 14px 18px 18px;
  background: #fff;
}

.ao-chatbot__input {
  flex: 1;
  min-width: 0;
  height: 42px;
  border: 1px solid rgba(31, 26, 93, 0.18);
  border-radius: 6px;
  padding: 0 12px;
  color: #14132b;
  font: inherit;
  font-size: 14px;
}

.ao-chatbot__input:focus {
  border-color: #307af6;
  outline: 0;
}

.ao-chatbot__send {
  width: 46px;
  height: 42px;
  border: 0;
  border-radius: 6px;
  background: #1f1a5d;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ao-chatbot__send:hover,
.ao-chatbot__send:focus-visible {
  background: #307af6;
}

.ao-chatbot__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.ao-chatbot__whatsapp {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
}

.ao-chatbot__whatsapp:hover,
.ao-chatbot__whatsapp:focus-visible {
  background: #12823d;
  border-color: #12823d;
  color: #fff;
}

@media (max-width: 575px) {
  .ao-chatbot {
    right: 16px;
    bottom: 78px;
  }

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

  .ao-chatbot__panel {
    right: -2px;
    bottom: 72px;
    width: calc(100vw - 28px);
    max-height: calc(100vh - 116px);
  }

  .ao-chatbot__messages {
    height: 330px;
    max-height: calc(100vh - 340px);
  }
}
