.bexts-chatbot-widget {
  display: flex;
  justify-content: center;
  padding: 8px;
  background-color: #202124b5;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.bexts-chatbot-form {
  display: flex;
  align-items: center;
  width: 100%;
  border-radius: 5px;
  overflow: hidden;
}
.bexts-chatbot-input {
  flex-grow: 1;
  padding: 10px 15px;
  border: none;
  outline: none;
  font-size: 16px;
  background: transparent;
  field-sizing: content;
  font-family: var(--primaryfont);
  resize: none;
  color: white;
}
.bexts-chatbot-input::placeholder {
  color: white;
}
.bexts-chatbot-button,
.webchat__microphone-button__button {
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 24px;
  transition: background 0.3s ease;
  background: transparent linear-gradient(132deg, #9a2d28 0%, #e75b31 100%) 0% 0% no-repeat padding-box;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}
#bexts-chatbot-widget-modal .webchat__microphone-button__button {
  width: 44px;
  height: 44px;
}
.bexts-chatbot-button:hover,
#bexts-chatbot-widget-modal .webchat__microphone-button__button:hover {
  background: transparent linear-gradient(132deg, #e75b31 0%, #9a2d28 100%) 0% 0% no-repeat padding-box;
}
#bexts-chatbot-widget-modal .webchat__microphone-button__button svg,
#bexts-chatbot-widget-modal .webchat__microphone-button__button:hover svg {
  fill: white;
}
#bexts-chatbot-widget-modal .webchat__microphone-button__button:hover .webchat__icon-button__shade {
  display: none;
}
.bexts-chatbot-button.button-in-chat {
  margin-right: 8px;
}
body.chatbot-focus {
  padding-right: 0 !important;
  overflow: hidden;
  height: 96vh;
}

body.home .modal-backdrop {
  display: none !important;
}

/* Estilos del modal */
#bexts-chatbot-widget-modal .modal-content {
  justify-content: space-between;
  align-items: center;
  background: #530900 url("/wp-content/uploads/fnd-chatbext.webp") center center / cover;
}

#bexts-chatbot-widget-modal .modal-body {
  width: 90%;
  flex: initial;
  display: flex;
  overflow-y: initial;
  padding: 0;
  margin: auto;
}

#bexts-chatbot-widget-modal .modal-body #close-chatbot {
  border: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 100%;
  padding: 0.8rem;
  width: 40px;
  height: 40px;
  position: absolute;
  top: 0;
  right: -14px;
  background: transparent linear-gradient(132deg, #9a2d28 0%, #e75b31 100%) 0% 0% no-repeat padding-box;
  box-shadow: 0 0 21px -5px black;
  z-index: 10;
}

#bexts-chatbot-widget-modal .modal-body #close-chatbot i {
  color: white;
  font-size: 1rem;
}

#bexts-chatbot-widget-modal .modal-footer {
  border: 0;
  background-color: #ffffff14;
  padding: 0.5rem 2rem;
  color: white;
  margin-top: 2rem;
}

#bexts-chatbot-widget-modal .modal-footer p {
  font-size: 8px;
}

@media screen and (min-width: 1024px) {
  #bexts-chatbot-widget-modal .modal-body {
    width: 70%;
  }

  #bexts-chatbot-widget-modal .modal-footer p {
    font-size: 11px;
  }
}

/* Estilos del chatbot */
#bexts-chatbot-widget-modal #webchat [role="complementary"] {
  width: 100%;
  background: transparent;
}

#bexts-chatbot-widget-modal #bot__wrapper__div {
  width: 100%;
  height: 100%;
  overflow-y: hidden;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: end;
  background-color: transparent;
}

/* Contenedor e input */
#bexts-chatbot-widget-modal .webchat__send-box__main {
  background: #f5f5f51a;
  box-shadow: 0px 0px 8px #00000014;
  border: 0;
  border-radius: 8px;
  padding: 10px;
}

#bexts-chatbot-widget-modal .webchat__send-box__main input {
  color: white;
}

/* Scroll de los mensajes */
#bexts-chatbot-widget-modal .webchat__basic-transcript__scrollable {
  height: 60vh;
  flex-direction: row;
}

#bexts-chatbot-widget-modal .webchat__basic-transcript__scrollable .webchat__basic-transcript__transcript {
  width: 100%;
}

