/* ==========================================
   CONTAINER PRINCIPAL DO CHAT
   ========================================== */
#meu-chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 320px;
    border-radius: 10px;
    background-color: #ffffff;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    display: none; 
    flex-direction: column;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    z-index: 999999;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

/* ==========================================
   BOTÃO DE ABRIR/MINIMIZAR (FLUTUANTE)
   ========================================== */
#chat-minimized-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #0078d4; 
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    z-index: 999999;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: background-color 0.2s;
}

#chat-minimized-btn:hover {
    background-color: #005a9e;
}

/* ==========================================
   CABEÇALHO DO CHAT
   ========================================== */
#meu-chat-header {
    background-color: #0056b3;
    color: #ffffff;
    padding: 15px;
    font-weight: bold;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

#btn-encerrar-chat {
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    display: none;
    transition: background-color 0.2s;
}

#btn-encerrar-chat:hover { 
    background-color: #c82333; 
}

#btn-minimizar-chat {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

#btn-minimizar-chat:hover { 
    color: #cccccc; 
}

/* ==========================================
   ÁREA DE MENSAGENS E HISTÓRICO
   ========================================== */
#meu-chat-messages {
    height: 350px;
    padding: 15px;
    overflow-y: auto;
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ==========================================
   ÁREA DE DIGITAÇÃO E ANEXOS
   ========================================== */
#meu-chat-input-area {
    display: flex;
    padding: 12px;
    background-color: #ffffff;
    border-top: 1px solid #eeeeee;
    align-items: center;
}

#meu-chat-attach-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 0 8px 0 0;
    transition: transform 0.2s;
}

#meu-chat-attach-btn:hover {
    transform: scale(1.1);
}

#meu-chat-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #cccccc;
    border-radius: 6px;
    outline: none;
    font-size: 14px;
}

#meu-chat-btn {
    margin-left: 10px;
    padding: 10px 16px;
    background-color: #0056b3;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
}

/* ==========================================
   BALÕES DE MENSAGEM
   ========================================== */
.msg-sistema { 
    color: #888888; 
    font-size: 12px; 
    text-align: center; 
    margin: 5px 0; 
}

.msg-balao { 
    padding: 10px; 
    border-radius: 8px; 
    font-size: 14px; 
    max-width: 85%; 
    line-height: 1.4; 
    word-wrap: break-word;
}

.msg-voce { 
    background-color: #e2e3e5; 
    color: #333333; 
    align-self: flex-start; 
    border-bottom-left-radius: 0; 
}

.msg-atendente { 
    background-color: #d1e7dd; 
    color: #0f5132; 
    align-self: flex-end; 
    border-bottom-right-radius: 0; 
}