/* =====================================================
   FLOATING WHATSAPP BUTTON — glass-morphism
   Markup: includes/whatsapp-button.php
   ===================================================== */
.whatsapp-float {
    position: fixed;
    right: 30px;
    bottom: 90px;
    z-index: 998;
    display: flex;
    align-items: center;
    gap: 0;
    height: 58px;
    padding: 0 6px;
    border-radius: 999px;
    color: var(--white);
    text-decoration: none;
    /* frosted glass tinted with WhatsApp green */
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.55) 0%, rgba(18, 140, 126, 0.55) 100%);
    border: 1px solid rgba(255, 255, 255, 0.45);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    backdrop-filter: blur(14px) saturate(160%);
    box-shadow:
        0 12px 30px rgba(18, 140, 126, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.55);
    overflow: visible;
    transition: gap .3s ease, padding .3s ease, transform .3s ease, box-shadow .3s ease;
}

.whatsapp-float:hover {
    gap: 10px;
    padding: 0 20px 0 6px;
    transform: translateY(-3px);
    box-shadow:
        0 18px 38px rgba(18, 140, 126, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.whatsapp-float-icon {
    position: relative;
    z-index: 1;
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    background: linear-gradient(145deg, #00d56b, #00ac77);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* the label slides open on hover */
.whatsapp-float-label {
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0;
    transition: max-width .3s ease, opacity .3s ease;
}

.whatsapp-float:hover .whatsapp-float-label,
.whatsapp-float:focus-visible .whatsapp-float-label {
    max-width: 120px;
    opacity: 1;
}

/* soft pulsing ring */
.whatsapp-float-ring {
    position: absolute;
    left: 6px;
    top: 6px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 2px solid rgba(37, 211, 102, 0.7);
    animation: whatsappPulse 2.4s ease-out infinite;
    pointer-events: none;
}

@keyframes whatsappPulse {
    0%   { transform: scale(1);   opacity: 0.9; }
    80%  { transform: scale(1.9); opacity: 0; }
    100% { transform: scale(1.9); opacity: 0; }
}

.whatsapp-float:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
}

@media (max-width: 768px) {
    .whatsapp-float {
        right: 16px;
        bottom: 80px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .whatsapp-float-ring { animation: none; }
}
