/* ============================================================
   WhatsApp Float Button — wa-button.css
   ============================================================ */

/* ── Wrap ───────────────────────────────────────────────── */
.wa-float-wrap {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ── Base Button ────────────────────────────────────────── */
.wa-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: #25D366;
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    letter-spacing: .3px;
    border: 0px solid transparent;
    cursor: pointer;
    transition:
        background-color .22s ease,
        color .22s ease,
        transform .22s ease,
        box-shadow .22s ease;
    white-space: nowrap;
    -webkit-user-select: none;
    user-select: none;
    outline: none;
}
.wa-btn:focus-visible {
    outline: 3px solid rgba(37,211,102,.5);
    outline-offset: 3px;
}

/* Icon wrapper */
.wa-btn-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.18);
    flex-shrink: 0;
    transition: background .2s;
}
.wa-btn:hover .wa-btn-icon-wrap {
    background: rgba(255,255,255,.28);
}

/* SVG default size */
.wa-btn svg {
    width: 28px;
    height: 28px;
    display: block;
    flex-shrink: 0;
}

/* ── Icon position ──────────────────────────────────────── */
.wa-icon-right { flex-direction: row-reverse; }

/* ── SIZES ──────────────────────────────────────────────── */
.wa-size-sm { height: 42px; padding: 4px 16px 4px 4px; font-size: 12px; }
.wa-size-sm .wa-btn-icon-wrap { width: 34px; height: 34px; }
.wa-size-sm svg { width: 20px; height: 20px; }

.wa-size-md { height: 52px; padding: 6px 20px 6px 6px; font-size: 14px; }
.wa-size-md .wa-btn-icon-wrap { width: 40px; height: 40px; }
.wa-size-md svg { width: 26px; height: 26px; }

.wa-size-lg { height: 62px; padding: 8px 26px 8px 8px; font-size: 16px; }
.wa-size-lg .wa-btn-icon-wrap { width: 46px; height: 46px; }
.wa-size-lg svg { width: 30px; height: 30px; }

.wa-size-xl { height: 72px; padding: 10px 30px 10px 10px; font-size: 18px; }
.wa-size-xl .wa-btn-icon-wrap { width: 52px; height: 52px; }
.wa-size-xl svg { width: 34px; height: 34px; }

/* ── SHAPES ─────────────────────────────────────────────── */
.wa-shape-pill   { border-radius: 100px; }
.wa-shape-pill .wa-btn-icon-wrap { border-radius: 50%; }

.wa-shape-rounded { border-radius: 14px; }
.wa-shape-rounded .wa-btn-icon-wrap { border-radius: 8px; }

.wa-shape-square  { border-radius: 0; }
.wa-shape-square .wa-btn-icon-wrap { border-radius: 0; }

.wa-shape-circle  {
    border-radius: 50% !important;
    padding: 0 !important;
    width: 60px; height: 60px;
}
.wa-size-sm.wa-shape-circle { width: 46px; height: 46px; }
.wa-size-lg.wa-shape-circle { width: 70px; height: 70px; }
.wa-size-xl.wa-shape-circle { width: 80px; height: 80px; }

/* ── HOVER EFFECTS ──────────────────────────────────────── */
.wa-hover-lift:hover  { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,.25); }
.wa-hover-grow:hover  { transform: scale(1.07); }
.wa-hover-shrink:hover{ transform: scale(.94); }
.wa-hover-skew:hover  { transform: skewX(-6deg); }

/* ── ANIMATIONS ─────────────────────────────────────────── */

/* Pulse — color follows --wa-glow set inline from PHP */
@keyframes wa-pulse {
    0%   { box-shadow: 0 0 0 0 var(--wa-glow-start, rgba(37,211,102,.55)); }
    70%  { box-shadow: 0 0 0 16px var(--wa-glow-end, rgba(37,211,102,0)); }
    100% { box-shadow: 0 0 0 0 var(--wa-glow-end, rgba(37,211,102,0)); }
}
.wa-anim-pulse { animation: wa-pulse 2.2s ease-out infinite; }

/* Bounce */
@keyframes wa-bounce {
    0%, 100% { transform: translateY(0); }
    40%       { transform: translateY(-10px); }
    60%       { transform: translateY(-5px); }
}
.wa-anim-bounce { animation: wa-bounce 2s ease infinite; }

/* Shake */
@keyframes wa-shake {
    0%, 85%, 100% { transform: rotate(0deg); }
    88%           { transform: rotate(-12deg); }
    92%           { transform: rotate(12deg); }
    96%           { transform: rotate(-8deg); }
    98%           { transform: rotate(8deg); }
}
.wa-anim-shake { animation: wa-shake 3s ease infinite; }

/* Swing */
@keyframes wa-swing {
    0%, 100%{ transform: rotate(0deg); transform-origin: top center; }
    20%     { transform: rotate(10deg); }
    40%     { transform: rotate(-8deg); }
    60%     { transform: rotate(6deg); }
    80%     { transform: rotate(-4deg); }
}
.wa-anim-swing { animation: wa-swing 2.5s ease infinite; }

/* Stop animation on hover */
.wa-btn:hover { animation: none !important; }

/* ── TOOLTIP ────────────────────────────────────────────── */
.wa-tooltip {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, transform .2s ease;
    transform: translateX(-50%) translateY(4px);
    z-index: 10;
}
.wa-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1a1a1a;
}
.wa-float-wrap:hover .wa-tooltip,
.wa-float-wrap:focus-within .wa-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ── Icon-only adjustments ──────────────────────────────── */
.wa-btn .wa-btn-icon-wrap {
    /* icon-only: full circle */
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 480px) {
    .wa-size-xl { height: 60px; font-size: 15px; }
    .wa-size-lg { height: 54px; font-size: 14px; }
}
