/* WhatsApp Widget Styles */

/* Desktop Widget - Bottom Left Corner */
.whatsapp-widget-desktop {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 9999;
    display: block;
}

.whatsapp-button {
    display: flex;
    align-items: center;
    text-decoration: none;
    position: relative;
}

.whatsapp-icon {
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    z-index: 2;
    position: relative;
}

.whatsapp-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.whatsapp-bubble {
    position: absolute;
    bottom: 70px;
    left: 0;
    z-index: 3;
    background: #ffffff;
    padding: 12px 20px;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    white-space: normal;
    max-width: 320px;
    min-width: 180px;
    width: max-content;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    pointer-events: none;
}

.whatsapp-bubble.bubble-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.whatsapp-bubble-close {
    pointer-events: auto;
}

/* Hovering anywhere on the widget shows the bubble */
.whatsapp-widget-desktop:hover .whatsapp-bubble {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Suppress hover when user has dismissed the bubble */
.whatsapp-widget-desktop.bubble-dismissed:hover .whatsapp-bubble {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

.whatsapp-bubble::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 20px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 8px 0 8px;
    border-color: #ffffff transparent transparent transparent;
}

.whatsapp-text {
    color: #333;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    display: block;
    padding-right: 16px;
}

.whatsapp-bubble-close {
    position: absolute;
    top: 6px;
    right: 8px;
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    transition: color 0.2s ease;
}

.whatsapp-bubble-close:hover {
    color: #333;
}

/* Mobile Icon - In Navbar */
.whatsapp-mobile-icon {
    display: none;
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
}

.whatsapp-mobile-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #25D366;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.whatsapp-mobile-link:hover {
    transform: scale(1.1);
}

/* Button reset for WhatsApp icon trigger */
button.whatsapp-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

/* WhatsApp Modal */
.wa-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99998;
    align-items: center;
    justify-content: center;
}

.wa-modal-overlay.wa-modal-open {
    display: flex;
}

.wa-modal-box {
    background: #fff;
    border-radius: 16px;
    padding: 32px 28px 24px;
    max-width: 340px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.wa-modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #999;
    line-height: 1;
    padding: 0;
    transition: color 0.2s ease;
}

.wa-modal-close:hover {
    color: #333;
}

.wa-modal-message {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 24px;
    line-height: 1.4;
}

.wa-modal-button {
    display: inline-block;
    background: #25D366;
    color: #000;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    padding: 12px 44px;
    border-radius: 50px;
    transition: background 0.2s ease;
}

.wa-modal-button:hover {
    background: #1da851;
    color: #000;
}

.wa-modal-disclaimer {
    font-size: 11px;
    color: #aaa;
    margin: 12px 0 0;
    line-height: 1.5;
}

/* Cookie banner always on top */
.cookiespopup,
#cookies-acceptBanner {
    z-index: 99999 !important;
}

/* Responsive Styles */
@media screen and (max-width: 991px) {
    /* Clip overflowing off-screen mobile nav so it doesn't peek on edge */
    .navbar-2 {
        overflow: clip;
    }

    /* Keep floating widget visible on mobile - hide navbar icon instead */
    .whatsapp-mobile-icon {
        display: none;
    }
}

@media screen and (max-width: 479px) {
    /* Slightly smaller and tighter position for small phones */
    .whatsapp-widget-desktop {
        bottom: 20px;
        left: 15px;
    }
    
    .whatsapp-icon {
        width: 50px;
        height: 50px;
    }
    
    .whatsapp-icon svg {
        width: 50px;
        height: 50px;
    }

}

/* Animation for when bubble appears */
@keyframes bubblePulse {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-5px) scale(1.02);
    }
}

.whatsapp-button:hover .whatsapp-bubble {
    animation: bubblePulse 2s ease-in-out infinite;
}
