/* assets/css/style.css */
:root {
    --mcw-shadow: 0 10px 40px -5px rgba(0, 0, 0, 0.2);
    --mcw-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

#mcw-container { position: fixed; bottom: 20px; right: 20px; z-index: 999990; font-family: var(--mcw-font); display: block; }

#mcw-trig { 
    width: 60px; height: 60px; background: var(--mcw-c); border-radius: 50%; 
    cursor: pointer; display: flex; align-items: center; justify-content: center; 
    color: #fff; box-shadow: 0 4px 15px rgba(0,0,0,0.3); transition: transform 0.2s; 
    position: relative; z-index: 10;
}
#mcw-trig:hover { transform: scale(1.1); }
.mcw-icon { fill: white; width: 30px; height: 30px; }
#mcw-badge { 
    position: absolute; top: -2px; right: -2px; background: #ff3b30; color: #fff; 
    width: 20px; height: 20px; border-radius: 50%; font-size: 11px; display: none; 
    align-items: center; justify-content: center; font-weight: bold; border: 2px solid #fff; 
    animation: mcwPulse 2s infinite; 
}

#mcw-card { 
    position: absolute; bottom: 80px; right: 0; background: #fff; width: 280px; 
    padding: 15px; border-radius: 12px; box-shadow: 0 5px 25px rgba(0,0,0,0.15); 
    display: none; flex-direction: column; gap: 8px; z-index: 5; border: 1px solid #eee; 
    animation: mcwFadeIn 0.3s ease; 
}
.mcw-c-close { position: absolute; top: 8px; right: 8px; cursor: pointer; color: #999; padding: 5px; }
.mcw-c-title { font-weight: 800; font-size: 15px; color: #333; }
.mcw-c-text { font-size: 13px; color: #666; }
.mcw-c-btn { background: var(--mcw-c); color: #fff; border: none; padding: 10px; border-radius: 6px; font-weight: bold; cursor: pointer; text-align: center; margin-top: 5px; width: 100%; }

#mcw-win { 
    position: fixed; bottom: 90px; right: 20px; width: 360px; height: 550px; max-height: 80vh; 
    background: #fff; border-radius: 16px; box-shadow: var(--mcw-shadow); 
    display: none; flex-direction: column; overflow: hidden; border: 1px solid #e5e7eb; 
    z-index: 999999; animation: mcwSlideUp 0.3s ease;
}

.mcw-head { background: var(--mcw-c); color: #fff; padding: 15px; display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; }
.mcw-profile { display: flex; align-items: center; }
.mcw-av { width: 36px; height: 36px; border-radius: 50%; margin-right: 10px; border: 2px solid rgba(255,255,255,0.8); object-fit: cover; }
.mcw-name { font-weight: bold; font-size: 15px; }
.mcw-status { font-size: 12px; opacity: 0.9; display: block; }
.mcw-close-win { cursor: pointer; font-size: 18px; padding: 5px; }

.mcw-msgs { flex: 1; padding: 15px; overflow-y: auto; background: #f3f4f6; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; }
.mcw-m { padding: 10px 14px; border-radius: 12px; max-width: 85%; font-size: 15px; line-height: 1.4; word-wrap: break-word; box-shadow: 0 1px 1px rgba(0,0,0,0.05); }
.mcw-bot { background: #fff; align-self: flex-start; border-bottom-left-radius: 2px; color: #1f2937; }
.mcw-user { background: var(--mcw-c); align-self: flex-end; border-bottom-right-radius: 2px; color: #fff; }

#mcw-inp-area { padding: 10px; border-top: 1px solid #e5e7eb; display: flex; gap: 8px; background: #fff; align-items: center; flex-shrink: 0; min-height: 70px; }
#mcw-inp { flex: 1; border: 1px solid #e5e7eb; padding: 12px 15px; border-radius: 25px; outline: none; font-size: 16px; background: #f9fafb; }
#mcw-inp:focus { background: #fff; border-color: var(--mcw-c); }
.btn-send { background: var(--mcw-c); color: #fff; border: none; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

.mcw-opts-container { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; justify-content: flex-end; }
.mcw-opt-btn { background: #fff; border: 1px solid var(--mcw-c); color: var(--mcw-c); padding: 8px 12px; border-radius: 20px; cursor: pointer; font-size: 13px; transition: 0.2s; }
.mcw-opt-btn:hover { background: var(--mcw-c); color: #fff; }

.typing-dots { display: none; background: #fff; padding: 8px 12px; border-radius: 12px; width: fit-content; margin-left: 15px; margin-bottom: 10px; border-bottom-left-radius: 2px; }
.dot { height: 6px; width: 6px; background-color: #9ca3af; border-radius: 50%; display: inline-block; margin: 0 2px; animation: bounce 1.4s infinite ease-in-out both; }
.dot:nth-child(1) { animation-delay: -0.32s; } .dot:nth-child(2) { animation-delay: -0.16s; }

/* ESTILO DO BOTÃO WHATSAPP FINAL */
.mcw-wa-btn {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; padding: 12px;
    background: #25D366; color: white !important;
    border-radius: 8px; text-decoration: none !important;
    font-weight: 700; font-size: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}
.mcw-wa-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 8px rgba(0,0,0,0.2); }
.mcw-wa-icon { fill: white; width: 20px; height: 20px; }

@keyframes bounce { 0%, 80%, 100% { transform: scale(0); } 40% { transform: scale(1); } }
@keyframes mcwSlideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes mcwFadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes mcwPulse { 0% { transform: scale(1); } 50% { transform: scale(1.1); } 100% { transform: scale(1); } }

@media(max-width: 600px) { 
    #mcw-win { 
        top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
        width: 100% !important; height: 100dvh !important; max-height: none !important; margin: 0 !important; border-radius: 0 !important;
        z-index: 2147483647 !important; 
    }
    .mcw-head { padding-top: max(15px, env(safe-area-inset-top)); }
    #mcw-inp-area { padding-bottom: max(10px, env(safe-area-inset-bottom)); }
    #mcw-card { position: fixed !important; bottom: 90px !important; left: 20px !important; right: 20px !important; width: auto !important; }
}