/* WhatsApp Floating Button - Frontend */

.wafb-wrapper {
    position: fixed;
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Positions */
.wafb-wrapper.wafb-pos-bottom-right { bottom: 24px; right: 24px; flex-direction: row-reverse; }
.wafb-wrapper.wafb-pos-bottom-left  { bottom: 24px; left: 24px; flex-direction: row; }
.wafb-wrapper.wafb-pos-top-right    { top: 24px; right: 24px; flex-direction: row-reverse; }
.wafb-wrapper.wafb-pos-top-left     { top: 24px; left: 24px; flex-direction: row; }

/* Main Button */
.wafb-button {
    width: var(--wafb-btn-size, 60px);
    height: var(--wafb-btn-size, 60px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.45), 0 2px 8px rgba(0,0,0,.15);
    transition: transform .25s cubic-bezier(.175,.885,.32,1.275), box-shadow .25s ease, opacity .3s ease;
    flex-shrink: 0;
    position: relative;
    outline: none;
}
.wafb-button:hover {
    transform: scale(1.12);
    box-shadow: 0 10px 32px rgba(37, 211, 102, 0.55), 0 4px 12px rgba(0,0,0,.2);
}
.wafb-button:active { transform: scale(.96); }
.wafb-button svg { display: block; pointer-events: none; }
.wafb-button.wafb-hidden { opacity: 0; pointer-events: none; transform: scale(0.8); }

/* Pulse animation */
.wafb-button.wafb-pulse::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: inherit;
    opacity: .4;
    animation: wafb-pulse 2s ease-out infinite;
    z-index: -1;
}
.wafb-button.wafb-pulse::after {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    background: inherit;
    opacity: .15;
    animation: wafb-pulse 2s ease-out infinite .5s;
    z-index: -1;
}
@keyframes wafb-pulse {
    0%   { transform: scale(1); opacity: .4; }
    70%  { transform: scale(1.5); opacity: 0; }
    100% { transform: scale(1.5); opacity: 0; }
}

/* Tooltip */
.wafb-tooltip {
    background: #1a202c;
    color: #fff;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    white-space: nowrap;
    box-shadow: 0 4px 16px rgba(0,0,0,.2);
    pointer-events: none;
    opacity: 0;
    transform: translateX(8px);
    transition: opacity .25s ease, transform .25s ease;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
}
.wafb-pos-bottom-left .wafb-tooltip,
.wafb-pos-top-left .wafb-tooltip {
    transform: translateX(-8px);
}
.wafb-wrapper:hover .wafb-tooltip {
    opacity: 1;
    transform: translateX(0);
}

/* Label */
.wafb-label {
    background: #1a202c;
    color: #fff;
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    white-space: nowrap;
    box-shadow: 0 2px 10px rgba(0,0,0,.15);
    pointer-events: none;
    line-height: 1.4;
}

/* Responsive */
@media (max-width: 480px) {
    .wafb-wrapper.wafb-pos-bottom-right { bottom: 16px; right: 16px; }
    .wafb-wrapper.wafb-pos-bottom-left  { bottom: 16px; left: 16px; }
    .wafb-wrapper.wafb-pos-top-right    { top: 16px; right: 16px; }
    .wafb-wrapper.wafb-pos-top-left     { top: 16px; left: 16px; }
    .wafb-tooltip { display: none; } /* hide tooltip on mobile, tap is enough */
    .wafb-label { font-size: 12px; padding: 5px 10px; }
}
