#chatbot-toggle {
  position: fixed;
  right: 22px !important;
  bottom: 85px !important;
  width: 64px;
  height: 64px;
  background: #fff;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10001 !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.22);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: .2s ease;
}

#chatbot-toggle:hover {
  transform: translateY(-3px);
}

#chatbot-toggle img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 50%;
}

#chatbot-container {
  position: fixed;
  right: 22px !important;
  bottom: 155px !important;
  width: 420px;
  max-width: calc(100vw - 30px);
  height: 620px;
  max-height: calc(100vh - 170px);
  display: none;
  flex-direction: column;
  border-radius: 6px;
  background: #fff;
  z-index: 10000 !important;
  overflow: hidden;
  box-shadow: 0 18px 45px rgba(0,0,0,.22);
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  font-size: 14px;
}

#chatbot-header {
  background: #365c27;
  color: #fff;
  padding: 18px 22px;
  font-weight: 700;
  font-size: 17px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

#chatbot-header span:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chatbot-header-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: white;
}

#chatbot-close {
  font-size: 18px;
  opacity: .95;
}

#chatbot-body {
  padding: 18px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  line-height: 1.45;
  background: #fff;
  scroll-behavior: smooth;
}

#chatbot-form {
  margin: 0;
  flex-shrink: 0;
  background: #fff;
  padding: 14px 18px 18px;
}

#chatbot-input {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(0,0,0,.12);
}

#chatbot-input input {
  flex: 1;
  border: none;
  outline: none;
  padding: 12px 6px;
  font-size: 15px;
  min-width: 0;
  color: #333;
  background: transparent;
}

#chatbot-input input::placeholder {
  color: #aaa;
}

#chatbot-send {
  all: unset;
  background: #365c27;
  color: #fff;
  width: 46px;
  height: 46px;
  font-size: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: .2s ease;
}

#chatbot-send:hover {
  background: #28451d;
  transform: scale(1.04);
}

.chatbot-msg,
#chatbot-body > div {
  white-space: pre-line;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  margin: 0;
}

.chatbot-msg {
  padding: 14px 16px;
  border-radius: 17px;
  max-width: 88%;
  line-height: 1.45;
  font-size: 14px;
}

.chatbot-msg.bot {
  background: #f2f5f7;
  align-self: flex-start;
  color: #2f3a42;
  text-align: left;
  border-left: none;
}

.chatbot-msg.user {
  background: #2c8c8a;
  align-self: flex-end;
  color: #fff;
  text-align: right;
  border-right: none;
  border-radius: 18px;
  max-width: 75%;
}

.chatbot-msg strong,
#chatbot-body > div strong {
  display: block;
  margin-bottom: 7px;
  font-weight: 700;
}

.chatbot-msg.bot strong {
  color: #365c27;
}

.chatbot-msg.user strong {
  color: #fff;
}

/* Opciones estilo botón */
.chatbot-option {
  width: 100%;
  border: 1px solid #2c8c8a;
  color: #365c27;
  background: #fff;
  border-radius: 999px;
  padding: 10px 14px;
  margin: 9px 0;
  text-align: center;
  font-weight: 600;
  cursor: default;
  box-sizing: border-box;
}

.chatbot-option-number {
  display: none;
}

.chatbot-option span:last-child {
  display: block;
}

/* WhatsApp flotante */
.float {
  right: 22px !important;
  bottom: 150px !important;
  z-index: 9998 !important;
}

/* Flecha subir */
.back-to-top {
  right: 20px !important;
  bottom: 20px !important;
  z-index: 9997 !important;
}


.chatbot-action {
  width: 100%;
  border: 1px solid #2c8c8a;
  background: #fff;
  color: #365c27;
  border-radius: 999px;
  padding: 10px 14px;
  margin: 8px 0;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.chatbot-action:hover {
  background: #2c8c8a;
  color: #fff;
}

.chatbot-action.salir {
  background: #2c8c8a;
  color: #fff;
  border-color: #2c8c8a;
}

.chatbot-action.salir:hover {
  background: #4A908B;
}

/* Mobile */
@media (max-width: 768px) {
  #chatbot-toggle {
    right: 14px !important;
    bottom: 85px !important;
    width: 58px;
    height: 58px;
  }

  #chatbot-toggle img {
    width: 58px;
    height: 58px;
  }

  #chatbot-container {
    width: calc(100% - 24px);
    right: 12px !important;
    bottom: 155px !important;
    height: 74vh;
    max-height: 74vh;
  }

  #chatbot-body {
    font-size: 14px;
  }

  .chatbot-msg {
    max-width: 92%;
  }
}