
.bodychatbot {
    font-family: "Helvetica Neue", Arial, sans-serif;
    background-color: #ffffff;
    color: #333333;
    line-height: 1.6;
    margin: 0;
    padding: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    color: #2ecc71;
    margin-top: 40px;
    text-align: center;
    /* width: 80%; */
    margin: auto;
}

#question-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 30px;
    width: 847px;
    margin: auto;
}

label {
    font-size: 18px;
    margin-bottom: 10px;
}

input[type="text"], textarea {
    width: 100%;
    padding: 10px;
    margin: 5px 0;
    font-size: 16px;
    border: 2px solid #2ecc71;
    border-radius: 4px;
    height: 120px;
    overflow-y: auto;
}
textarea::-webkit-scrollbar {
    border-radius: 10px;
    background-color: #fff;
    width: 10px;
    margin: 50px;
}
textarea::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 5px;
}

button.enviarsofia {
    margin-top: 10px;
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 20px;
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.2s;
}

button[type="submit"].enviarsofia {
    background-color: #2ecc71;
}

button[type="button"].enviarsofia {
    background-color: #27ae60;
}

#chat-history {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 847px;
    /* margin-top: 30px; */
    font-size: initial;
    margin: 30px auto;
}

#chat-history p {
    padding: 10px 15px;
    border-radius: 10px;
    margin-bottom: 10px;
    width: 100%;
}

#chat-history p strong {
    color: #2ecc71;
}

#chat-history p:nth-child(even) {
    background-color: #2ecc71;
    color: #ffffff;
}

#chat-history p:nth-child(odd) {
    display: flex;
    flex-direction: row;
    background-color: #f7f7f7;
}

#chat-history p:nth-child(n+2) {
    margin-top: 0;
}

/* Novo estilo para o background da div "chat-history" quando o usuário clicar em "Ver Histórico" */
.chat-history-background {
    background-color: #f0f0f0;
}

.avatar {
    width: 150px !important;
    height: 100%;
    float: left;
    clip-path: circle();
    margin-right: 10px;
}

/* Estilos existentes */
/* ... */

/* Estilos para tornar o layout responsivo */
@media (max-width: 768px) {
    .bodychatbot {
        align-items: stretch;
    }

    h1 {
        font-size: 24px;
        text-align: center;
        width: 100%;
    }

    #question-form {
        width: 100%;
    }

    label {
        font-size: 16px;
    }

    input[type="text"] {
        font-size: 14px;
        width: 92%;
    }

    button {
        font-size: 14px;
    }

    #chat-history {
        width: 100%;
    }

    #chat-history p {
        max-width: auto;
    }

    .avatar {
        width: 100px;
    }
}

/* ===== LINKS DENTRO DA RESPOSTA DA SofIA =====
   Adicionado em 30/07/2026, junto com a linkificacao automatica das URLs
   citadas na resposta (ver pergunteaabmes-curso-widget.js, secao 5-B).

   Dois cuidados que NAO sao opcionais aqui:

   1) CONTRASTE. O balao da resposta pode cair na regra :nth-child(even),
      que tem fundo verde (#2ecc71) e texto branco. Um link azul padrao do
      navegador ali fica praticamente ilegivel -- por isso a regra do verde
      abaixo forca branco com sublinhado.

   2) URL LONGA. As respostas reais trazem URLs de mais de 140 caracteres
      (ex.: /public/noticias/detalhe/5140/maio-sob-nova-lideranca-abmes-...).
      Sem quebra, elas estouram o balao e quebram o layout no celular.
      O word-break so vale para o <a>, entao nao afeta o texto normal.

   Nao pega o bloco de fontes: aquele fica em .fontes-bloco, fora de <p>. */

#chat-history p a {
    color: #797979;
    text-decoration: underline;
    word-break: break-all;
}

#chat-history p a:hover,
#chat-history p a:focus {
    color: #797979;
}

#chat-history p:nth-child(even) a,
#chat-history p:nth-child(even) a:hover,
#chat-history p:nth-child(even) a:focus {
    color: #ffffff;
    text-decoration: underline;
}

/* Estilos para as fontes: */

.descricaofontes a {
    color: #1266e5;
}

.sujestaopergunta {
    display:block;
    background: #e9f0fe;
    padding: 10px 15px;
    border-radius: 10px;
    margin: 2px 0px 16px;
    width: 100%;
    /*font-weight: 600;*/
}

/* ===== FONTES ===== */
    .fontes-container {
        margin-top: 20px;
        font-family: 'Inter', sans-serif;
        color: #2e2e2e;
    }

    .fontes-bloco {
        /* border-radius: 16px; */
        padding: 15px 20px;
        margin-bottom: 16px;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
        /* transition: transform 0.2s ease; */
    }

    /* .fontes-bloco:hover {
        transform: scale(1.01);
    } */

    .fontes-fixas {
        background: linear-gradient(145deg, #f9fafb, #ffffff);
        border-left: 5px solid #0073e6;
    }

    .fontes-dinamicas {
        background: #bbbbbb14;
        border-left: 5px solid #2ecc71;
    }

    .fontes-titulo {
        display: flex;
        align-items: center;
        gap: 10px;
        font-weight: 600;
        margin-bottom: 10px;
        font-size: 15px;
    }

    .fontes-titulo i {
        color: #0073e6;
    }

    .fontes-lista {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .fonte-item a {
        text-decoration: none;
        color: #0056b3;
        font-weight: 500;
    }

    .fonte-item a:hover {
        text-decoration: underline;
    }

    .fonte-snippet {
        color: #444;
        font-size: 13px;
        margin-left: 10px;
        margin-top: 2px;
    }