:root {
  --chat-bg: rgba(245, 245, 245, 0.95); /* Cinza claro para o fundo do chat */
  --text-color: rgba(40, 40, 40, 0.85); /* Texto escuro, mas suave, para contraste */
  --user-bg: rgba(181, 181, 181, 0.9); /* Fundo cinza claro para o usuário */
  --assistant-bg: rgba(227, 227, 227, 1); /* Fundo cinza claro para o assistente */
  --input-bg: rgba(240, 240, 240, 0.97); /* Fundo levemente cinza claro para o campo de entrada */
  --button-bg: rgba(130, 130, 130, 0.9); /* Cinza suave para botões */
  --button-text: #ffffff; /* Texto branco nos botões */
  --border-color: rgba(180, 180, 180, 0.7); /* Cinza claro para as bordas */
  --icon-fa-color: #f5f5f5; /* Cor padrão do ícone */
}

.chat-wrapper.dark-mode {
  --chat-bg: rgba(18, 18, 18, 0.97); /* Preto grafite para o fundo do chat */
  --text-color: rgba(225, 225, 225, 0.9); /* Texto claro e visível */
  --user-bg: rgba(40, 40, 40, 0.85); /* Cinza escuro para o fundo do usuário */
  --assistant-bg: rgba(50, 50, 50, 0.9); /* Cinza escuro para o fundo do assistente */
  --input-bg: rgba(30, 30, 30, 0.95); /* Fundo escuro para o campo de entrada */
  --button-bg: rgba(100, 100, 100, 0.9); /* Cinza médio para os botões */
  --button-text: rgba(255, 255, 255, 1); /* Texto branco nos botões */
  --border-color: rgba(60, 60, 60, 0.8); /* Cinza grafite para as bordas */
  --icon-fa-color: #001f3f; /* Cor no modo escuro (substitua por preto) */
}

/* Tema Claro */


/* Tema Escuro */
.chat-wrapper.dark-mode #theme-toggle {
    color: rgba(255, 255, 255, 0.8); /* Cor clara para o ícone no tema escuro */
    font-size: 26px;
}


.chat-wrapper {
  position: fixed;
  bottom: 90px;
  right: 10px; /* Margem de 10px do canto direito */
  width: 85% !important;
  max-width: 300px !important;
  height: calc(95% - 4px);
  max-height: 646px;
  display: flex;
  flex-direction: column;
  z-index: 1000;
}

#chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  border: 2px solid var(--border-cht);
  background-color: var(--chat-bg);
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  transition: background-color 0.3s, color 0.3s;
  margin-bottom: 4px;
  max-height: 600px;
  border-radius: 14px;
  overflow: hidden;
}

#chat-messages {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 10px;
  color: var(--text-color);
  line-height: 1.5;
  /* Garante que o scroll funcione adequadamente */
  height: 0;
}

#loading {
  padding: 10px;
  position: sticky;
  bottom: 0;
  background-color: var(--chat-bg);
}

#input-container {
  flex: 0 0 auto;
  display: flex;
  border: 0px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  margin-top: auto;
  padding: 0px;
  background-color: transparent;
 
}

#user-input {
  border-radius: 12px;
  flex: 1;
  padding: 10px;
  border: 1px solid var(--border-cht);
  font-size: 16px;
  outline: none;
  background-color: var(--chat-bg);
  color: var(--text-color);
  min-height: 40px;
  width: 90%;
}



#user-input:focus {
    outline: 1px solid var(--border-color);
}

#send-button {
    padding: 10px;
    background-color: transparent;
    color: var(--button-text);
    border: none;
    cursor: pointer;
    font-size: 24px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0; /* Removemos o border-radius do botão */
}

.message {
    margin-bottom: 10px;
    padding: 8px;
    border-radius: 10px;
    max-width: 80%;
    line-height: 1.5;
}

.user {
    background-color: var(--user-bg) !important;
    align-self: flex-end;
    margin-left: auto;
    font-size: 16px;
    font-family: Poppins, sans-serif;
    font-weight: 400;
    line-height: 1.5;
}

