/* ═══════════════════════════════════════════════════════════════════════════
   WHATSAPP STYLE LANDING PAGE - CSS
   Projeto: Dramas Vip - Séries Completas
   
   ★★★ CORES PRINCIPAIS (fácil customização) ★★★
   Edite as variáveis abaixo para mudar as cores do tema
═══════════════════════════════════════════════════════════════════════════ */

:root {
    /* Cores principais do WhatsApp */
    --whatsapp-dark-green: #075e54;
    --whatsapp-light-green: #25d366;
    --whatsapp-teal: #128c7e;
    --whatsapp-blue: #34b7f1;
    
    /* Cores de fundo */
    --bg-primary: #0a1416;
    --bg-secondary: #0f1a1c;
    /* Paleta de suporte */
    --bg-chat: #0b1416;
    --text-primary: #e9edef;
    --text-secondary: #98a2a2;
    --icon-color: #ffffff;
    --online-color: #25d366;
    --bg-tertiary: rgba(255,255,255,0.03);
    --shadow-light: 0 1px 0 rgba(255,255,255,0.02);
    --radius-lg: 12px;
    --transition-fast: 0.12s;
}

/* Fonte: usar a mesma pilha do WhatsApp (sistema, Roboto, Helvetica) */
html, body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--text-primary);
    background: var(--bg-primary);
}

.whatsapp-container { font-family: inherit; }
/* Container principal */
.whatsapp-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    max-width: 100%;
    margin: 0 auto;
    background: var(--bg-chat);
    position: relative;
    overflow: hidden;
    animation: containerFadeIn 0.5s ease-out;
}

@keyframes containerFadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

/* Desktop: limitar largura e centralizar */
@media (min-width: 768px) {
    body {
        display: flex;
        justify-content: center;
        align-items: center;
        background: #0a0f12;
    }
    
    .whatsapp-container {
        max-width: 450px;
        height: 95vh;
        max-height: 900px;
        border-radius: var(--radius-lg);
        box-shadow: 0 0 60px rgba(0, 0, 0, 0.5);
        overflow: hidden;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   HEADER - Área superior do chat
═══════════════════════════════════════════════════════════════════════════ */
.chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background: linear-gradient(180deg, rgba(14,23,23,0.95), rgba(10,18,18,0.98));
    border-bottom: 1px solid rgba(255,255,255,0.03);
    flex-shrink: 0;
    z-index: 100;
    min-height: 56px;
    position: relative; /* allow centering contact-info */
}

.header-left {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
}

.contact-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    min-width: 0;
    padding-right: 8px;
    position: static;
    margin-left: 6px;
    max-width: calc(100% - 140px);
    gap: 2px;
    margin-top: 4px;
}

.back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--icon-color);
    cursor: pointer;
    border-radius: 50%;
    transition: background var(--transition-fast);
    flex-shrink: 0;
}

.back-btn:hover {
    background: var(--bg-tertiary);
}

.profile-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
    background: transparent; /* show actual image without gradient overlay */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 4px;
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    image-rendering: auto;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
}

/* selo verificado (header e thumb) */
.verified-badge {
    position: absolute;
    right: -4px;
    bottom: -4px;
    width: 18px;
    height: 18px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.4);
    border: 2px solid rgba(0,0,0,0.12);
}

.verified-badge svg { transform: translateY(1px); }

.thumb-verified {
    width: 12px !important;
    height: 12px !important;
    right: -6px;
    bottom: -6px;
    position: absolute;
}

/* ocultar selo verificado na foto do header */
#headerVerified, .verified-badge { display: none !important; }

/* startup image centralizada no início da conversa */
.startup-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 20px 0 8px 0;
}
.startup-image-inner {
    width: 220px;
    height: 220px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.03);
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.startup-image-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: auto;
}

/* posicionamento da thumb dentro do balão de áudio */
.audio-message { position: relative; }
.audio-message .message-profile-thumb { position: relative; z-index: 2; }

/* Posicionamento e estilo da thumb dentro do bloco de áudio */
.audio-message { position: relative; padding-left: 46px; }
.audio-message .message-profile-thumb {
    position: absolute;
    left: 8px;
    top: 6px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.6);
    border: 2px solid rgba(0,0,0,0.25);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
}
.audio-message .message-profile-thumb img{ width:100%; height:100%; object-fit:cover; display:block; background: transparent }
.audio-message .thumb-verified{ /* removed: audio-specific badge positioning */ }
.audio-message .message-bubble{ margin-left: 8px }

/* Modal de visualização da imagem de perfil */
.image-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
    padding: 20px;
}

