/**
 * WhatsApp Widget Styles
 *
 * Clean, minimal, and smooth animations for the WhatsApp floating button
 */

.whatsapp-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
}

/* WhatsApp Button */
.whatsapp-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #25D366;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    animation: slideInScale 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s backwards;
}

.whatsapp-button::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.whatsapp-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

.whatsapp-button:hover::before {
    opacity: 1;
}

.whatsapp-button:active {
    transform: scale(1.05);
}

.whatsapp-button img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    position: relative;
    z-index: 1;
}

/* Message Starter */
.whatsapp-message-starter {
    position: absolute;
    bottom: 76px;
    right: 0;
    width: 320px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 16px;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.whatsapp-message-starter.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.whatsapp-message-starter::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 20px;
    width: 16px;
    height: 16px;
    background: #fff;
    transform: rotate(45deg);
}

/* Close Button */
.whatsapp-close-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: #999;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 2;
}

.whatsapp-close-btn:hover {
    background: #f5f5f5;
    color: #333;
}

/* Message Content */
.whatsapp-message-content {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.whatsapp-message-avatar {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    background: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.whatsapp-message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.whatsapp-message-text {
    flex: 1;
    padding-right: 20px;
}

.whatsapp-message-text strong {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.whatsapp-message-text p {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

/* Pulse Animation for Button */
@keyframes pulse {
    0% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4), 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4), 0 0 0 12px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4), 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.whatsapp-button.pulse {
    animation: pulse 2s infinite;
}

/* Responsive */
@media (max-width: 768px) {
    .whatsapp-widget {
        bottom: 16px;
        right: 16px;
    }

    .whatsapp-button {
        width: 56px;
        height: 56px;
    }

    .whatsapp-button img {
        width: 32px;
        height: 32px;
    }

    .whatsapp-message-starter {
        width: calc(100vw - 32px);
        max-width: 280px;
        bottom: 72px;
    }
}

/* Smooth entrance animations */
@keyframes slideInScale {
    from {
        opacity: 0;
        transform: scale(0) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}
