/*
 * Arquivo: public/css/style.css
 * Estilos de Frontend para o Quiz WhatsApp
 */

.whatsapp-quiz-container {
    max-width: 400px;
    margin: 20px auto;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    font-family: Arial, sans-serif;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: #ECE5DD; /* Fundo de chat WhatsApp */
}

/* --- Cabeçalho (Topo do Chat) --- */
.chat-header {
    background-color: #075E54; /* Cor de cabeçalho WhatsApp */
    color: white;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.avatar-container {
    width: 40px;
    height: 40px;
    margin-right: 15px;
}

.bot-avatar, .default-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    background-color: #fff;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #075E54;
}

.header-info h3 {
    margin: 0;
    font-size: 16px;
    line-height: 1.2;
}

.header-info .status {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

/* --- Área de Mensagens --- */
.chat-messages {
    padding: 10px 15px;
    height: 450px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Estilo Base da Mensagem */
.message {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 7px;
    margin-bottom: 5px;
    word-wrap: break-word;
    position: relative;
    box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.13);
}

/* Mensagem do Bot */
.bot-message {
    align-self: flex-start;
    background-color: #fff;
    color: #000;
    border-top-left-radius: 0;
}

/* Mensagem do Usuário */
.user-message {
    align-self: flex-end;
    background-color: #DCF8C6; /* Cor de mensagem de usuário WhatsApp */
    color: #000;
    border-top-right-radius: 0;
}

.message-time {
    display: block;
    font-size: 10px;
    color: rgba(0, 0, 0, 0.4);
    margin-top: 5px;
    text-align: right;
}

/* Indicador de Digitação */
.typing-indicator {
    align-self: flex-start;
    background-color: #fff;
    padding: 5px 12px;
    border-radius: 15px;
    max-width: 80px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 5px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background-color: #b0b0b0;
    border-radius: 50%;
    margin: 0 2px;
    animation: bounce 1.2s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: 0s; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
    0%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-5px); }
}

/* --- Opções de Resposta --- */
.quiz-options-container {
    padding: 10px 15px;
    border-top: 1px solid #ddd;
    background-color: #f7f7f7;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.option-button {
    background-color: #25D366; /* Cor de botão WhatsApp */
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
    flex-grow: 1;
    max-width: 100%;
    text-align: center;
}

.option-button:hover:not(:disabled) {
    background-color: #128C7E;
}

.option-button:disabled {
    background-color: #aaa;
    cursor: not-allowed;
}

/* --- Área de Input (para respostas de texto) --- */
.chat-input-area {
    display: flex;
    padding: 8px 10px;
    background-color: #f0f0f0;
}

#messageInput {
    flex-grow: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 8px 15px;
    margin-right: 10px;
    font-size: 14px;
    outline: none;
}

.send-button {
    background-color: #128C7E;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.send-button:hover:not(:disabled) {
    background-color: #075E54;
}

.send-button:disabled {
    background-color: #aaa;
    cursor: not-allowed;
}

/* --- Estilos para Mídia --- */
.message img, .message video {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    margin: 5px 0;
}