.assistant {
    background-color: var(--assistant-bg) !important;
    align-self: flex-start;
    font-size: 16px;
    font-family: Poppins, sans-serif;
    font-weight: 300;
    line-height: 1.5;
}

.assistant a {
    color: var(--button-bg) ;
    text-decoration: none;
}

.assistant a:hover {
    text-decoration: underline;
}

#loading {
    display: none;
    text-align: center;
    padding: 10px;
}

#theme-toggle {
    position: absolute;
    top: 10px;
    right: 5px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
    z-index: 1002;
}


#chat-button-wrapper {
    position: fixed;
    bottom: 20px;
    right: 8px;
    width: 70px;
    height: 70px;
    z-index: 1000;
    display: block; /* Explicitamente definindo o display inicial */
}

        #chat-button {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: transparent;
            border: none;
            padding: 0;
            cursor: pointer;
            z-index: 1002;
        }

        .button-content {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            border-radius: 50%;
            overflow: hidden;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            z-index: 1001;
        }

        .button-content::before {
            content: '';
            position: absolute;
            top: -2px;
            left: -2px;
            right: -2px;
            bottom: -2px;
            background: linear-gradient(45deg, #00FFC2, #0CC0DF, #07929F, #00FFC2, #0CC0DF, #07929F, #00FFC2, #0CC0DF);
            z-index: 1;
            border-radius: 50%;
            animation: rainbow 5s linear infinite;
        }

        .button-content::after {
            content: '';
            position: absolute;
            top: 2px;
            left: 2px;
            right: 2px;
            bottom: 2px;
            background-color: white;
            border-radius: 50%;
            z-index: 2;
        }

        .button-content img {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 90%;
            height: 90%;
            object-fit: cover;
            border-radius: 50%;
            z-index: 3;
        }

        @keyframes rainbow {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        #chat-button:hover + .button-content {
            transform: scale(1.1);
        }


#help-text {
    position: fixed;
    right: 65px;
    background-color: rgba(0, 102, 204, 0.9);
    color: #FFF;
    padding: 10px 20px;
    border-radius: 20px 0 0 20px;
    font-size: 16px;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 1.5s, transform 2.5s;
    z-index: 900;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 10px; /* Altura fixa para o botão de ajuda */
    margin-bottom: 15px; /* Espaço abaixo do botão */
}

#help-text.active {
    opacity: 1;
    transform: translateX(0);
}

/* Media query para dispositivos móveis */
@media (max-width: 600px) {
    #help-text {
        right: 65px;
        font-size: 14px;
        padding: 15px 15px;
        height: 15px; /* Altura ligeiramente menor para telas menores */
    }
}

/* Media query para telas muito pequenas */
@media (max-width: 320px) {
    #help-text {
        font-size: 12px;
        right: 60px;
        max-width: calc(100vw - 70px);
        height: 10px; /* Altura ainda menor para telas muito pequenas */
        padding: 6px 10px;
    }
}

/* Adicione esta regra para alinhar verticalmente o help-text com o chat-button */
#chat-button, #help-text {
    bottom: 20px;
}

#theme-toggle i {
    color: var(--icon-fa-color); /* Cor padrão do ícone */
}

/* Cor do ícone no modo escuro */
.chat-wrapper.dark-mode #theme-toggle i {
    color: var(--icon-fa-color); /* Cor do ícone no modo escuro */
}




/* Media query para mobile mantendo o border-radius */
@media (max-width: 600px) {
  .chat-wrapper {
    width: 90%;
    height: 65%;
    max-width: 400px;
    max-height: 500px;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
  }

  #chat-container {
    border-radius: 12px; /* Border radius apenas para mobile */
  }

 
    #chat-button {
        bottom: 10px;
        left: 50%; /* Alterado de right para left */
        transform: translateX(-50%); /* Adicionado para centralizar */
    }
    #user-input {
        width: calc(100% - 80px);
    }
    #send-button svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.modern-cursor {
  animation: blink 1s infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
  
.custom-button {
    display: inline-block;
    padding: 12px 24px;
    background-color: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-family: Arial, sans-serif;
    font-weight: bold;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.custom-button:hover {
    background-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}  
