/* ** BLOCO 1: Estilo do botão principal ** */
#conecta-chat { 
    position: fixed; 
    bottom: 20px; 
    right: 20px; 
    z-index: 1000; 
    padding: 10px; 
} 

.conecta-chat-icon { 
    border: none; 
    border-radius: 50%; 
    width: 60px; 
    height: 60px; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2); 
    cursor: pointer; 
    position: relative; 
    padding: 5px; 
    outline: none; 
} 

.conecta-chat-icon img { 
    width: 40px; 
    height: 40px; 
    object-fit: contain; 
} 

/* ** BLOCO 2: Estilo do menu de chat ** */
#chat-menu { 
    position: absolute; 
    bottom: 80px; 
    right: 0; 
    display: none; 
    flex-direction: column; 
    gap: 15px; 
    padding-right: 10px; 
} 

#chat-menu.open { 
    display: flex; 
} 

#chat-menu .conecta-chat-item { 
    margin-bottom: 10px; 
} 

#chat-menu .conecta-chat-item a { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    width: 60px; 
    height: 60px; 
    border-radius: 50%; 
    text-decoration: none; 
    outline: none; 
} 

#chat-menu .conecta-chat-item img { 
    width: 40px; 
    height: 40px; 
    object-fit: contain; 
    background: none; 
    box-shadow: none; 
    border: none; 
    border-radius: 0; 
} 

#chat-menu a:hover, #chat-menu a:focus { 
    transform: scale(1.1); 
    transition: transform 0.2s ease-in-out; 
} 

/* ** BLOCO 3: Ajustes de responsividade ** */
@media (max-width: 600px) { 
    .conecta-chat-icon { 
        width: 50px; 
        height: 50px; 
    } 

    .conecta-chat-icon img { 
        width: 30px; 
        height: 30px; 
    } 

    #chat-menu .conecta-chat-item a { 
        width: 50px; 
        height: 50px; 
    } 

    #chat-menu .conecta-chat-item img { 
        width: 30px; 
        height: 30px; 
    } 
} 

/* ** BLOCO 4: Estilo do pop-up de política de privacidade ** */
#chat-popup { 
    position: fixed; 
    bottom: 100px; 
    right: 20px; 
    width: 300px; 
    background: #fff; 
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); 
    border-radius: 8px; 
    padding: 20px; 
    display: none; 
    z-index: 1001; 
} 

.chat-popup-content p { 
    margin-bottom: 15px; 
    font-size: 14px; 
    color: #333; 
} 

.chat-popup-content a { 
    color: #005EB8; 
    text-decoration: underline; 
} 

.chat-button { 
    background: #005EB8; 
    color: #fff; 
    border: none; 
    padding: 8px 15px; 
    margin-right: 10px; 
    border-radius: 4px; 
    cursor: pointer; 
} 

.chat-button:hover, .chat-button:focus { 
    background: #004a9f; 
    box-shadow: 0 0 3px 3px #005EB8; 
} 

/* ** BLOCO 5: Estilo atualizado para o chat online ** */
.chat-online-window {
    position: fixed;
    bottom: 0;
    right: 20px;
    width: 350px;
    height: 500px;
    background: #ffffff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 10px 10px 0 0;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    font-family: Arial, sans-serif;
}

.chat-header {
    background: #002d72;
    color: #ffffff;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: 10px 10px 0 0;
    font-size: 18px;
    font-weight: bold;
}

.chat-header-info {
    flex-grow: 1;
    text-align: center;
    color: #ffffff;
}

.chat-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin: 0 auto;
}

.chat-status {
    font-size: 12px;
    color: #ffffff; /* Agora o texto "online" fica branco */
    margin-top: 5px;
    text-align: center;
}

.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #4caf50; /* Mantém o verde somente na bolinha */
    border-radius: 50%;
    margin-right: 5px;
}


.chat-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: #f4f4f4;
}

.user-message {
    align-self: flex-end;
    text-align: right;
    background-color: #0077b3; /* Nova cor do balão do usuário */
    color: #ffffff;
    border-radius: 15px;
    padding: 10px;
    max-width: 70%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    font-family: Arial, sans-serif;
    line-height: 1.4;
}

.attendant-message {
    align-self: flex-start;
    text-align: left;
    background-color: #f1f1f1;
    border-radius: 15px;
    padding: 10px;
    max-width: 70%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    color: #333;
    font-family: Arial, sans-serif;
    line-height: 1.4;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.chat-input-container {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #ffffff;
    border-top: 1px solid #ddd;
    position: sticky;
    bottom: 0;
    z-index: 1002;
}

.chat-input {
    flex-grow: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    color: #333;
    margin-right: 10px;
    font-family: Arial, sans-serif;
}

/* Atualização do botão de enviar mensagem para usar imagem */
.chat-send-button {
    background: #0077b3;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
    color: #fff; /* Não necessário se a imagem não tiver texto */
}

.chat-send-button:hover {
    background: #005a8d;
}

.chat-send-button img {
    width: 24px;
    height: 24px;
    object-fit: contain; /* garante que a imagem não deforme */
}

.welcome-message {
    background-color: #ffcc80;
    font-weight: bold;
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    max-width: 100%;
    margin: 10px 0;
    color: #333;
}

.close-chat-button {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 20px;
    cursor: pointer;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    position: absolute;
    right: 10px;
    top: 10px;
}

.close-chat-button:focus {
    outline: none;
    box-shadow: none;
}

.attendant-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
}

.typing-indicator {
    display: inline-block;
    width: 50px;
    text-align: center;
    font-size: 0; /* Para remover espaços entre spans */
}

.typing-indicator span {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin: 0 2px;
    background: #555;
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-indicator span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0);
    } 
    40% {
        transform: scale(1);
    }
}

/* Contêiner principal que agrupa avatar e balão */
.attendant-message-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 10px; /* Espaço entre avatar e balão */
    margin-bottom: 10px; /* Espaço entre as mensagens */
}

/* Estilo do balão de mensagem */
.attendant-message-bubble {
    background-color: #f1f1f1;
    border-radius: 15px;
    padding: 10px;
    max-width: 70%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    color: #333;
    font-family: Arial, sans-serif;
    line-height: 1.4;
    text-align: left;
}

/* Tooltip "Posso ajudar?" */
.conecta-chat-tooltip {
    position: absolute;
    bottom: 30px; 
    right: 80px; 
    background: #ffffff;
    color: #333;
    padding: 5px 10px;
    border-radius: 15px;
    box-shadow: 0 0 8px rgba(0,0,0,0.2);
    display: none;
    font-size: 12px; 
    font-family: Arial, sans-serif; 
    white-space: nowrap;
}
