/* ================================
   Universal WhatsApp Floater with Rotating CTA
=================================== */

.whatsapp-floater {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 15px;
    overflow: visible;
}

.whatsapp-floater-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Rotating CTA Tooltip */
.whatsapp-cta-tooltip {
    background: #ffffff;
    color: #333333;
    padding: 12px 24px;
    border-radius: 8px;
    border: 1px solid #D4AF37;
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.2);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    animation: ctaFadeRotate 12s infinite;
    position: absolute;
    right: 80px;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    min-width: 200px;
    text-align: center;
    cursor: pointer;
    pointer-events: auto;
    line-height: 1.3;
}

.whatsapp-cta-tooltip::after {
    content: '';
    position: absolute;
    right: -6px; /* Adjusted to sit perfectly on the border */
    top: 50%;
    transform: translateY(-50%) rotate(45deg); /* Rotated square creates the point */
    width: 10px;
    height: 10px;
    background-color: #ffffff; /* Matches the box bg */
    border-right: 1px solid #D4AF37; /* Gold border for top of arrow */
    border-top: 1px solid #D4AF37;   /* Gold border for bottom of arrow */
    z-index: -1; /* Tucks it slightly behind to hide the inner edges */
}

@keyframes ctaFadeRotate {
    0%, 33.33% { opacity: 0; }
    8.33%, 25% { opacity: 1; pointer-events: auto; }
    100% { opacity: 0; }
}

.whatsapp-cta-tooltip.message-1 {
    animation-delay: 0s;
}

.whatsapp-cta-tooltip.message-2 {
    animation-delay: 4s;
}

.whatsapp-cta-tooltip.message-3 {
    animation-delay: 8s;
}

.whatsapp-floater-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: #ffffff;
    border-radius: 50%;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
    font-size: 28px;
    flex-shrink: 0;
}

.whatsapp-floater-link:hover {
    background-color: #128C7E;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    transform: translateY(-2px);
}

.whatsapp-floater-link:active {
    transform: translateY(0);
}

/* Mobile responsiveness */
@media (max-width: 480px) {
    .whatsapp-floater {
        bottom: 15px;
        right: 15px;
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }
    
    .whatsapp-floater-wrapper {
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }
    
    .whatsapp-cta-tooltip {
        font-size: 11px;           /* Smaller text for mobile */
        padding: 8px 12px;         /* Tighter padding */
        border: 1px solid #D4AF37;
        box-shadow: 0 4px 16px rgba(212, 175, 55, 0.2);
        width: auto;
        min-width: 140px;          /* Reduced width to prevent pushing too far left */
        right: 70px;               /* Pulls it closer to the icon */
        left: auto;
        top: 50%;
        bottom: auto;
        transform: translateY(-50%);
        white-space: nowrap;       /* Strictly forces one line */
        line-height: 1;            /* Centers text vertically */
        cursor: pointer;
        pointer-events: auto;
    }
    
    .whatsapp-cta-tooltip::after {
        content: '';
        position: absolute;
        right: -6px;               /* Re-aligns the golden arrow */
        top: 50%;
        transform: translateY(-50%) rotate(45deg);
        width: 8px;
        height: 8px;
        background-color: #ffffff;
        border-right: 1px solid #D4AF37;
        border-top: 1px solid #D4AF37;
        z-index: -1;
    }
    
    .whatsapp-floater-link {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
}

/* Ensure it's above other elements */
.whatsapp-floater {
    z-index: 10000;
}
