/* ===== ESTILOS WHATSAPP ===== */

/* Fix para seção de conversas */
#conversations-section.section-content {
    display: none !important;
}

#conversations-section.section-content.active {
    display: flex !important;
    height: 100vh !important;
}

/* Lista de Conversas */
.whatsapp-conversation-item {
    padding: 12px 16px;
    border-bottom: 1px solid #e9edef;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
}

.whatsapp-conversation-item:hover {
    background: #f5f6f6;
}

.whatsapp-conversation-item.active {
    background: #f0f2f5;
}

.whatsapp-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 18px;
    flex-shrink: 0;
}

.whatsapp-conv-info {
    flex: 1;
    min-width: 0;
}

.whatsapp-conv-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.whatsapp-conv-name {
    font-size: 16px;
    font-weight: 500;
    color: #111b21;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.whatsapp-conv-time {
    font-size: 12px;
    color: #667781;
    white-space: nowrap;
}

.whatsapp-conv-preview {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.whatsapp-last-message {
    font-size: 14px;
    color: #667781;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.whatsapp-unread-badge {
    background: #25d366;
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    min-width: 20px;
    text-align: center;
}

/* Mensagens */
.whatsapp-message {
    display: flex;
    margin-bottom: 8px;
    animation: fadeIn 0.3s;
}

.whatsapp-message.incoming {
    justify-content: flex-start !important;
    position: relative !important;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin-bottom: 8px !important;
}

.whatsapp-message.outgoing {
    justify-content: flex-end;
    position: relative;
}

.whatsapp-bubble {
    max-width: 65%;
    padding: 6px 8px 8px 10px;
    border-radius: 8px;
    position: relative;
    word-wrap: break-word;
}

.whatsapp-message.incoming .whatsapp-bubble {
    background: white !important;
    border-top-left-radius: 0 !important;
    box-shadow: 0 1px 0.5px rgba(0,0,0,0.13) !important;
    color: #111b21 !important;
    max-width: 65% !important;
    padding: 6px 8px 8px 10px !important;
    border-radius: 8px !important;
    word-wrap: break-word !important;
}

.whatsapp-message.outgoing .whatsapp-bubble {
    background: #d9fdd3;
    border-top-right-radius: 0;
    box-shadow: 0 1px 0.5px rgba(0,0,0,0.13);
}

.whatsapp-message-text {
    font-size: 14.2px;
    line-height: 19px;
    color: #111b21;
    margin-bottom: 2px;
}

.whatsapp-message.incoming .whatsapp-message-text {
    font-size: 14.2px !important;
    line-height: 19px !important;
    color: #111b21 !important;
    margin-bottom: 2px !important;
}

.whatsapp-message-time {
    font-size: 11px;
    color: #667781;
    text-align: right;
    white-space: nowrap;
}

.whatsapp-message.outgoing .whatsapp-message-time {
    color: #667781;
}

.whatsapp-message.incoming .whatsapp-message-time {
    font-size: 11px !important;
    color: #667781 !important;
    text-align: right !important;
}

/* Scrollbars */
#messages-area::-webkit-scrollbar,
#conversations-list::-webkit-scrollbar {
    width: 6px;
}

#messages-area::-webkit-scrollbar-track,
#conversations-list::-webkit-scrollbar-track {
    background: transparent;
}

#messages-area::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.2);
    border-radius: 3px;
}

#conversations-list::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.1);
    border-radius: 3px;
}

#messages-area::-webkit-scrollbar-thumb:hover,
#conversations-list::-webkit-scrollbar-thumb:hover {
    background: rgba(0,0,0,0.3);
}
