/* Configurações Gerais */
body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f7f6;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

#chat-container {
    width: 100%;
    max-width: 450px;
    height: 600px;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Cabeçalho com Logo */
#header {
    background-color: #ffffff;
    padding: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 2px solid #e30613; /* Linha vermelha Aiwa */
}

.logo-aiwa {
    height: 30px; /* Ajustado conforme a imagem original */
    width: auto;
}

#messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background-color: #f9f9f9;
}

/* Container da mensagem do BOT (Avatar + Bolha) */
.bot-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    align-self: flex-start;
}

.avatar-bot {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #ddd;
}

.bot {
    background-color: #ffffff;
    color: #333;
    padding: 12px 18px;
    border-radius: 15px 15px 15px 0;
    max-width: 280px;
    font-size: 0.95rem;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.05);
}

/* Mensagem do Usuário */
.user {
    background-color: #e30613;
    color: white;
    padding: 12px 18px;
    border-radius: 15px 15px 0 15px;
    max-width: 80%;
    align-self: flex-end;
    font-size: 0.95rem;
}

/* Animação Gênio */
@keyframes genie {
    0% { opacity: 0; transform: scale(0) translateY(20px); transform-origin: bottom left; }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.new-message {
    animation: genie 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

/* Digitando */
.typing-container {
    display: flex;
    gap: 5px;
    padding: 10px 15px;
    margin-left: 43px; /* Alinhado após o avatar */
}

.dot {
    width: 6px;
    height: 6px;
    background-color: #e30613;
    border-radius: 50%;
    animation: press 1.2s infinite ease-in-out;
}
.dot:nth-child(2) { animation-delay: 0.2s; }
.dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes press {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scaleY(0.6); opacity: 1; }
}

#controls { padding: 15px; display: flex; gap: 8px; background: white; }
button { background: #e30613; color: white; border: none; padding: 10px 20px; border-radius: 20px; cursor: pointer; font-weight: bold; }
input { flex: 1; padding: 10px; border: 1px solid #ddd; border-radius: 20px; outline: none; }
.hidden { display: none !important; }

/* Banner de Cookies */
#cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 400px; /* Não ocupa a tela toda */
    background: rgba(34, 34, 34, 0.95);
    backdrop-filter: blur(5px); /* Efeito vidro */
    color: #fff;
    padding: 20px;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    width: 100%;
}

.btn-accept { background-color: #e30613; flex: 2; }
.btn-reject { background-color: transparent; border: 1px solid #666; flex: 1; }

#cookie-banner p { font-size: 0.8rem; margin: 0; }
#cookie-banner a { color: #e30613; text-decoration: none; font-weight: bold; }

.chat-locked {
    filter: grayscale(1) opacity(0.5);
    pointer-events: none; /* Impede qualquer clique */
    user-select: none;
}

.notice-box {
    background: #fff3f3;
    border: 1px solid #e30613;
    color: #e30613;
    padding: 15px;
    border-radius: 10px;
    margin-top: 10px;
    font-size: 0.9rem;
    text-align: center;
}