.image-modal.open {
    display: flex;
}

.image-modal .modal-content {
    max-width: 90%;
    max-height: 90%;
    background: transparent;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.6);
}

.image-modal img {
    width: 100%;
    height: auto;
    display: block;
}

.image-modal .close-btn {
    position: absolute;
    top: 18px;
    right: 20px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10000;
}

.profile-photo .profile-initial {
    position: absolute;
    color: white;
    font-size: 14px;
    font-weight: 600;
    display: none;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.profile-photo.no-image .profile-initial {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.profile-photo.no-image {
    background: linear-gradient(135deg, #e63946 0%, #1d3557 50%, #457b9d 100%);
    position: relative;
}

.profile-photo.no-image::after {
    content: '🍿';
    position: absolute;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.contact-info {
    flex: 1;
    min-width: 0;
    padding-right: 8px;
}

.contact-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0 0 0 0;
    line-height: 1.05;
    max-width: 140px;
    text-align: left;
}

.contact-status {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 0px;
}

.status-text {
    font-size: 13px;
    color: var(--text-secondary);
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--online-color);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.header-right {
    display: flex;
    align-items: center;
    gap: 2px;
}

.header-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    color: var(--icon-color);
    cursor: pointer;
    border-radius: 50%;
    transition: background var(--transition-fast);
}

.header-btn:hover {
    background: var(--bg-tertiary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   ÁREA DE MENSAGENS
═══════════════════════════════════════════════════════════════════════════ */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    scroll-behavior: smooth;
}

.chat-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-chat);
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.6;
    pointer-events: none;
}

/* badge central de 'Hoje' */
.today-badge {
    display: inline-block;
    margin: 14px auto 10px auto;
    background: transparent;
    color: var(--text-secondary);
    padding: 0;
    border-radius: 0;
    font-size: 13px;
    text-align: center;
}

/* aviso de criptografia centralizado (estilo WhatsApp dark) */
.encryption-notice{
    max-width: 84%;
    margin: 8px auto 18px auto;
    background: rgba(64,58,52,0.9);
    color: #f6e7b6;
    padding: 14px 14px;
    border-radius: 10px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    box-shadow: 0 6px 18px rgba(0,0,0,0.5);
    line-height: 1.3;
    font-size: 13px;
}
.encryption-notice .lock{
    font-size: 20px;
    margin-top: 2px;
    color: #f7c948;
    flex: 0 0 26px;
}
.encryption-notice .notice-text{ color: #f6e7b6; font-size:13px }
.encryption-notice .saiba-mais{ color: #f6e7b6; font-weight:600; text-decoration: underline; margin-left:4px }

/* Footer: entrada parecido com o exemplo */
.chat-footer{
    display:flex;
    align-items:center;
    gap:10px;
    padding:10px;
    background: linear-gradient(180deg, rgba(10,14,14,0.6), rgba(8,10,10,0.8));
}
.pre-video-prompt {
    background: transparent !important;
}
.pre-video-prompt .message-text{
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
}
.pre-video-prompt .message-bubble{
    background: transparent;
    box-shadow: none;
    padding: 0;
}
.input-area{ display:flex; align-items:center; gap:8px; flex:1 }
.input-area .emoji-btn, .input-area .attach-btn{ width:36px; height:36px; border-radius:50%; background:transparent; display:flex; align-items:center; justify-content:center; border:none; color:var(--icon-color) }
.text-input{ flex:1 }
.text-input input{ width:100%; padding:12px 14px; border-radius:24px; border:none; background: rgba(0,0,0,0.35); color:var(--text-primary); outline:none }
.mic-btn{ width:44px; height:44px; border-radius:50%; background:linear-gradient(180deg,#2f2f2f,#1f1f1f); display:flex; align-items:center; justify-content:center; border:none; color:var(--icon-color) }


.messages-container {
    position: relative;
    z-index: 1;
    padding: 18px 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 100%;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MENSAGENS - Estilos gerais
═══════════════════════════════════════════════════════════════════════════ */
.message {
    display: flex;
    animation: messageAppear 0.26s ease-out;
    max-width: 86%;
}

@keyframes messageAppear {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.message.incoming {
    align-self: flex-start;
}

.message.outgoing {
    align-self: flex-end;
}

.message-bubble {
    background: linear-gradient(180deg, rgba(15,42,42,0.9), rgba(12,36,36,0.98));
    padding: 10px 12px;
    border-radius: 18px;
    border-top-left-radius: 6px;
    position: relative;
    box-shadow: 0 2px 0 rgba(0,0,0,0.15) inset, var(--shadow-light);
    max-width: 72ch;
}

.message.outgoing .message-bubble {
    background: linear-gradient(180deg,#25d366,#1fbf5a);
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: 6px;
}

.message-bubble::before {
    content: '';
    position: absolute;
    top: 0;
    width: 12px;
    height: 12px;
}

.message.incoming .message-bubble::before {
    left: -6px;
    background: linear-gradient(135deg, transparent 50%, var(--message-incoming) 50%);
}

.message.outgoing .message-bubble::before {
    right: -6px;
    background: linear-gradient(-135deg, transparent 50%, var(--message-outgoing) 50%);
}

.message-text {
    font-size: 14.5px;
    line-height: 1.45;
    color: var(--text-primary);
    word-wrap: break-word;
    white-space: pre-wrap;
}

.message-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    margin-top: 2px;
}

.message-time {
    font-size: 11px;
    color: var(--text-secondary);
}

/* ===== Estilos de mensagem de áudio mais fiéis ao WhatsApp ===== */
.audio-message {
    align-items: flex-end;
    gap: 8px;
}

.audio-message .message-profile-thumb {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 1px 0 rgba(0,0,0,0.2);
}

.audio-message .message-bubble {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(18,30,30,0.9), rgba(15,26,26,0.98));
}

.audio-message .play-pause-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(180deg,#00a884,#008f73);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 6px rgba(0,0,0,0.3);
    border: none;
    cursor: pointer;
}

.audio-message .audio-content {
    flex: 1;
    min-width: 80px;
}

/* Novo layout: player-thumb substitui o círculo verde */
.audio-player {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.player-thumb-wrap {
    position: relative;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.player-thumb {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.player-thumb-wrap .play-pause-btn {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.32);
    backdrop-filter: blur(2px);
    border-radius: 50%;
    border: none;
}

.player-thumb-wrap .play-pause-btn svg { filter: drop-shadow(0 1px 1px rgba(0,0,0,0.6)); }

.audio-player .audio-duration { margin-left: 8px; }

.audio-message .audio-waveform {
    height: 26px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.audio-message .waveform-bar {
    width: 3px;
    background: rgba(255,255,255,0.18);
    border-radius: 2px;
}

.audio-message .waveform-bar.played {
    background: rgba(255,255,255,0.9);
}

.audio-message .audio-duration {
    font-size: 12px;
    color: var(--text-secondary);
    margin-left: 8px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   INDICADOR DE DIGITANDO
═══════════════════════════════════════════════════════════════════════════ */
.typing-indicator .message-bubble {
    padding: 12px 16px;
}

.typing-animation {
    display: flex;
    align-items: center;
    gap: 4px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: var(--text-secondary);
    border-radius: 50%;
    animation: typingBounce 1.4s 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 typingBounce {
    0%, 80%, 100% { transform: scale(1); opacity: 0.4; }
    40% { transform: scale(1.2); opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   INDICADOR DE GRAVANDO ÁUDIO
═══════════════════════════════════════════════════════════════════════════ */
.recording-indicator .recording-bubble {
    padding: 10px 14px;
    background: var(--message-incoming);
    min-width: 200px;
}

.recording-animation {
    display: flex;
    align-items: center;
    gap: 10px;
}

.recording-icon {
    animation: recordingPulse 1s infinite;
}

@keyframes recordingPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.recording-waves {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 20px;
    flex: 1;
}

.wave {
    width: 2px;
    height: 8px;
    background: var(--whatsapp-teal);
    border-radius: 1px;
    animation: waveAnimation 1s infinite ease-in-out;
}

.wave:nth-child(1) { animation-delay: 0s; height: 10px; }
.wave:nth-child(2) { animation-delay: 0.15s; height: 16px; }
.wave:nth-child(3) { animation-delay: 0.3s; height: 12px; }
.wave:nth-child(4) { animation-delay: 0.45s; height: 18px; }
.wave:nth-child(5) { animation-delay: 0.6s; height: 8px; }
.wave:nth-child(6) { animation-delay: 0.75s; height: 14px; }
.wave:nth-child(7) { animation-delay: 0.9s; height: 10px; }

@keyframes waveAnimation {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(0.5); }
}

.recording-text {
    font-size: 13px;
    color: var(--text-secondary);
    font-style: normal;
    letter-spacing: 0.2px;
}

/* Timer do gravando (estilo WhatsApp real) */
.recording-timer {
    font-size: 13px;
    color: var(--recording-color);
    font-variant-numeric: tabular-nums;
    min-width: 35px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PLAYER DE ÁUDIO - Estilo WhatsApp
═══════════════════════════════════════════════════════════════════════════ */
.audio-message .message-bubble {
    padding: 8px 12px;
    min-width: 260px;
    max-width: 320px;
}

.audio-player {
    display: flex;
    align-items: center;
    gap: 10px;
}

.play-pause-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--whatsapp-teal);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-medium);
}

.play-pause-btn:hover {
    background: var(--whatsapp-dark-green);
    transform: scale(1.05);
}

.play-pause-btn:active {
    transform: scale(0.95);
}

.audio-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.audio-waveform {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 28px;
}

.waveform-bar {
    width: 3px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: background var(--transition-fast);
}
}

.audio-progress {
    position: relative;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    cursor: pointer;
}

.audio-progress-bar {
    height: 100%;
    background: var(--whatsapp-teal);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

.audio-progress-thumb {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    box-shadow: var(--shadow-medium);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.audio-progress:hover .audio-progress-thumb,
.audio-player.playing .audio-progress-thumb {
    opacity: 1;
}

.audio-duration {
    font-size: 12px;
    color: var(--text-secondary);
    min-width: 36px;
    text-align: right;
}

.audio-element {
    display: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MENSAGEM DE VÍDEO / EMBED VTURB
═══════════════════════════════════════════════════════════════════════════ */
.video-message .video-bubble {
    padding: 4px;
    overflow: hidden;
    max-width: 340px;
    width: 100%;
}

.video-embed-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* Aspect ratio 16:9 */
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #000;
}

.video-embed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.vturb-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
}

.placeholder-content {
    text-align: center;
    color: white;
    animation: placeholderPulse 2s infinite;
}

@keyframes placeholderPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

.placeholder-content svg {
    margin-bottom: 12px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.placeholder-content p {
    font-size: 14px;
    margin-bottom: 4px;
}

.placeholder-content small {
    font-size: 11px;
    opacity: 0.6;
}

.video-meta {
    padding: 6px 8px 4px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FOOTER - Área de entrada
═══════════════════════════════════════════════════════════════════════════ */
.chat-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    flex-shrink: 0;
}

.input-area {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-tertiary);
    border-radius: 24px;
    padding: 6px 12px;
}

.emoji-btn,
.attach-btn,
.camera-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--icon-color);
    cursor: pointer;
    border-radius: 50%;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.emoji-btn:hover,
.attach-btn:hover,
.camera-btn:hover {
    color: var(--text-primary);
}

.text-input {
    flex: 1;
}

.text-input input {
    width: 100%;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 15px;
    padding: 8px 4px;
    outline: none;
}

.text-input input::placeholder {
    color: var(--text-secondary);
}

.mic-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: var(--whatsapp-teal);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-medium);
}

.mic-btn:hover {
    background: var(--whatsapp-dark-green);
    transform: scale(1.05);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SCROLLBAR
═══════════════════════════════════════════════════════════════════════════ */
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVIDADE
═══════════════════════════════════════════════════════════════════════════ */
@media (min-width: 481px) and (max-width: 767px) {
    .messages-container {
        padding: 16px 20px;
    }
    
    .message {
        max-width: 80%;
    }
}

@media (min-width: 768px) {
    .back-btn {
        display: none;
    }
    
    .chat-header {
        padding-left: 16px;
    }
    
    .profile-photo {
        width: 45px;
        height: 45px;
    }
    
    .contact-name {
        font-size: 17px;
    }
    
    .messages-container {
        padding: 20px 24px;
    }
    
    .message {
        max-width: 75%;
    }
    
    .audio-message .message-bubble {
        min-width: 280px;
        max-width: 340px;
    }
    
    .video-message .video-bubble {
        max-width: 380px;
    }
}

@media (max-width: 360px) {
    .contact-name {
        font-size: 14px;
    }
    
    .contact-status {
        font-size: 12px;
    }
    
    .header-btn {
        width: 36px;
        height: 36px;
    }
    
    .audio-message .message-bubble {
        min-width: 220px;
    }
}

@supports (padding: max(0px)) {
    .chat-header {
        padding-top: max(10px, env(safe-area-inset-top));
    }
    
    .chat-footer {
        padding-bottom: max(8px, env(safe-area-inset-bottom));
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   UTILITÁRIOS
═══════════════════════════════════════════════════════════════════════════ */
.hidden {
    display: none !important;
}

*:focus-visible {
    outline: 2px solid var(--whatsapp-teal);
    outline-offset: 2px;
}
