/* WhatsApp Hover Button - Frontend Styles */

#wah-container {
    position: fixed !important;
    z-index: 2147483647 !important;
    display: flex !important;
    align-items: center;
    gap: 10px;
    box-sizing: border-box;
    animation: wahFadeIn 0.5s ease-out 1s both;
}

#wah-container.wah-pos-right {
    flex-direction: row;
    left: auto !important;
}

#wah-container.wah-pos-left {
    flex-direction: row-reverse;
    right: auto !important;
}

/* Button */
.wah-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 50% !important;
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    cursor: pointer;
    line-height: 1;
    flex-shrink: 0;
    border: none !important;
    outline: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.wah-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.wah-btn:active {
    transform: scale(0.95);
}

.wah-btn svg {
    display: block;
}

/* CTA Label */
.wah-cta-label {
    position: relative;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    padding: 8px 16px;
    border-radius: 8px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    line-height: 1.4;
}

#wah-container:hover .wah-cta-label,
#wah-container.wah-label-visible .wah-cta-label {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Pulse Animation */
.wah-anim-pulse .wah-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    opacity: 0;
    animation: wahPulse 2s ease-out infinite;
    z-index: -1;
}

@keyframes wahPulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}

/* Bounce Animation */
.wah-anim-bounce .wah-btn {
    animation: wahBounce 2s ease infinite;
}

@keyframes wahBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-12px);
    }
    60% {
        transform: translateY(-6px);
    }
}

.wah-anim-bounce .wah-btn:hover {
    animation: none;
    transform: scale(1.1);
}

/* Responsive: Hide on mobile */
@media (max-width: 768px) {
    .wah-hide-mobile {
        display: none !important;
    }

    #wah-container {
        bottom: 20px !important;
    }

    #wah-container.wah-pos-right {
        right: 12px !important;
    }

    #wah-container.wah-pos-left {
        left: 12px !important;
    }

    .wah-btn {
        width: 52px !important;
        height: 52px !important;
    }

    .wah-btn svg {
        width: 28px !important;
        height: 28px !important;
    }

    .wah-cta-label {
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* Responsive: Hide on desktop */
@media (min-width: 769px) {
    .wah-hide-desktop {
        display: none !important;
    }
}

/* Tooltip arrow for CTA label */
/* Button is on RIGHT, label is on LEFT → arrow points RIGHT toward button */
.wah-pos-right .wah-cta-label::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -6px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 6px solid var(--wah-bg);
}

/* Button is on LEFT, label is on RIGHT → arrow points LEFT toward button */
.wah-pos-left .wah-cta-label::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -6px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-right: 6px solid var(--wah-bg);
}

@keyframes wahFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
