/* ============================================
   ESTILOS: CHATBOT VAN / ASSISTENTE VIRTUAL
   ============================================ */

/* Container Principal do Chatbot */
.van-chatbot-container {
   position: fixed;
   bottom: 90px; /* Posicionado acima do scrollToTop (20px bottom + 55px altura + 15px espaçamento) */
   right: 20px;
   z-index: 998; /* Abaixo do scrollToTop (z-index: 999) */
   font-family: var(--tp-ff-inter, 'Inter', sans-serif);
}

@media (max-width: 574.98px) {
   .van-chatbot-container {
      bottom: 75px; /* Ajuste para mobile */
   }
}

/* Botão Flutuante do Chatbot */
.van-chatbot-button {
   position: relative;
   width: 55px;
   height: 55px;
   background-color: #cbc6c6;
   cursor: pointer;
   pointer-events: auto;
   z-index: 999;
   border-radius: 50%;
   cursor: pointer;
   overflow: hidden;
   box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
   transition: all 0.3s ease;
   display: flex;
   align-items: center;
   justify-content: center;
}

.van-chatbot-button:hover {
   transform: translateY(-5px);
   box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Ícone do Chatbot */
.van-chatbot-icon {
   position: absolute;
   left: 0;
   top: 0;
   z-index: 3;
   width: 100%;
   height: 100%;
   display: flex;
   align-items: center;
   justify-content: center;
   color: var(--tp-common-black, #030303);
   font-size: 24px;
   transition: color 0.3s ease;
}

.van-chatbot-icon i {
   font-size: 22px;
}

/* Efeito de Água (mesmo do scrollToTop) */
.van-chatbot-water {
   position: absolute;
   left: 0;
   top: 0;
   z-index: 2;
   width: 100%;
   height: 100%;
   transform: translateY(100%);
   background-color: var(--tp-theme-primary, #c4ee18);
   transition: all 0.3s;
   border: 1px solid var(--tp-theme-primary, #c4ee18);
   border-radius: 50%;
}

.van-chatbot-button:hover .van-chatbot-water {
   transform: translateY(0);
}

.van-chatbot-water svg {
   width: 200%;
   position: absolute;
   bottom: 100%;
}

.van-chatbot-water .water_wave_back {
   right: 0;
   fill: var(--tp-theme-primary, #c4ee18);
   animation: wave-back 1.4s infinite linear;
}

.van-chatbot-water .water_wave_front {
   left: 0;
   fill: #7A259EE0;
   margin-bottom: -1px;
   animation: wave-front 0.7s infinite linear;
}

/* Badge de Notificação */
.van-chatbot-badge {
   position: absolute;
   top: -5px;
   right: -5px;
   background-color: #f14f44;
   color: white;
   border-radius: 50%;
   width: 20px;
   height: 20px;
   display: flex;
   align-items: center;
   justify-content: center;
   font-size: 11px;
   font-weight: 600;
   z-index: 4;
   box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Janela do Chat */
.van-chatbot-window {
   position: absolute;
   bottom: 70px;
   right: 0;
   width: 380px;
   height: 600px;
   background: white;
   border-radius: 20px;
   box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
   display: flex;
   flex-direction: column;
   overflow: hidden;
   animation: slideUp 0.3s ease;
}

@keyframes slideUp {
   from {
      opacity: 0;
      transform: translateY(20px);
   }
   to {
      opacity: 1;
      transform: translateY(0);
   }
}

/* Header do Chat */
.van-chatbot-header {
   background: linear-gradient(135deg, var(--tp-theme-primary, #c4ee18) 0%, #a0d010 100%);
   padding: 20px;
   display: flex;
   justify-content: space-between;
   align-items: center;
   color: var(--tp-common-black, #030303);
}

.van-chatbot-header-info {
   display: flex;
   align-items: center;
   gap: 12px;
}

.van-chatbot-avatar {
   width: 45px;
   height: 45px;
   background: rgba(255, 255, 255, 0.3);
   border-radius: 50%;
   display: flex;
   align-items: center;
   justify-content: center;
   font-size: 20px;
}

.van-chatbot-header-text h4 {
   margin: 0;
   font-size: 18px;
   font-weight: 600;
   line-height: 1.2;
}

.van-chatbot-header-text span {
   font-size: 12px;
   opacity: 0.8;
}

.van-chatbot-close {
   background: transparent;
   border: none;
   color: var(--tp-common-black, #030303);
   font-size: 20px;
   cursor: pointer;
   padding: 5px;
   border-radius: 50%;
   transition: background 0.2s;
   width: 30px;
   height: 30px;
   display: flex;
   align-items: center;
   justify-content: center;
}

.van-chatbot-close:hover {
   background: rgba(0, 0, 0, 0.1);
}

/* Área de Mensagens */
.van-chatbot-messages {
   flex: 1;
   overflow-y: auto;
   padding: 20px;
   background: #f8f9fa;
   display: flex;
   flex-direction: column;
   gap: 15px;
}

.van-chatbot-messages::-webkit-scrollbar {
   width: 6px;
}

.van-chatbot-messages::-webkit-scrollbar-track {
   background: transparent;
}

.van-chatbot-messages::-webkit-scrollbar-thumb {
   background: #ddd;
   border-radius: 3px;
}

.van-chatbot-messages::-webkit-scrollbar-thumb:hover {
   background: #bbb;
}

/* Mensagem Individual */
.van-message {
   display: flex;
   gap: 10px;
   animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
   from {
      opacity: 0;
      transform: translateY(10px);
   }
   to {
      opacity: 1;
      transform: translateY(0);
   }
}

.van-message.user {
   flex-direction: row-reverse;
}

.van-message-avatar {
   width: 35px;
   height: 35px;
   border-radius: 50%;
   display: flex;
   align-items: center;
   justify-content: center;
   font-size: 16px;
   flex-shrink: 0;
}

.van-message.user .van-message-avatar {
   background: var(--tp-theme-primary, #c4ee18);
   color: var(--tp-common-black, #030303);
}

.van-message.bot .van-message-avatar {
   background: #e0e0e0;
   color: var(--tp-common-black, #030303);
}

.van-message-content {
   max-width: 75%;
   padding: 12px 16px;
   border-radius: 18px;
   word-wrap: break-word;
   line-height: 1.5;
   font-size: 14px;
}

.van-message.user .van-message-content {
   background: var(--tp-theme-primary, #c4ee18);
   color: var(--tp-common-black, #030303);
   border-bottom-right-radius: 4px;
}

.van-message.bot .van-message-content {
   background: white;
   color: var(--tp-common-black, #030303);
   border-bottom-left-radius: 4px;
   box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* Links nas mensagens do bot */
.van-message.bot .van-message-content a {
   color: var(--tp-theme-primary, #c4ee18);
   text-decoration: underline;
   font-weight: 600;
   transition: color 0.2s;
}

.van-message.bot .van-message-content a:hover {
   color: #a0d010;
   text-decoration: underline;
}

.van-message-time {
   font-size: 11px;
   color: #999;
   margin-top: 5px;
   text-align: right;
}

.van-message.bot .van-message-time {
   text-align: left;
}

/* Container de Input */
.van-chatbot-input-container {
   padding: 15px;
   background: white;
   border-top: 1px solid #eee;
   display: flex;
   gap: 10px;
   align-items: center;
}

.van-chatbot-input {
   flex: 1;
   border: 1px solid #ddd;
   border-radius: 25px;
   padding: 12px 18px;
   font-size: 14px;
   outline: none;
   transition: border-color 0.2s;
   font-family: var(--tp-ff-inter, 'Inter', sans-serif);
}

.van-chatbot-input:focus {
   border-color: var(--tp-theme-primary, #c4ee18);
}

.van-chatbot-send {
   width: 45px;
   height: 45px;
   border-radius: 50%;
   background: var(--tp-theme-primary, #c4ee18);
   border: none;
   color: var(--tp-common-black, #030303);
   cursor: pointer;
   display: flex;
   align-items: center;
   justify-content: center;
   font-size: 18px;
   transition: all 0.2s;
   flex-shrink: 0;
}

.van-chatbot-send:hover {
   background: #a0d010;
   transform: scale(1.05);
}

.van-chatbot-send:disabled {
   opacity: 0.5;
   cursor: not-allowed;
   transform: none;
}

/* Indicador de Digitação */
.van-chatbot-typing {
   padding: 10px 20px;
   display: flex;
   gap: 5px;
   align-items: center;
}

.van-chatbot-typing span {
   width: 8px;
   height: 8px;
   background: #999;
   border-radius: 50%;
   animation: typing 1.4s infinite;
}

.van-chatbot-typing span:nth-child(2) {
   animation-delay: 0.2s;
}

.van-chatbot-typing span:nth-child(3) {
   animation-delay: 0.4s;
}

@keyframes typing {
   0%, 60%, 100% {
      transform: translateY(0);
      opacity: 0.7;
   }
   30% {
      transform: translateY(-10px);
      opacity: 1;
   }
}

/* Responsividade */
@media (max-width: 574.98px) {
   .van-chatbot-container {
      bottom: 75px;
      right: 15px;
   }

   .van-chatbot-button {
      width: 50px;
      height: 50px;
   }

   .van-chatbot-icon i {
      font-size: 20px;
   }

   .van-chatbot-window {
      width: calc(100vw - 30px);
      height: calc(100vh - 100px);
      max-height: 600px;
      bottom: 65px;
      right: 15px;
   }
}

/* Fim: Estilos do Chatbot */

