/* ── WhatsApp Floating Button ─────────────────────────────────────────────── */
#wah-root {
    position: fixed;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}
#wah-root.wah-right { right: 24px; align-items: flex-end; }
#wah-root.wah-left  { left: 24px;  align-items: flex-start; }

/* ── Tooltip ─────────────────────────────────────────────────────────────── */
.wah-tooltip {
    background: var(--wah-tooltip-bg, #1a1a2e);
    color: var(--wah-tooltip-text, #fff) !important;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 1.1rem;
    line-height: 1.45;
    max-width: 220px;
    text-align: center;
    box-shadow: 0 6px 24px rgba(0,0,0,.2);
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
    transition: opacity .25s, transform .25s;
    font-family: -apple-system, 'Segoe UI', sans-serif;
    white-space: normal;
}
.wah-tooltip.visible { opacity: 1; transform: translateY(0); }

/* ── Button base ─────────────────────────────────────────────────────────── */
.wah-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 56px;
    height: 56px;
    padding: 0;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    font-family: -apple-system, 'Segoe UI', sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    transition: width .35s cubic-bezier(.4,0,.2,1),
                padding .35s cubic-bezier(.4,0,.2,1),
                gap .35s cubic-bezier(.4,0,.2,1),
                transform .2s, box-shadow .2s;
    position: relative;
    outline: none;
    max-width: 56px;
}
.wah-btn svg.wah-icon { width: 28px; height: 28px; flex-shrink: 0; }
.wah-btn .wah-btn-label {
    max-width: 0; overflow: hidden; opacity: 0;
    transition: max-width .35s cubic-bezier(.4,0,.2,1), opacity .25s ease;
    display: inline-block; white-space: nowrap;
}

/* ── Hover expand — tablet & desktop only ────────────────────────────────── */
@media (min-width: 769px) {
    .wah-btn.wah-open:hover,
    .wah-btn.wah-open:focus-visible {
        width: auto; max-width: 280px; padding: 0 22px 0 16px; gap: 10px;
    }
    .wah-btn.wah-open:hover .wah-btn-label,
    .wah-btn.wah-open:focus-visible .wah-btn-label { max-width: 200px; opacity: 1; }
}

/* ── Open state ──────────────────────────────────────────────────────────── */
.wah-btn.wah-open {
    background: var(--wah-btn-bg, #25d366);
    color: var(--wah-btn-text, #fff) !important;
    box-shadow: 0 6px 28px rgba(37,211,102,.45);
}
.wah-btn.wah-open:hover { box-shadow: 0 10px 36px rgba(37,211,102,.55); color: var(--wah-btn-text, #fff) !important; }
.wah-btn.wah-open:active { transform: scale(.96); }
.wah-btn.wah-open span, .wah-btn.wah-open svg { color: var(--wah-btn-text, #fff) !important; fill: var(--wah-btn-text, #fff) !important; }

/* ── Closed state ────────────────────────────────────────────────────────── */
.wah-btn.wah-closed {
    background: var(--wah-offline-bg, #6c757d);
    color: var(--wah-btn-text, #fff) !important;
    box-shadow: 0 4px 16px rgba(0,0,0,.15);
    cursor: default; opacity: .75;
}
.wah-btn.wah-closed .wah-btn-label { display: none; }
.wah-btn.wah-closed span, .wah-btn.wah-closed svg { color: var(--wah-btn-text, #fff) !important; fill: var(--wah-btn-text, #fff) !important; }

/* ── Pulse ring ──────────────────────────────────────────────────────────── */
.wah-btn.wah-open::before {
    content: ''; position: absolute; inset: -4px; border-radius: 50px;
    border: 3px solid var(--wah-btn-bg, rgba(37,211,102,.5));
    animation: wah-ring 2s ease-out infinite; pointer-events: none;
}
@keyframes wah-ring {
    0%   { transform: scale(1);    opacity: .7; }
    70%  { transform: scale(1.15); opacity: 0;  }
    100% { transform: scale(1.15); opacity: 0;  }
}

/* ── Mobile: always circular, no hover expand ────────────────────────────── */
@media (max-width: 768px) {
    .wah-btn {
        width: 56px !important; max-width: 56px !important;
        height: 56px !important; padding: 0 !important; gap: 0 !important;
    }
    .wah-btn .wah-btn-label { display: none !important; }
}
