/* Estilo para o container do chat box */
#stopbadbots-dashboard-chat-box {
    max-width: 700px;
    margin: 20px auto;
    margin-top: 0px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    /* Mudado para 'hidden' para conter os elementos internos */
    border: 1px solid #ddd;
    background-color: #e0e0e0;
    height: 500px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    resize: both;
    padding: 5px;
}

/* Estilo para o cabeçalho */
#stopbadbots-dashboard-chat-header {
    background-color: #007bff;
    padding: 7px;
    text-align: center;
    border-bottom: 1px solid #bdbbbb;
    color: white;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

#stopbadbots-dashboard-chat-header h2 {
    margin: 0;
    font-size: 18px;
    color: white;
}

/* Estilo para as mensagens do chat */
#stopbadbots-dashboard-chat-messages {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    background: #fff;
    font-family: Arial, sans-serif;
    font-size: 14px;
    white-space: pre-line;
    margin-top: -15px;
    margin-bottom: -5px;
}

#stopbadbots-dashboard-chat-messages div {
    margin-bottom: 15px;
    line-height: 1.3;
    padding-bottom: 5px;
}

#stopbadbots-dashboard-chat-messages strong {
    font-weight: bold;
}

/* Estilo para a mensagem de erro */
#stopbadbots-dashboard-error-message {
    color: red;
    background-color: #ffecec;
    border: 1px solid #ff5c5c;
    padding: 10px;
    margin: 10px;
    border-radius: 5px;
    font-size: 15px;
    font-weight: bold;
    display: none;
}

/* Estilo para o formulário */
#stopbadbots-dashboard-action-instruction {
    font-size: 14px;
    color: #555;
    font-style: italic;
    /* Removido o 'margin-top' do estilo inline */
}

#stopbadbots-dashboard-chat-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0px;
    border-top: 1px solid #ddd;
    margin-top: 10px;
    /* Certifica que a margem do topo é removida */
}

#stopbadbots-dashboard-input-group {
    display: flex;
    gap: 10px;
    width: 100%;
    margin-top: -15px;
    margin-bottom: -15px;
}

#stopbadbots-dashboard-chat-input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#stopbadbots-dashboard-chat-form button {
    padding: 8px 15px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

#stopbadbots-dashboard-auto-checkup,
#stopbadbots-dashboard-auto-checkup2 {
    display: flex;
    align-items: center;
    justify-content: center;
}

#stopbadbots-dashboard-auto-checkup img {
    margin-right: 8px;
}

/* Container dos botões de Auto Checkup */
.stopbadbots-dashboard-auto-checkup-container {
    display: flex;
    justify-content: center;
    max-width: 100%;
    gap: 20px;
    margin-top: -5px !important;
}

#stopbadbots-dashboard-auto-checkup-button {
    margin-top: 10px;
    align-self: center;
    max-width: 300px !important;
}

#stopbadbots-dashboard-chat-form button:hover {
    background-color: #0056b3;
}

/* Estilização para botão desabilitado */
#stopbadbots-dashboard-chat-form button:disabled {
    background-color: #ccc;
    color: #666;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Spinner */
.stopbadbots-dashboard-spinner999 {
    position: relative;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #f65c09;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    display: none;
}

.stopbadbots-dashboard-spinner999::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background-color: #c2bdbd;
    z-index: -1;
}

/* Mensagens de usuário */
.user-message {
    background-color: #d1f7d6;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 10px;
    max-width: 80%;
    align-self: flex-end;
    color: #000;
}

.user-message.pending {
    opacity: 0.6;
    background-color: #f0f0f0;
    color: #aaa;
}

.user-message.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Mensagens do servidor */
.server-message {
    background-color: #f1f1f1;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 10px;
    max-width: 80%;
    align-self: flex-start;
}

#stopbadbots-dashboard-gif-container999999 {
    padding: 10px 0 !important;
    /* Força o preenchimento vertical */
    height: 60px !important;
    /* Força a altura total da linha */
    background-color: #fff;
    display: flex;
    /* Adicionado para centralizar o spinner */
    align-items: center;
    justify-content: center;
}

#stopbadbots-dashboard-gif-container {
    padding: 10px 0;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Força o texto a quebrar para que não exceda o contêiner */
    word-wrap: break-word;
    /* Adicionado para garantir o espaçamento entre as mensagens */
    margin-bottom: 10px;
    line-height: 1.6;
}

/* Nova classe para ocultar o contêiner por completo */
.stopbadbots-hidden {
    display: none !important;
}

/* CSS para a animação de pulsar dos botões de Auto Checkup */
#stopbadbots-dashboard-auto-checkup,
#stopbadbots-dashboard-auto-checkup2 {
    position: relative;
    transition: transform 0.3s ease;
}

#stopbadbots-dashboard-chat-form button#stopbadbots-dashboard-auto-checkup.pulse-button,
#stopbadbots-dashboard-chat-form button#stopbadbots-dashboard-auto-checkup2.pulse-button {
    animation: pulse-animation 2s 3 !important;
}

/* Nenhuma alteração aqui, já que a animação não está vinculada a IDs */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulse-animation {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.7);
    }

    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(0, 123, 255, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
    }
}

/* Nova regra para o bloco de descrição */
.stopbadbots-description-box {
    max-width: 700px;
    margin: 20px auto;
    padding: 10px 20px;
}

/* Remove a margem do bloco de assistência */
#stopbadbots-dashboard-assistance-type {
    margin: 0;
    padding: 5px 20px;
    background: #f9f9f9;
    height: 20px;

}

/* Mensagens do ChatGPT com o novo prefixo */
.stopbadbots-chatgpt-message {
    background-color: #f1f1f1;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 10px;
    /* Adicionado para o espaçamento entre as mensagens */
    max-width: 80%;
    align-self: flex-start;
}

#stopbadbots_img_robot {

    margin-right: 10px;
    max-width: 30px;
}