/* WhatsApp Floating Button - Premium Animated Design */

.whatsapp-chat-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
}

.whatsapp-float {
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: #fff;
    border-radius: 50%;
    text-align: center;
    font-size: 35px;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: whatsappPulse 3s infinite;
    border: none;
    cursor: pointer;
    position: relative;
}

.whatsapp-header-info h4 {
    color: var(--white-color);
}

/* Pulsing outer ring animation */
.whatsapp-float::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(37, 211, 102, 0.4);
    z-index: -1;
    animation: innerRipple 2s infinite ease-out;
}

.whatsapp-float::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(37, 211, 102, 0.2);
    z-index: -2;
    animation: outerRipple 3s infinite ease-out;
}

.whatsapp-float:hover {
    transform: scale(1.1) translateY(-5px);
    background: linear-gradient(135deg, #128c7e 0%, #075e54 100%);
    box-shadow: 0 15px 35px rgba(18, 140, 126, 0.5);
}

/* Chat Window Styles */
.whatsapp-chat-window {
    position: absolute;
    bottom: 85px;
    right: 0;
    width: 320px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transform: scale(0);
    transform-origin: bottom right;
    transition: all 0.4s cubic-bezier(0.5, 0, 0, 1.25);
    opacity: 0;
    visibility: hidden;
}

.whatsapp-chat-window.active {
    transform: scale(1);
    opacity: 1;
    visibility: visible;
}

.whatsapp-header {
    background: #075e54;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: #fff;
    position: relative;
}

.whatsapp-avatar {
    position: relative;
}

.whatsapp-avatar img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 50%;
    background: #fff;
    padding: 5px;
}

.online-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    background: #25d366;
    border: 2px solid #075e54;
    border-radius: 50%;
}

.whatsapp-header-info h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.whatsapp-header-info p {
    margin: 0;
    font-size: 12px;
    opacity: 0.8;
}

.close-whatsapp {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.7;
    transition: 0.3s;
}

.close-whatsapp:hover {
    opacity: 1;
}

.whatsapp-body {
    padding: 20px;
    background: #e5ddd5;
    /* Classic WhatsApp background color */
    background-image: url('https://user-images.githubusercontent.com/15075759/28719144-86dc0f70-73b1-11e7-911d-60d70fcded21.png');
    min-height: 120px;
}

.whatsapp-message {
    background: #fff;
    padding: 12px 15px;
    border-radius: 0 15px 15px 15px;
    max-width: 85%;
    position: relative;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

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

.message-time {
    display: block;
    font-size: 10px;
    color: #999;
    text-align: right;
    margin-top: 5px;
}

.whatsapp-footer {
    padding: 15px 20px;
    background: #f0f0f0;
}

.start-chat-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #25d366;
    color: #fff;
    text-decoration: none;
    padding: 12px;
    border-radius: 50px;
    font-weight: 600;
    transition: 0.3s;
    font-size: 15px;
}

.start-chat-btn:hover {
    background: #128c7e;
    color: #fff;
    transform: translateY(-2px);
}

@keyframes whatsappPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes innerRipple {
    0% {
        width: 100%;
        height: 100%;
        opacity: 1;
    }

    100% {
        width: 140%;
        height: 140%;
        opacity: 0;
    }
}

@keyframes outerRipple {
    0% {
        width: 100%;
        height: 100%;
        opacity: 0.8;
    }

    100% {
        width: 180%;
        height: 180%;
        opacity: 0;
    }
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
    .whatsapp-chat-window {
        width: 280px;
        bottom: 75px;
    }

    .whatsapp-float {
        width: 55px;
        height: 55px;
        font-size: 30px;
    }
}