/* assets/css/mentoria_chat.css */

:root {
    --color-bg: #000000;          /* Preto Puro */
    --color-surface: #0f0f0f;     /* Cinza Muito Escuro (Header/Footer) */
    --color-primary: #f7c600;     /* Amarelo Ouro */
    --color-primary-hover: #ffda47;
    --color-bot-bubble: #1a1a1a;  /* Balão do Bot (Cinza Escuro) */
    --color-user-bubble: #f7c600; /* Balão do Usuário (Amarelo) */
    --color-text-main: #ffffff;
    --color-text-muted: #888888;
    --color-border: #333333;
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: var(--color-bg);
    font-family: var(--font-family);
    color: var(--color-text-main);
    height: 100vh;
    overflow: hidden; /* Evita scroll na página inteira, só no chat */
    display: flex;
    justify-content: center;
}

/* CONTAINER PRINCIPAL (Centralizado e Mobile First) */
.chat-wrapper {
    width: 100%;
    max-width: 600px; /* Largura máxima estilo app */
    height: 100%;
    background-color: var(--color-bg);
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 0 20px rgba(0,0,0,0.5); /* Sombra sutil nas laterais em telas grandes */
}

/* --- HEADER --- */
.chat-header {
    background-color: var(--color-surface);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-bottom: 1px solid var(--color-border);
    z-index: 10;
}

.avatar img {
    width: 50px; height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-primary); /* Borda Amarela */
}

.header-text { flex: 1; }

.header-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}

.header-subtitle {
    font-size: 12px;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 8px; height: 8px;
    background-color: #00ff88; /* Verde Online */
    border-radius: 50%;
    box-shadow: 0 0 5px #00ff88;
}

/* --- CORPO DO CHAT --- */
.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background-color: var(--color-bg);
    scroll-behavior: smooth;
}

/* Mensagens */
.message {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 15px;
    line-height: 1.5;
    position: relative;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Bot (Cinza Escuro) */
.message.bot {
    align-self: flex-start;
    background-color: var(--color-bot-bubble);
    color: #eee;
    border-bottom-left-radius: 2px;
    border: 1px solid #2a2a2a;
}
.message.bot small {
    display: block; margin-top: 6px; font-size: 10px; color: #666; font-style: italic;
}

/* Usuário (Amarelo) */
.message.user {
    align-self: flex-end;
    background-color: var(--color-user-bubble);
    color: #000; /* Texto preto para contraste no amarelo */
    border-bottom-right-radius: 2px;
    font-weight: 500;
}

/* --- BOTÕES DE OPÇÃO --- */
/* Estes botões são inseridos via JS */
.option-btn {
    display: block;
    width: 100%;
    padding: 15px; /* Um pouco mais de espaço */
    margin-bottom: 12px;
    /* Fundo amarelo muito suave para destacar do preto */
    background-color: rgba(247, 198, 0, 0.08); 
    /* Borda Amarela Sólida */
    border: 2px solid var(--color-primary); 
    border-radius: 12px; /* Bordas mais arredondadas */
    /* Texto Amarelo para combinar */
    color: var(--color-primary);
    font-size: 15px;
    font-weight: 600; /* Texto mais grosso */
    text-align: center; /* Centralizado fica melhor para botão único */
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3); /* Sombra suave */
}

/* Efeito ao passar o mouse */
.option-btn:hover {
    /* Preenche o botão com amarelo e texto preto */
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: #000000;
    transform: translateY(-2px); /* Leve subida */
    box-shadow: 0 8px 20px rgba(247, 198, 0, 0.3); /* Sombra amarela brilhante */
}

/* Efeito ao clicar */
.option-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Botão final de CTA (WhatsApp) */
.chat-button {
    background-color: #25D366; /* Verde Zap */
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}
.chat-button:hover { opacity: 0.9; transform: translateY(-1px); }

/* --- INDICADOR DIGITANDO --- */
.typing {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 10px; padding: 0 10px;
    display: none; /* Controlado via JS */
}
.typing-avatar img {
    width: 30px; height: 30px; border-radius: 50%; object-fit: cover;
}
.typing-dots {
    background: var(--color-bot-bubble);
    padding: 8px 12px;
    border-radius: 12px;
    border-bottom-left-radius: 2px;
    display: flex; gap: 4px;
}
.typing-dot {
    width: 6px; height: 6px; background: #666; border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out both;
}
.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes typing {
    0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1); }
}
.typing-text { font-size: 11px; color: #555; }

/* --- FOOTER (INPUT) --- */
.chat-footer {
    background-color: var(--color-surface);
    padding: 15px;
    border-top: 1px solid var(--color-border);
    display: flex; gap: 10px;
    align-items: center;
}

.chat-input {
    flex: 1;
    background-color: #000;
    border: 1px solid var(--color-border);
    padding: 12px 16px;
    border-radius: 24px;
    color: #fff;
    font-size: 14px;
    outline: none;
}
.chat-input:focus {
    border-color: var(--color-primary);
}

#chatSend {
    background-color: var(--color-primary);
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 24px;
    font-weight: 700;
    cursor: pointer;
}
#chatSend:hover { background-color: var(--color-primary-hover); }

/* Helper text acima do input */
.footer-helper {
    text-align: center;
    font-size: 11px;
    color: #555;
    padding-bottom: 5px;
    background: var(--color-surface); /* Mesma cor do footer */
}

/* Área de Opções (quando aparece) */
#optionsContainer {
    background: var(--color-surface);
    width: 100%;
    padding-bottom: 10px;
}