/* WhatsApp Floating Widget */

.whatsapp-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.whatsapp-widget.hidden {
    display: none;
}

/* Greeting Message */
.whatsapp-greeting {
    background: #ffffff;
    border-radius: 15px;
    padding: 12px 16px;
    box-shadow: 0 4px 12px rgba(31, 38, 135, 0.15);
    animation: slideInUp 0.3s ease-out;
    opacity: 0;
    animation: slideInUp 0.3s ease-out forwards;
    max-width: 200px;
    text-align: right;
}

.whatsapp-greeting span {
    color: #333333;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    display: block;
}

.whatsapp-greeting::after {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 20px;
    width: 12px;
    height: 12px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(31, 38, 135, 0.1);
}

/* WhatsApp Button */
.whatsapp-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25d366 0%, #1fa755 100%);
    border-radius: 50%;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    animation: bounce 0.6s ease-in-out 0.5s;
    position: relative;
    overflow: hidden;
}

.whatsapp-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.whatsapp-button:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

.whatsapp-button:hover::before {
    width: 300px;
    height: 300px;
}

.whatsapp-button:active {
    transform: scale(0.95);
}

.whatsapp-button i {
    width: 30px;
    height: 30px;
    color: #ffffff;
    font-size: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.6);
    }
}

/* Pulsing animation when widget first loads */
.whatsapp-widget.pulse .whatsapp-button {
    animation: pulse 2s infinite;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .whatsapp-widget {
        bottom: 15px;
        right: 15px;
    }

    .whatsapp-greeting {
        max-width: 160px;
        padding: 10px 14px;
    }

    .whatsapp-greeting span {
        font-size: 13px;
    }

    .whatsapp-button {
        width: 55px;
        height: 55px;
    }

    .whatsapp-button i {
        width: 26px;
        height: 26px;
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .whatsapp-widget {
        bottom: 10px;
        right: 10px;
    }

    .whatsapp-greeting {
        display: none;
    }

    .whatsapp-button {
        width: 50px;
        height: 50px;
    }

    .whatsapp-button i {
        width: 24px;
        height: 24px;
        font-size: 22px;
    }
}