#bexts-chatbot-widget-modal .webchat__basic-transcript__scrollable .webchat__basic-transcript__filler {
  display: none;
}

#bexts-chatbot-widget-modal .webchat__basic-transcript__scrollable::-webkit-scrollbar-track {
  border-radius: 10px;
  background-color: transparent;
}

#bexts-chatbot-widget-modal .webchat__basic-transcript__scrollable::-webkit-scrollbar {
  width: 4px;
  background-color: transparent;
}

#bexts-chatbot-widget-modal .webchat__basic-transcript__scrollable::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background-color: white;
}

/* Mensajes */
#bexts-chatbot-widget-modal .webchat__initialsAvatar:not(.webchat__initialsAvatar--fromUser) {
  background-color: transparent !important;
}
#bexts-chatbot-widget-modal .webchat__stacked-layout.webchat__stacked-layout--from-user .webchat__stacked-layout__attachment-row,
#bexts-chatbot-widget-modal .webchat__stacked-layout.webchat__stacked-layout--from-user .webchat__stacked-layout__main,
#bexts-chatbot-widget-modal .webchat__stacked-layout.webchat__stacked-layout--from-user .webchat__stacked-layout__message-row,
#bexts-chatbot-widget-modal .webchat__stacked-layout.webchat__stacked-layout--from-user .webchat__stacked-layout__status {
  flex-direction: row;
}

#bexts-chatbot-widget-modal .webchat__bubble .webchat__bubble__content p {
  font-size: 18px;
  line-height: 20px;
  animation: fadeInAnimation 1s ease-out;
}

#bexts-chatbot-widget-modal .webchat__bubble .webchat__bubble__content p a {
  color: var(--brcolorsecondary);
}

#bexts-chatbot-widget-modal .webchat__bubble.webchat__bubble--from-user .webchat__bubble__content p {
  font-size: 32px;
  line-height: 32px;
}

#bexts-chatbot-widget-modal .webchat__stacked-layout__status {
  display: none;
}

/* Tarjeta interactiva */
#bexts-chatbot-widget-modal .webchat__adaptive-card-renderer .ac-columnSet {
  flex-direction: column;
  gap: 7px;
  margin: 10px 0 !important;
}

#bexts-chatbot-widget-modal .webchat__adaptive-card-renderer .webchat__render-markdown p {
  color: white;
}

#bexts-chatbot-widget-modal .webchat__adaptive-card-renderer .ac-pushButton {
  background: transparent linear-gradient(106deg, #4e1615 0%, #9a2d28 38%, #c80a00 100%) 0% 0% no-repeat padding-box;
  border-radius: 28px;
  color: white;
  border: 0;
  width: fit-content;
  margin: 0 auto;
  padding: 10px 40px;
}

#bexts-chatbot-widget-modal .webchat__adaptive-card-renderer .ac-pushButton > div {
  white-space: initial !important;
  line-height: 1.1;
}

/* Adaptive card renderd (form) */
#bexts-chatbot-widget-modal .webchat__adaptive-card-renderer span:first-child {
  color: white !important;
}

#bexts-chatbot-widget-modal .webchat__adaptive-card-renderer span:last-child {
  color: var(--brcolorsecondary);
}

#bexts-chatbot-widget-modal .webchat__adaptive-card-renderer input {
  border: 0;
  border-radius: 8px;
  padding: 5px 10px;
  margin: 5px 0;
}

@media screen and (min-width: 1024px) {
  #bexts-chatbot-widget-modal .webchat__adaptive-card-renderer .ac-columnSet {
    flex-direction: row;
    align-items: center;
  }
}

@media screen and (min-width: 1440px) {
  #bexts-chatbot-widget-modal .webchat__adaptive-card-renderer #Name,
  #bexts-chatbot-widget-modal .webchat__adaptive-card-renderer #Phone,
  #bexts-chatbot-widget-modal .webchat__adaptive-card-renderer #Company,
  #bexts-chatbot-widget-modal .webchat__adaptive-card-renderer #Email,
  #bexts-chatbot-widget-modal .webchat__adaptive-card-renderer #Detail {
    width: 50%;
    margin: 0 auto;
  }
}

@keyframes fadeInAnimation {
  from {
    opacity: 0;
    transform: "translateY(5px)";
  }
  to {
    opacity: 1;
    transform: "translateY(0)";
  }
}
