.chatbot-fixo {
  position: fixed;
  display: flex;
  height: 122px;
  padding: var(--spacing-small-xs, 16px) var(--no-space, 0)
    var(--spacing-small-xs, 16px) var(--spacing-small-md, 24px);
  justify-content: start;
  align-items: center;
  gap: 20px;
  border-radius: var(--border-radius-pill, 9999px);
  border: 3px solid var(--Degrad-Campanha, #ffbb39);
  background: #f9fafb;
  box-shadow: 0 5px 14px -1px rgba(0, 0, 0, 0.12);
  z-index: 9999;
  bottom: 10%;
  right: 30px;
  width: 360px;
  cursor: pointer;
  /* Todas as thumbs terão o mesmo tipo de movimento */
  /* Pequeno descompasso para parecer natural */
}
.chatbot-fixo .chatbot-texto {
  display: flex;
  width: 128px;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}
.chatbot-fixo h3 {
  color: var(
    --senai-color-secundary-700,
    var(--senai-color-secondary-700, #f1710b)
  );
  text-align: right;
  font-family: "Open Sans";
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 100%;
  /* 14px */
}
.chatbot-fixo h1 {
  color: var(
    --senai-color-secundary-900,
    var(--senai-color-secondary-900, #d4421e)
  );
  text-align: right;
  font-family: "Open Sans";
  font-size: 20px;
  font-style: normal;
  font-weight: 700;
  line-height: 100%;
  /* 20px */
}
.chatbot-fixo .chatbot-imgs {
  display: flex;
  flex-grow: 1;
  height: 100%;
  position: relative;
}
.chatbot-fixo .thumb-1,
.chatbot-fixo .thumb-2,
.chatbot-fixo .thumb-3 {
  width: 64px;
  height: 64px;
  aspect-ratio: 1/1;
  filter: grayscale(1);
  animation: floatThumb 3.5s ease-in-out infinite;
}
.chatbot-fixo .thumb-1 {
  position: absolute;
  top: -20%;
  left: 0px;
  animation-delay: 0s;
}
.chatbot-fixo .thumb-2 {
  position: absolute;
  top: -50%;
  left: 34%;
  animation-delay: 0.8s;
}
.chatbot-fixo .thumb-3 {
  position: absolute;
  top: -20%;
  right: 0px;
  animation-delay: 1.6s;
}
.chatbot-fixo .estrela {
  transform: translate(-50%, -50%);
  bottom: -102px;
  left: 50%;
  position: absolute;
  width: 191px;
}
@keyframes floatThumb {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
  100% {
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .section__chatbot .chatbot-texto {
    display: none;
  }
  .section__chatbot .chatbot-fixo {
    display: flex;
    width: 99px;
    height: 99px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    padding: 0;
    border: none;
    border-radius: var(--border-radius-pill, 9999px);
    background: var(--global-color-alpha-white-200, rgba(255, 255, 255, 0.2));
    /* Shadows/dark-md */
    box-shadow: 0 8px 12px -3px rgba(0, 0, 0, 0.5);
  }
  .section__chatbot .estrela {
    width: 132px;
    height: 74px;
    flex-shrink: 0;
    aspect-ratio: 66/37;
  }
  .section__chatbot .thumb-1,
  .section__chatbot .thumb-2,
  .section__chatbot .thumb-3 {
    width: 48px;
    height: 48px;
    aspect-ratio: 1/1;
  }
  .section__chatbot .chatbot-imgs {
    width: 100%;
  }
  .section__chatbot .thumb-1 {
    top: 25%;
    left: -10px;
  }
  .section__chatbot .thumb-3 {
    top: 25%;
    right: -10px;
  }
  .section__chatbot .thumb-2 {
    top: 12%;
  }
  .section__chatbot .estrela {
    bottom: -60px;
  }
}
/* Modal Overlay */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  backdrop-filter: blur(2px);
  animation: fadeIn 0.3s ease;
}

.modal-overlay.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes slideIn {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}
/* Modal Lateral */
.chat-modal {
  position: fixed;
  bottom: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: 600px;
  padding: 20px;
  gap: 20px;
  border-radius: 16px;
  background: #272727;
  z-index: 10000;
  /* Estado inicial (fora da tela) */
  transform: translateX(100%) scale(0.95);
  opacity: 0;
  visibility: hidden;
  /* ⚡ Transição suave de slide + crescimento */
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease,
    visibility 0.4s ease;
  transform-origin: bottom right;
  /* Ponto fixo no canto inferior direito */
}

/* Quando o modal estiver ativo (visível) */
/* Quando o modal estiver ativo (visível) */
.chat-modal.active {
  transform: translateX(0) scale(1);
  opacity: 1;
  visibility: visible;
}

/* ===== Tela Cheia — Crescimento real e suave ===== */
.chat-modal.fullscreen {
  width: 100vw;
  height: 100vh;
  bottom: 0;
  right: 0;
  border-radius: 0;
  /* Ponto fixo no canto inferior direito */
  transform-origin: bottom right;
  /* Crescimento diagonal proporcional */
  transform: scale(1) translate(0, 0);
  animation: growDiagonal 0.7s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

/* 🔹 Animação de crescimento diagonal */
@keyframes growDiagonal {
  0% {
    width: 600px;
    height: 608px;
    transform: scale(1) translate(0, 0);
  }
  100% {
    width: 100%;
    height: 100%;
    transform: scale(1) translate(0, 0);
  }
}
.chat-modal:not(.fullscreen).shrink {
  animation: shrinkDiagonal 0.7s cubic-bezier(0.25, 1, 0.5, 1) backwards;
}

@keyframes shrinkDiagonal {
  0% {
    width: 100vw;
    height: 100vh;
    transform: translate(0, 0);
  }
  100% {
    width: 600px;
    height: 606px;
    transform: translate(0, 0);
  }
}
.chat-modal.shrink {
  transform-origin: bottom right;
  animation: shrinkDiagonal 0.7s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

/* Header do Modal */
.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  align-self: stretch;
}

.fullscreen-modal {
  display: flex;
  justify-content: center;
  align-items: center;
  border: none;
  background: none;
  gap: 8px;
  color: var(--global-color-newton-white, var(--newton-white, #fff));
  font-family: "Open Sans";
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 150%;
  cursor: pointer;
  border-radius: 8px;
  padding: 4px;
  /* 21px */
}

@media (max-width: 768px) {
  .fullscreen-modal {
    display: none;
  }
  .chat-header {
    justify-content: flex-end;
  }
}
.fullscreen-modal:hover {
  background: rgba(255, 255, 255, 0.3);
}

.chat-header-content {
  flex: 1;
}

.chat-header-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.chat-header-subtitle {
  font-size: 14px;
  font-weight: 400;
  opacity: 0.9;
  line-height: 1.4;
}

.close-modal {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 24px;
  padding: 4px;
  line-height: 1;
}

.close-modal:hover {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 8px;
}

/* Área de Mensagens */
.chat-content {
  display: flex;
  height: 440px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: var(--spacing-small-3xl, 40px);
  align-self: stretch;
  border-radius: var(--border-radius-xs, 4px);
  background: var(--global-color-alpha-white-100, rgba(255, 255, 255, 0.1));
  overflow: hidden;
}

.bot-message-block {
  display: flex;
  max-width: 85%;
  padding-left: 12px;
}
.bot-message-block .bot-message {
  border-bottom-left-radius: 16px;
  border-top-left-radius: 4px;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.bot-avatar {
  width: 96px;
  height: 96px;
}

.chat-content.fullscreen {
  height: 100%;
}

.message-list {
  flex-direction: column;
  height: 100%;
  gap: 12px;
  padding-top: 12px;
  padding-bottom: 12px;
  display: none;
  overflow-y: scroll;
}

.message-list.fullscreen {
  width: 100%;
}

.user-message,
.bot-message {
  padding: 12px 16px;
  border-radius: 16px;
  max-width: 80%;
  word-wrap: break-word;
  line-height: 1.5;
}

.user-message {
  background: #192a6b;
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  margin-right: 12px;
}

.bot-message {
  background: white;
  color: #333;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-left: 12px;
}

/* Overlay Inicial */
.chat-overlay {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
  gap: 24px;
  height: 100%;
}

.chat-overlay.hidden {
  display: none;
}

.logo-gif {
  width: 120px;
  height: auto;
  margin-bottom: 20px;
}

.lgpd_container-chat {
  width: 100%;
  max-width: 350px;
}

.checkLGPD0-chat {
  margin-bottom: 16px;
}

.checkLGPD-chat > div:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkLGPD-chat input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.txt-termos-chat {
  color: var(--global-color-newton-white, var(--newton-white, #fff));
  text-align: center;
  /* label/regular-400/normal/sm */
  font-family: "Open Sans";
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 120%;
  /* 16.8px */
}

.openTerm-chat {
  color: #fff;
  text-decoration: underline;
  cursor: pointer;
  font-weight: 600;
}

.lgpd-error-chat {
  color: #d32f2f;
  font-size: 12px;
  margin-top: 8px;
}

.start-button {
  background: linear-gradient(135deg, #db9434 0%, #e5bc7b 100%);
  color: #192a6b;
  border: none;
  padding: 14px 32px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s;
  box-shadow: 0 4px 12px rgba(219, 148, 52, 0.3);
}

.start-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(219, 148, 52, 0.4);
}

.start-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Footer do Chat */
.chat-footer {
  width: 100%;
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.input-inside-box {
  display: flex;
  height: 56px;
  padding: 15px 16px;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 8px;
  flex: 1 0 0;
  border-radius: 12px;
  background: #fff;
  /* Shadow / 700 */
  box-shadow: 0 8px 22px -6px rgba(24, 39, 75, 0.12),
    0 14px 64px -4px rgba(24, 39, 75, 0.12);
}

.input-inside-box:focus {
  outline: none;
  border-color: #192a6b;
}

.input-inside-box:disabled {
  background: #f5f5f5;
  cursor: not-allowed;
}

.send-button {
  width: 56px;
  height: 56px;
  aspect-ratio: 1/1;
  padding: 0px;
  background: var(--senai-color-secondary-p, #ff9500);
  border-radius: 100px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.send-button:hover:not(:disabled) {
  background: #2a4494;
  transform: scale(1.05);
}

.send-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Responsivo */
@media (max-width: 768px) {
  .chat-modal {
    width: 100%;
  }
  .chatbot-fixo {
    max-width: 280px;
    padding: 15px 20px;
  }
  .chatbot-texto h1 {
    font-size: 16px;
  }
  .chatbot-texto h3 {
    font-size: 12px;
  }

  .bot-avatar {
    width: 60px;
    height: 60px;
  }
}
/* Termo LGPD */
.textLGPD-chat {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1002;
  padding: 40px 20px;
  overflow-y: auto;
}

.textLGPD-chat.termoAberto {
  display: flex;
  align-items: center;
  justify-content: center;
}

.textLGPD-chat p {
  background: white;
  padding: 30px;
  border-radius: 12px;
  max-width: 600px;
  position: relative;
  line-height: 1.6;
  color: #333;
}

.fechar-termo {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 24px;
  cursor: pointer;
  font-weight: bold;
  color: #192a6b;
}

.extern-term {
  color: #192a6b;
  text-decoration: underline;
}
