/* ─── WP Smart Contact v3 – Frontend ───────────────────────────── */

/* ── Layout ── */
.wpsc-wrap { position: relative; z-index: 9990; }
.wpsc-float {
    position: fixed;
    z-index: 9990;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.wpsc-float.wpsc-bottom-right { bottom: 28px; right: 28px; align-items: flex-end; }
.wpsc-float.wpsc-bottom-left  { bottom: 28px; left:  28px; align-items: flex-start; }
.wpsc-inline { display: inline-flex; align-items: center; }

/* ── Circular FAB ── */
.wpsc-fab {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    cursor: pointer;
    /* shadow layered for depth */
    box-shadow:
        0 2px 6px rgba(0,0,0,.15),
        0 8px 24px rgba(0,0,0,.18),
        0 0 0 0 rgba(37,211,102,.45);
    transition: transform .22s cubic-bezier(.34,1.56,.64,1),
                box-shadow .22s ease;
    will-change: transform;
    /* Starts hidden – JS shows after trigger */
    opacity: 0;
    transform: scale(0.5);
}

.wpsc-fab.wpsc-visible {
    opacity: 1;
    transform: scale(1);
    transition: transform .35s cubic-bezier(.34,1.56,.64,1),
                box-shadow .22s ease,
                opacity .25s ease;
}

.wpsc-fab:hover {
    transform: scale(1.1);
    box-shadow:
        0 4px 10px rgba(0,0,0,.18),
        0 14px 36px rgba(0,0,0,.22),
        0 0 0 10px rgba(37,211,102,.12);
}
.wpsc-fab:active { transform: scale(0.96); }

/* Ripple ring on click */
.wpsc-fab-ripple {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.25);
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
    transition: transform .5s ease, opacity .5s ease;
}
.wpsc-fab:active .wpsc-fab-ripple {
    transform: scale(2);
    opacity: 1;
    transition: none;
}

/* Pulse ring animation */
@keyframes wpsc-ring {
    0%   { box-shadow: 0 2px 6px rgba(0,0,0,.15), 0 8px 24px rgba(0,0,0,.18), 0 0 0 0   rgba(37,211,102,.5); }
    70%  { box-shadow: 0 2px 6px rgba(0,0,0,.15), 0 8px 24px rgba(0,0,0,.18), 0 0 0 18px rgba(37,211,102,0); }
    100% { box-shadow: 0 2px 6px rgba(0,0,0,.15), 0 8px 24px rgba(0,0,0,.18), 0 0 0 0   rgba(37,211,102,0); }
}
.wpsc-fab.wpsc-pulse { animation: wpsc-ring 2.2s ease-out infinite; }
.wpsc-fab.wpsc-pulse:hover { animation: none; }

/* ── Balloon / tooltip ── */
.wpsc-balloon {
    display: none; /* shown by JS */
    align-items: center;
    gap: 10px;
    background: #fff;
    border-radius: 14px;
    padding: 12px 14px 12px 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,.14), 0 1px 4px rgba(0,0,0,.08);
    max-width: 260px;
    position: relative;
    animation: wpsc-pop-in .3s cubic-bezier(.34,1.56,.64,1) both;
    cursor: pointer; /* clicking balloon also opens WA */
}

/* Arrow pointing down to FAB */
.wpsc-float.wpsc-bottom-right .wpsc-balloon::after,
.wpsc-float.wpsc-bottom-left  .wpsc-balloon::after {
    content: '';
    position: absolute;
    bottom: -8px;
    width: 16px; height: 16px;
    background: #fff;
    clip-path: polygon(0 0, 100% 0, 50% 100%);
    box-shadow: 0 3px 6px rgba(0,0,0,.08);
}
.wpsc-float.wpsc-bottom-right .wpsc-balloon::after { right: 20px; }
.wpsc-float.wpsc-bottom-left  .wpsc-balloon::after { left:  20px; }

@keyframes wpsc-pop-in {
    from { opacity:0; transform: translateY(6px) scale(.92); }
    to   { opacity:1; transform: translateY(0)   scale(1); }
}

.wpsc-balloon-avatar {
    width: 42px; height: 42px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #f0f0f0;
}

.wpsc-balloon-body {
    flex: 1;
    min-width: 0;
}
.wpsc-balloon-body strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #111;
    line-height: 1.3;
}
.wpsc-balloon-body span {
    display: block;
    font-size: 11px;
    color: #25D366;
    font-weight: 600;
    margin-bottom: 2px;
}
.wpsc-balloon-body p {
    margin: 0;
    font-size: 13px;
    color: #444;
    line-height: 1.4;
}

.wpsc-balloon-x {
    position: absolute;
    top: 6px; right: 8px;
    background: none;
    border: none;
    font-size: 17px;
    color: #bbb;
    cursor: pointer;
    line-height: 1;
    padding: 2px;
}
.wpsc-balloon-x:hover { color: #666; }

/* ── Online indicator on balloon ── */
.wpsc-balloon-body strong::after {
    content: '';
    display: inline-block;
    width: 7px; height: 7px;
    background: #25D366;
    border-radius: 50%;
    margin-left: 6px;
    vertical-align: middle;
    box-shadow: 0 0 0 2px rgba(37,211,102,.25);
}

/* ── Inline variant ── */
.wpsc-inline .wpsc-fab {
    opacity: 1;
    transform: scale(1);
    position: static;
    box-shadow: 0 4px 16px rgba(0,0,0,.18);
}

/* ── Mobile ── */
@media (max-width: 600px) {
    .wpsc-float.wpsc-bottom-right { bottom: 18px; right: 18px; }
    .wpsc-float.wpsc-bottom-left  { bottom: 18px; left:  18px; }
    .wpsc-balloon { max-width: 220px; }
}
