/* WB WhatsApp Float — front-end styles */

.wbwa-root {
    position: fixed;
    bottom: var(--wbwa-y, 24px);
    z-index: var(--wbwa-z, 999999);
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: inherit;
    line-height: 1;
}

.wbwa-root.wbwa-right { right: var(--wbwa-x, 24px); flex-direction: row-reverse; }
.wbwa-root.wbwa-left  { left:  var(--wbwa-x, 24px); flex-direction: row; }

/* --- the button itself: no link, no href ------------------------------- */
.wbwa-btn {
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: var(--wbwa-size, 60px);
    height: var(--wbwa-size, 60px);
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 999px;
    background: var(--wbwa-bg, #25d366);
    color: var(--wbwa-fg, #fff);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .22);
    cursor: pointer;
    overflow: hidden;
    transition: transform .25s ease, box-shadow .25s ease, width .25s ease, padding .25s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.wbwa-btn:hover,
.wbwa-btn:focus-visible {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 8px 22px rgba(37, 211, 102, .38);
}

.wbwa-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.wbwa-btn:active { transform: scale(.97); }

.wbwa-btn.is-busy { opacity: .7; cursor: progress; }

.wbwa-icon {
    width: calc(var(--wbwa-size, 60px) * .56);
    height: calc(var(--wbwa-size, 60px) * .56);
    flex: 0 0 auto;
    display: block;
}

/* label sits inside the pill, hidden until there is room for it */
.wbwa-label {
    display: none;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: .1px;
}

/* desktop only: grow into a pill with the label */
@media (min-width: 769px) {
    .wbwa-has-label .wbwa-btn {
        width: auto;
        padding: 0 22px 0 16px;
    }
    .wbwa-has-label.wbwa-right .wbwa-btn { padding: 0 16px 0 22px; }
    .wbwa-has-label .wbwa-label { display: inline-block; }
}

/* --- hover tooltip ----------------------------------------------------- */
.wbwa-tip {
    position: absolute;
    bottom: calc(100% + 10px);
    right: 0;
    background: #1f2a24;
    color: #fff;
    font-size: 13px;
    line-height: 1.3;
    padding: 7px 11px;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity .2s ease, transform .2s ease;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wbwa-left .wbwa-tip { right: auto; left: 0; }

.wbwa-root:hover .wbwa-tip { opacity: 1; transform: translateY(0); }

/* --- pulse ring -------------------------------------------------------- */
.wbwa-pulse .wbwa-btn::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: 0 0 0 0 rgba(37, 211, 102, .55);
    animation: wbwa-ring 2.6s cubic-bezier(.4, 0, .2, 1) infinite;
    pointer-events: none;
}

@keyframes wbwa-ring {
    0%   { box-shadow: 0 0 0 0 rgba(37, 211, 102, .50); }
    70%  { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* --- mobile ------------------------------------------------------------ */
@media (max-width: 768px) {
    /* The admin margins are desktop choices; on a phone the button hugs the
       corner so it does not sit on top of product content. */
    .wbwa-root {
        bottom: 18px;
    }
    .wbwa-root.wbwa-right { right: 16px; }
    .wbwa-root.wbwa-left  { left:  16px; }
    .wbwa-tip { display: none; }
    .wbwa-label { display: none !important; }
    .wbwa-has-label .wbwa-btn { width: var(--wbwa-size, 60px); padding: 0; }
}

.wbwa-hide-mobile  { }
.wbwa-hide-desktop { }

@media (max-width: 768px) { .wbwa-hide-mobile { display: none !important; } }
@media (min-width: 769px) { .wbwa-hide-desktop { display: none !important; } }

/* --- inline shortcode placement --------------------------------------- */
.wbwa-inline .wbwa-root {
    position: relative;
    inset: auto;
    display: inline-flex;
}

.wbwa-inline .wbwa-tip { display: none; }

@media (prefers-reduced-motion: reduce) {
    .wbwa-pulse .wbwa-btn::after { animation: none; }
    .wbwa-btn { transition: none; }
}

/* ---------------------------------------------------------------------------
   Compact mode — used when the page already carries its own WhatsApp CTA.
   Collapses the pill back to a circle so the two do not read as a pair of
   competing buttons.
   --------------------------------------------------------------------------- */
.wbwa-root.wbwa-compact .wbwa-btn {
    width: var(--wbwa-size, 60px);
    padding: 0 !important;
}
.wbwa-root.wbwa-compact .wbwa-label { display: none !important; }
