/* ═══════════════════════════════════════════════════════
   MÓDULO WHATSAPP – Vigia Marca
   modulo-whatsapp.css
═══════════════════════════════════════════════════════ */

/* ── FAB ── */
.wz-fab {
    position: fixed;
    bottom: 2rem; right: 2rem;
    width: 60px; height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.7rem; color: #fff !important;
    cursor: pointer; z-index: 3000;
    box-shadow: 0 4px 20px rgba(37,211,102,0.5);
    transition: all 0.3s cubic-bezier(0.25,0.8,0.25,1);
    border: none; outline: none;
    -webkit-text-fill-color: #fff !important;
}
.wz-fab:hover,
.wz-fab:focus {
    transform: scale(1.12) rotate(-5deg);
    box-shadow: 0 8px 30px rgba(37,211,102,0.7);
    background: #20bd5a !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}
.wz-fab i,
.wz-fab:hover i,
.wz-fab:focus i {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}
.wz-fab-ping {
    position: absolute; top: -3px; right: -3px;
    width: 16px; height: 16px;
    background: #edc75c; border-radius: 50%;
    border: 2px solid #041e46;
    animation: wzPing 1.8s infinite;
}
@keyframes wzPing {
    0%   { transform: scale(1); opacity: 1; }
    70%  { transform: scale(1.6); opacity: 0; }
    100% { transform: scale(1); opacity: 0; }
}

/* ── Overlay ── */
.wz-overlay {
    position: fixed; inset: 0;
    background: rgba(4,30,70,0.8);
    backdrop-filter: blur(8px);
    z-index: 4000;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden;
    transition: all 0.35s ease;
}
.wz-overlay.wz-open { opacity: 1; visibility: visible; }

/* ── Widget ── */
.wz-widget {
    width: 90%; max-width: 400px;
    background: #0b141a;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.05);
    transform: translateY(40px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.25,0.8,0.25,1);
    border: 1px solid rgba(255,255,255,0.07);
}
.wz-overlay.wz-open .wz-widget { transform: translateY(0) scale(1); }

/* ── Header ── */
.wz-header {
    background: linear-gradient(135deg, #1f2c34 0%, #0d1f2a 100%);
    padding: 1rem 1.2rem;
    display: flex; align-items: center; gap: 0.9rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.wz-header-avatar {
    width: 44px; height: 44px; border-radius: 50%;
    background: linear-gradient(135deg,#25D366,#128C7E);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; color: #fff !important; flex-shrink: 0;
    box-shadow: 0 0 0 2px rgba(37,211,102,0.3);
    position: relative;
}
.wz-header-avatar::after {
    content: ''; position: absolute; bottom: 2px; right: 2px;
    width: 10px; height: 10px;
    background: #25D366; border-radius: 50%;
    border: 2px solid #1f2c34;
}
.wz-header-info { flex: 1; }
.wz-header-info h4 { font-size: 0.95rem; font-weight: 700; color: #e9edef !important; margin: 0 0 0.15rem; }
.wz-header-status { display: flex; align-items: center; gap: 0.4rem; font-size: 0.75rem; color: #8696a0 !important; }
.wz-status-dot { width: 7px; height: 7px; background: #25D366; border-radius: 50%; animation: wzBlink 2s infinite; }
@keyframes wzBlink { 0%,100%{opacity:1} 50%{opacity:0.3} }
.wz-close-btn {
    width: 32px; height: 32px; border-radius: 50%;
    background: rgba(255,255,255,0.06) !important; border: none;
    color: #8696a0 !important; font-size: 1rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s ease; flex-shrink: 0;
    -webkit-text-fill-color: #8696a0 !important;
}
.wz-close-btn:hover,
.wz-close-btn:focus {
    background: rgba(239,68,68,0.2) !important;
    color: #ef4444 !important;
    -webkit-text-fill-color: #ef4444 !important;
    transform: rotate(90deg);
    border: none !important;
}

/* ── Área do crawl Star Wars ── */
.wz-crawl-wrap {
    height: 120px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    padding: 0 1.5rem;
    background: linear-gradient(180deg, rgba(11,20,26,0) 0%, rgba(11,20,26,0.3) 100%);
    position: relative;
}
.wz-crawl-wrap::before,
.wz-crawl-wrap::after {
    content: '';
    position: absolute; left: 0; right: 0;
    height: 30px; z-index: 2; pointer-events: none;
}
.wz-crawl-wrap::before { top: 0; background: linear-gradient(to bottom, #0b141a, transparent); }
.wz-crawl-wrap::after  { bottom: 0; background: linear-gradient(to top, #0b141a, transparent); }
.wz-crawl-msg {
    text-align: center; font-size: 0.95rem; line-height: 1.6;
    color: #e9edef !important; opacity: 0;
    transform: translateY(30px); transition: none;
}
.wz-crawl-msg strong { color: #edc75c !important; }
.wz-crawl-msg.wz-crawl-in  { animation: wzCrawlIn  0.5s ease forwards; }
.wz-crawl-msg.wz-crawl-out { animation: wzCrawlOut 0.5s ease forwards; }
.wz-crawl-exit { animation: wzFadeOut 0.4s ease forwards; }
@keyframes wzCrawlIn  { from{opacity:0;transform:translateY(28px)} to{opacity:1;transform:translateY(0)} }
@keyframes wzCrawlOut { from{opacity:1;transform:translateY(0)} to{opacity:0;transform:translateY(-28px)} }
@keyframes wzFadeOut  { to{opacity:0} }

/* ── Opções ── */
.wz-options {
    padding: 0.5rem 1rem;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.4rem;
}
.wz-option-btn {
    background: rgba(237,199,92,0.07) !important;
    border: 1px solid rgba(237,199,92,0.2) !important;
    color: #e9edef !important;
    -webkit-text-fill-color: #e9edef !important;
    padding: 0.6rem 0.9rem;
    border-radius: 10px;
    font-size: 0.84rem; cursor: pointer; text-align: left;
    transition: all 0.2s ease;
    display: flex; align-items: center; gap: 0.6rem;
    font-family: 'Inter', sans-serif; line-height: 1.35; width: 100%;
}
.wz-option-btn:hover,
.wz-option-btn:focus {
    background: rgba(237,199,92,0.16) !important;
    border-color: rgba(237,199,92,0.45) !important;
    color: #e9edef !important;
    -webkit-text-fill-color: #e9edef !important;
    transform: translateX(4px);
}
.wz-option-btn span,
.wz-option-btn:hover span,
.wz-option-btn:focus span {
    color: #e9edef !important;
    -webkit-text-fill-color: #e9edef !important;
}
.wz-opt-icon {
    font-size: 1rem; width: 24px; text-align: center; flex-shrink: 0;
}

/* ── Input ── */
.wz-input-area {
    background: #1f2c34;
    padding: 0.65rem 1rem;
    display: flex; align-items: center; gap: 0.6rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.wz-input {
    flex: 1; background: #2a3942 !important; border: none; border-radius: 24px;
    padding: 0.6rem 1rem; color: #e9edef !important;
    font-size: 0.86rem; outline: none;
    font-family: 'Inter', sans-serif; caret-color: #25D366;
}
.wz-input::placeholder { color: #8696a0; }
.wz-send-btn {
    width: 38px; height: 38px; border-radius: 50%;
    background: #25D366 !important; border: none;
    color: #fff !important; -webkit-text-fill-color: #fff !important;
    font-size: 0.95rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s ease; flex-shrink: 0;
}
.wz-send-btn:hover,
.wz-send-btn:focus {
    background: #20bd5a !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    transform: scale(1.1);
    border: none !important;
}
.wz-send-btn i,
.wz-send-btn:hover i {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

/* ── Tela de redirect ── */
.wz-redirect-screen {
    padding: 1.5rem 1.2rem;
    display: none;
    flex-direction: column; align-items: center; gap: 0.9rem;
    text-align: center;
}
.wz-redirect-icon {
    width: 68px; height: 68px; border-radius: 50%;
    background: linear-gradient(135deg,#25D366,#128C7E) !important;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    animation: wzPop 0.5s cubic-bezier(0.175,0.885,0.32,1.275) forwards;
    box-shadow: 0 0 30px rgba(37,211,102,0.4);
}
.wz-redirect-icon i { color: #fff !important; -webkit-text-fill-color: #fff !important; }
@keyframes wzPop { from{transform:scale(0);opacity:0} to{transform:scale(1);opacity:1} }
.wz-redirect-title { font-size: 1rem; font-weight: 700; color: #e9edef !important; margin: 0; }
.wz-redirect-subtitle { font-size: 0.82rem; color: #8696a0 !important; margin: 0; }
.wz-msg-preview {
    background: #202c33; border-radius: 10px;
    padding: 0.7rem 1rem; font-size: 0.78rem; color: #8696a0 !important;
    text-align: left; width: 100%; line-height: 1.5;
    border-left: 3px solid #25D366;
}
.wz-msg-preview strong { color: #e9edef !important; display: block; margin-bottom: 0.3rem; font-size: 0.74rem; }

/* ── Botão "Abrir WhatsApp" ── */
a.wz-redirect-btn,
.wz-redirect-btn {
    background: #25D366 !important;
    background-color: #25D366 !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    border: none !important;
    border-radius: 10px; padding: 0.75rem 1.5rem;
    font-size: 0.9rem; font-weight: 700; cursor: pointer;
    display: flex; align-items: center; gap: 0.5rem;
    font-family: 'Inter', sans-serif;
    text-decoration: none !important;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(37,211,102,0.4);
    animation: wzFadeIn 0.4s 0.4s ease forwards; opacity: 0;
}
a.wz-redirect-btn:hover,
a.wz-redirect-btn:focus,
.wz-redirect-btn:hover,
.wz-redirect-btn:focus {
    background: #20bd5a !important;
    background-color: #20bd5a !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    border: none !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37,211,102,0.5) !important;
}
a.wz-redirect-btn i,
a.wz-redirect-btn:hover i,
.wz-redirect-btn i,
.wz-redirect-btn:hover i {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}
@keyframes wzFadeIn { to { opacity: 1; } }

/* ── Badge bar ── */
.wz-badge-bar {
    background: rgba(4,30,70,0.9);
    border-top: 1px solid rgba(237,199,92,0.1);
    padding: 0.45rem 1rem;
    display: flex; align-items: center; justify-content: center;
    gap: 1rem; flex-wrap: wrap;
}
.wz-badge-item { display: flex; align-items: center; gap: 0.3rem; font-size: 0.68rem; color: rgba(255,246,203,0.55) !important; }
.wz-badge-item i { color: #edc75c !important; font-size: 0.72rem; }

/* ── Responsivo ── */
@media (max-width: 480px) {
    .wz-widget { width: 96%; border-radius: 16px; }
    .wz-fab { bottom: 1.2rem; right: 1.2rem; width: 54px; height: 54px; }
}