/* chat-ia.css */



/* Layout padrão: desktop - lado a lado */
#chat-sidebar, #chat-container {
    display: block;
    vertical-align: top;
    box-sizing: border-box;
}

#chat-sidebar {
    width: 25%;
    max-width: 300px;
    padding: 1rem;
    border-right: 1px solid #ccc;
    overflow-y: auto;
    float: left;
}

#chat-container {
    width: 75%;
    padding: 1rem;
    overflow-y: auto;
    float: left;
}

/* Responsivo: stack em telas pequenas */
@media screen and (max-width: 768px) {
    #chat-sidebar,
    #chat-container {
        width: 100%;
        float: none;
        max-width: 100%;
        height: auto;
    }

    #chat-sidebar {
        border-right: none;
        border-bottom: 1px solid #ccc;
    }

    #chat-container {
        padding-bottom: 80px; /* espaço para input fixo, se necessário */
    }

    .input-container {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        padding: 10px;
        background: #fff;
        border-top: 1px solid #ccc;
        z-index: 10;
    }

    #chat-box {
        max-height: calc(100vh - 200px); /* para não ficar escondido atrás do input */
        overflow-y: auto;
    }
}



#chat-box {
    flex-grow: 1;
    overflow-y: auto;
    padding: 1rem;
    background-color: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #ddd;
    max-height: 60vh;
}

.input-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 12px;
    margin-top: 12px;
    background-color: #fff;
    border-radius: 8px;
}

.chat-message {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 15px;
}

.chat-message.user-msg {
    justify-content: flex-end;
}

.chat-message.ia-msg {
    justify-content: flex-start;
}

.chat-bubble {
    max-width: 70%;
    padding: 12px 16px;
    border-radius: 16px;
    line-height: 1.5;
    font-size: 15px;
    position: relative;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    word-break: break-word;
}

.chat-message.user-msg .chat-bubble {
    background-color: #f0f0f0;
    color: #222;
    border-bottom-right-radius: 0;
}

.chat-message.ia-msg .chat-bubble {
    background-color: #fff;
    color: #111;
    border-bottom-left-radius: 0;
}

.chat-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
}

.user-avatar {
    background-image: url('https://cdn-icons-png.flaticon.com/512/847/847969.png');
}

.ia-avatar {
    background-image: url('https://guiadigital.thapcom.online/wp-content/uploads/2025/04/icone512-2.png');
}

.chat-reset-btn {
    width: 100%;
    margin-top: 10px;
    background: #eee;
    padding: 10px;
    border-radius: 6px;
    border: none;
    color: #333;
    cursor: pointer;
}

.chat-history-item {
    border: 1px solid #ccc;
    border-radius: 6px;
    margin-bottom: 10px;
    padding: 8px;
    background: #fff;
    cursor: pointer;
}

.chat-thread {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}


#conversas-lista {
    margin-bottom: 15px;
}

.conversa-item {
    border: 1px solid #ccc;
    padding: 6px 10px;
    margin-bottom: 5px;
    background: #eff8fd;
    border-radius: 6px;
    font-size: 13px;
    line-height: 15px;
    cursor: pointer;
}

.conversa-item:hover {
    background-color: #e7e7e7;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.posts-sugeridos h4 {
    font-weight: bold;
    margin-top: 20px;
    font-size: 15px;
}

.posts-sugeridos .conversa-item {
    border: 1px solid #ccc;
    padding: 6px 10px;
    margin-bottom: 5px;
    background: #fafafa;
    border-radius: 6px;
    font-size: 13px;
    line-height: 15px;
    cursor: pointer;
}

.postagem-sugerida {
    background-color: #f9f9f9;
    padding: 10px;
    border-left: 4px solid #ffd700;
    margin: 10px 0;
    border-radius: 6px;
    font-family: sans-serif;
}

.postagem-sugerida ul {
    padding-left: 18px;
    margin-bottom: 10px;
}

.nova-conversa-btn {
    width: 100%;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px;
    cursor: pointer;
}

.nova-conversa-btn:hover {
    background: #007bff;
}


.limpar-conversa-btn {
    width: 100%;
    background: #6f2222;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px;
    cursor: pointer;
}

.limpar-conversa-btn:hover {
    background: #842828;
}



.link-post {
    color: #0073aa;
    font-weight: bold;
    text-decoration: none;
}

.snippet-post {
    display: block;
    font-size: 0.9em;
    color: #444;
    margin-top: 4px;
    margin-bottom: 8px;
}

.botoes-resposta {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.botao-resposta {
    padding: 6px 12px;
    font-size: 0.9em;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background-color: #eeeeee;
    transition: background 0.2s;
}

.botao-resposta:hover {
    background-color: #ccc;
}

#chat-input {
    flex: 1;
    max-width: 600px;
	height: 80px;
    padding: 10px 16px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 999px;
    outline: none;
    transition: border 0.2s ease;
}

#chat-input:focus {
    border-color: #007bff;
}

#send-btn,
#stop-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s ease;
}

#send-btn:hover,
#stop-btn:hover {
    background-color: #0056b3;
}


.botao-mais-postagens {
    padding: 6px 12px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.2s;
}

.botao-mais-postagens:hover {
    background-color: #ccc;
}

#toggle-dark-mode {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1001;
    background-color: #f1f1f1;
    color: #111;
    border: none;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transition: background 0.3s ease, color 0.3s ease;
}

.dark-mode #toggle-dark-mode {
    background-color: #222;
    color: #fff;
}

.dark-mode body,
.dark-mode #chat-container {
    background-color: #121212;
    color: #f1f1f1;
}

.dark-mode #chat-box {
    background-color: #1e1e1e;
    border-color: #333;
}

.dark-mode .input-container {
    background-color: #1e1e1e;
    border-top-color: #333;
}

.dark-mode #chat-input {
    background-color: #2a2a2a;
    color: #fff;
    border-color: #444;
}

.dark-mode #send-btn,
.dark-mode #stop-btn {
    background-color: #4a90e2;
}

.dark-mode #send-btn:hover,
.dark-mode #stop-btn:hover {
    background-color: #357ab8;
}

