/*
 * chat-style.css
 * Estilo do assistente, baseado na landing page.
 */
:root {
    --primary-color: #00bcd4; /* Azul Ciano Vibrante */
    --dark-bg: #1a1a1a;       /* Fundo principal */
    --card-bg: #2a2a2a;       /* Fundo do chat-box e input */
    --text-color: #f8f9fa;   /* Texto claro */
    --border-color: #3a3a3a;
    --user-msg-bg: #007bff;   /* Fundo msg usuário (padrão Bootstrap) */
    --bot-msg-bg: #333;        /* Fundo msg bot (mais escuro) */
}

body {
    font-family: 'Poppins', sans-serif; /* Usando a mesma fonte da landing page */
    color: var(--text-color);
    background-color: var(--dark-bg);
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.chat-container {
    width: 100%;
    max-width: 700px;
    height: 90vh;
    max-height: 800px;
    background: var(--card-bg);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

/* Cabeçalho do Chat */
.chat-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: var(--dark-bg);
    border-bottom: 1px solid var(--border-color);
}

.chat-header .avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
    margin-right: 15px;
}

.chat-header .header-info {
    display: flex;
    flex-direction: column;
}

.chat-header .title {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-color);
}

.chat-header .status {
    font-size: 0.8rem;
    color: #48e248; /* Verde online */
}

/* Caixa de Mensagens */
.chat-box {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    background-color: var(--dark-bg);
}

/* Estilo da scrollbar */
.chat-box::-webkit-scrollbar {
    width: 8px;
}
.chat-box::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 4px;
}
.chat-box::-webkit-scrollbar-track {
    background-color: var(--card-bg);
}

.message-container {
    margin-bottom: 15px;
    display: flex;
}

.message {
    display: inline-block;
    padding: 12px 18px;
    border-radius: 18px;
    max-width: 85%;
    word-wrap: break-word;
    line-height: 1.5;
}

.bot-message {
    justify-content: flex-start;
}
.bot-message .message {
    background-color: var(--bot-msg-bg);
    color: var(--text-color);
    border-bottom-left-radius: 4px;
}
/* Links dentro da msg do bot */
.bot-message .message a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}
.bot-message .message a:hover {
    text-decoration: underline;
}

.user-message {
    justify-content: flex-end;
}
.user-message .message {
    background-color: var(--user-msg-bg);
    color: white;
    border-bottom-right-radius: 4px;
}

/* Loading */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--text-color);
    margin: auto; /* Centraliza no chat-box */
}

.loading-gif {
    width: 100px;
    height: 100px;
    margin-bottom: 10px;
}

.loading-bubble {
    display: flex;
    justify-content: flex-start;
}
.loading-bubble img {
    width: 60px;
    height: 60px;
    border-radius: 18px;
}


/* Área de Input */
.chat-input-area {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
}

.chat-input-area .form-control {
    flex-grow: 1;
    border-radius: 25px;
    padding: 12px 20px;
    border: 1px solid var(--border-color);
    background-color: #333;
    color: var(--text-color);
    font-size: 1rem;
    margin-right: 10px;
}
.chat-input-area .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(0, 188, 212, 0.5);
}

.restart-img {
    width: 35px;
    height: 35px;
    cursor: pointer;
    margin-right: 10px;
    opacity: 0.7;
    transition: opacity 0.2s, transform 0.2s;
}
.restart-img:hover {
    opacity: 1;
    transform: rotate(-90deg);
}

.send-btn {
    background: var(--primary-color);
    color: var(--dark-bg);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
}
.send-btn:hover {
    background-color: #0097a7;
    transform: scale(1.1);
}