/* WhatsApp Floating Widget Styles - EAE Impressões */

.eae-whatsapp-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Floating Trigger Button */
.eae-whatsapp-trigger {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: #ffffff;
    border: none;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4), 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    outline: none;
}

.eae-whatsapp-trigger:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 28px rgba(37, 211, 102, 0.5), 0 6px 16px rgba(0, 0, 0, 0.2);
}

.eae-whatsapp-trigger:active {
    transform: scale(0.95);
}

/* Pulse animation behind floating button */
.eae-whatsapp-trigger::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: rgba(37, 211, 102, 0.35);
    z-index: -1;
    animation: eae-whatsapp-pulse 2s infinite;
}

@keyframes eae-whatsapp-pulse {
    0% {
        transform: scale(0.95);
        opacity: 0.8;
    }
    70% {
        transform: scale(1.35);
        opacity: 0;
    }
    100% {
        transform: scale(1.35);
        opacity: 0;
    }
}

/* Notification Badge */
.eae-whatsapp-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef4444;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    animation: eae-badge-bounce 1s ease-in-out infinite alternate;
}

@keyframes eae-badge-bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-3px); }
}

/* Tooltip on hover */
.eae-whatsapp-tooltip {
    position: absolute;
    right: 72px;
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    background: #0f172a;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.eae-whatsapp-tooltip::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px 0 6px 6px;
    border-style: solid;
    border-color: transparent transparent transparent #0f172a;
}

.eae-whatsapp-trigger:hover .eae-whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

/* Chat Box */
.eae-whatsapp-chat-box {
    position: absolute;
    bottom: 76px;
    right: 0;
    width: 360px;
    max-width: calc(100vw - 32px);
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18), 0 4px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transform-origin: bottom right;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.eae-whatsapp-chat-box.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Chat Header */
.eae-whatsapp-header {
    background: linear-gradient(135deg, #075E54 0%, #128C7E 100%);
    color: #ffffff;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.eae-whatsapp-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.eae-whatsapp-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #ffffff;
    flex-shrink: 0;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
}

.eae-whatsapp-title-group {
    display: flex;
    flex-direction: column;
}

.eae-whatsapp-title {
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    color: #ffffff;
    line-height: 1.2;
}

.eae-whatsapp-status {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 3px;
}

.eae-status-dot {
    width: 8px;
    height: 8px;
    background-color: #25D366;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px #25D366;
}

.eae-whatsapp-close-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #ffffff;
    font-size: 20px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    line-height: 1;
}

.eae-whatsapp-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Chat Body */
.eae-whatsapp-body {
    background: #efeae2;
    background-image: radial-gradient(#cbd5e1 0.75px, transparent 0.75px);
    background-size: 16px 16px;
    padding: 16px;
    max-height: 340px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.eae-whatsapp-time-divider {
    text-align: center;
    font-size: 11px;
    color: #64748b;
    background: rgba(255, 255, 255, 0.85);
    padding: 3px 10px;
    border-radius: 10px;
    align-self: center;
    font-weight: 600;
}

.eae-whatsapp-bubble {
    background: #ffffff;
    border-radius: 0 12px 12px 12px;
    padding: 12px 14px;
    max-width: 88%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    position: relative;
    align-self: flex-start;
}

.eae-whatsapp-sender {
    font-size: 12px;
    font-weight: 700;
    color: #075E54;
    margin-bottom: 4px;
}

.eae-whatsapp-bubble p {
    font-size: 13.5px;
    color: #1e293b;
    margin: 0;
    line-height: 1.45;
}

.eae-whatsapp-time {
    font-size: 10px;
    color: #94a3b8;
    float: right;
    margin-top: 4px;
    margin-left: 8px;
}

/* Quick Replies */
.eae-whatsapp-quick-replies {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
}

.eae-quick-title {
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    margin: 0 0 2px 2px;
}

.eae-whatsapp-quick-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #1e293b;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.eae-whatsapp-quick-btn i {
    color: #128C7E;
    font-size: 14px;
}

.eae-whatsapp-quick-btn:hover {
    background: #f0fdf4;
    border-color: #25D366;
    color: #075E54;
    transform: translateX(3px);
}

/* Chat Footer */
.eae-whatsapp-footer {
    background: #f8fafc;
    padding: 12px 14px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.eae-whatsapp-input {
    flex: 1;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    padding: 9px 14px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #ffffff;
}

.eae-whatsapp-input:focus {
    border-color: #128C7E;
    box-shadow: 0 0 0 3px rgba(18, 140, 126, 0.15);
}

.eae-whatsapp-send-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #128C7E;
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: background 0.2s, transform 0.15s;
    flex-shrink: 0;
}

.eae-whatsapp-send-btn:hover {
    background: #075E54;
    transform: scale(1.05);
}

.eae-whatsapp-send-btn:active {
    transform: scale(0.95);
}

@media (max-width: 480px) {
    .eae-whatsapp-widget {
        bottom: 16px;
        right: 16px;
    }
    .eae-whatsapp-chat-box {
        bottom: 70px;
        right: 0;
        width: calc(100vw - 32px);
    }
}
