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

body, html {
    width: 100%;
    height: 100%;
    font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #0b141a;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Container do WhatsApp */
.whatsapp-container {
    width: 100%;
    max-width: 500px;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: #0b141a;
    background-image: url('https://user-images.githubusercontent.com/15075759/28719144-86dc0f70-73b1-11e7-911d-60d70fcded21.png'); /* Padrão de fundo clássico do WhatsApp */
    background-blend-mode: overlay;
    background-opacity: 0.06;
    position: relative;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}

@media(min-width: 501px) {
    .whatsapp-container {
        height: 92%;
        border-radius: 12px;
        overflow: hidden;
    }
}

/* Cabeçalho do Chat */
.chat-header {
    background-color: #202c33;
    color: #e9edef;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
    z-index: 10;
}

.chat-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-arrow {
    color: #aebac1;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.avatar-wrapper {
    position: relative;
}

.avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background-color: white; /* Garante fundo branco se a logo tiver transparência */
}

.avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00bfa5, #00796b);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: white;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.online-indicator {
    width: 10px;
    height: 10px;
    background-color: #00e676;
    border: 2px solid #202c33;
    border-radius: 50%;
    position: absolute;
    bottom: 0;
    right: 0;
}

.contact-info {
    display: flex;
    flex-direction: column;
}

.contact-name {
    font-size: 16px;
    font-weight: 600;
    color: #e9edef;
}

.contact-status {
    font-size: 12px;
    color: #8696a0;
}

.chat-header-actions {
    display: flex;
    gap: 16px;
    color: #aebac1;
    cursor: pointer;
}

/* Corpo da Mensagem */
.chat-body {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scroll-behavior: smooth;
}

.chat-date {
    align-self: center;
    background-color: #182229;
    color: #8696a0;
    font-size: 11px;
    padding: 6px 12px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 1px 1px rgba(0,0,0,0.2);
    margin-bottom: 8px;
}

/* Balões de Chat */
.message {
    max-width: 85%;
    padding: 8px 12px 14px 12px;
    border-radius: 8px;
    font-size: 14.5px;
    line-height: 1.4;
    position: relative;
    word-wrap: break-word;
    animation: scaleUp 0.25s cubic-bezier(0.1, 0.8, 0.3, 1);
    transform-origin: left bottom;
}

.message-time {
    position: absolute;
    bottom: 2px;
    right: 7px;
    font-size: 10px;
    color: #8696a0;
}

.message.received {
    align-self: flex-start;
    background-color: #202c33;
    color: #e9edef;
    border-top-left-radius: 0;
}

.message.sent {
    align-self: flex-end;
    background-color: #005c4b;
    color: #e9edef;
    border-top-right-radius: 0;
    transform-origin: right bottom;
}

.message.sent .message-time {
    color: #aebac1;
    display: flex;
    align-items: center;
    gap: 3px;
}

/* Estilização específica para destacar perguntas e negritos */
.message strong {
    color: #00a884;
}

.message.sent strong {
    color: #fff;
}

/* Indicador de Digitando */
.typing-bubble {
    align-self: flex-start;
    background-color: #202c33;
    padding: 12px 16px;
    border-radius: 8px;
    border-top-left-radius: 0;
    display: flex;
    gap: 4px;
    align-items: center;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background-color: #8696a0;
    border-radius: 50%;
    animation: typing 1.2s infinite ease-in-out;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

/* Barra inferior e Inputs */
.chat-footer {
    background-color: #202c33;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
}

.chat-input-area {
    display: flex;
    align-items: center;
    gap: 8px;
}

.input-container {
    flex: 1;
    background-color: #2a3942;
    border-radius: 24px;
    padding: 5px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.emoji-icon {
    color: #8696a0;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: #e9edef;
    font-size: 15px;
    padding: 6px 0;
}

.input-wrapper input::placeholder {
    color: #8696a0;
}

.send-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: #00a884;
    color: white;
    border: none;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.send-btn:disabled {
    background-color: #2a3942;
    color: #8696a0;
    cursor: not-allowed;
}

.send-btn:active:not(:disabled) {
    transform: scale(0.95);
}

/* Opções Rápidas (Botões de Escolha) */
.quick-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 4px;
    animation: fadeInUp 0.3s ease-out;
}

.btn-option {
    background-color: #111b21;
    color: #00a884;
    border: 1px solid #2a3942;
    padding: 10px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-grow: 1;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.btn-option:hover {
    background-color: #00a884;
    color: #111b21;
    border-color: #00a884;
}

.btn-option:active {
    transform: scale(0.97);
}

/* Botão final do WhatsApp */
.btn-whatsapp-finish {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #25d366;
    color: white;
    font-weight: 700;
    text-decoration: none;
    padding: 12px 20px;
    border-radius: 24px;
    margin-top: 10px;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
    animation: pulse 2s infinite;
}

.btn-whatsapp-finish:hover {
    background-color: #20ba5a;
}

/* Animações */
@keyframes typing {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes scaleUp {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

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

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}
