/* FB Messenger Float – Frontend */
:root {
    --fbmf-color: #0084ff;
    --fbmf-size: 60px;
    --fbmf-margin: 24px;
    --fbmf-z: 9999;
}

.fbmf-wrap {
    position: fixed;
    bottom: var(--fbmf-margin);
    z-index: var(--fbmf-z);
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.fbmf-wrap.fbmf-bottom-right { right: var(--fbmf-margin); align-items: flex-end; }
.fbmf-wrap.fbmf-bottom-left  { left:  var(--fbmf-margin); align-items: flex-start; }

@media (max-width: 767px) {
    .fbmf-wrap.fbmf-hide-mobile { display: none !important; }
}

/* ── Icon link ─────────────────────────────────── */
.fbmf-icon {
    width:  var(--fbmf-size);
    height: var(--fbmf-size);
    border-radius: 50%;
    background: var(--fbmf-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,.22);
    pointer-events: all;
    text-decoration: none;
    transition: transform .25s cubic-bezier(.4,0,.2,1), box-shadow .25s;
    position: relative;
    overflow: hidden;
}
.fbmf-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0);
    transition: background .25s;
}
.fbmf-icon:hover {
    transform: scale(1.08) translateY(-2px);
    box-shadow: 0 8px 28px rgba(0,0,0,.28);
}
.fbmf-icon:hover::before { background: rgba(255,255,255,.12); }
.fbmf-icon:active { transform: scale(.96); }

/* Pulse ring */
.fbmf-icon::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 3px solid var(--fbmf-color);
    opacity: 0;
    animation: fbmf-pulse 2.8s ease-out 1.5s infinite;
}
@keyframes fbmf-pulse {
    0%   { transform: scale(1);    opacity: .7; }
    70%  { transform: scale(1.22); opacity: 0;  }
    100% { transform: scale(1.22); opacity: 0;  }
}

.fbmf-icon svg {
    width: 28px;
    height: 28px;
    fill: white;
    position: relative; /* above ::before/::after */
}

/* ── Tooltip ────────────────────────────────────── */
.fbmf-tooltip {
    background: #fff;
    border-radius: 18px;
    padding: 10px 14px 10px 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,.14);
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: all;
    animation: fbmf-slide-in .4s cubic-bezier(.34,1.56,.64,1) both;
    max-width: 220px;
    position: relative;
}
.fbmf-tooltip::after {
    content: '';
    position: absolute;
    bottom: -7px;
    right: 22px;
    width: 14px; height: 8px;
    background: #fff;
    clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.fbmf-wrap.fbmf-bottom-left .fbmf-tooltip::after { right: auto; left: 22px; }

.fbmf-tooltip-text {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    color: #333;
    white-space: nowrap;
}
.fbmf-tooltip-close {
    background: none; border: none; cursor: pointer;
    color: #999; font-size: 18px; line-height: 1;
    padding: 0 2px; flex-shrink: 0; transition: color .2s;
}
.fbmf-tooltip-close:hover { color: #555; }

.fbmf-tooltip.fbmf-dismissed {
    animation: fbmf-slide-out .25s ease-in forwards;
}
@keyframes fbmf-slide-in {
    from { opacity:0; transform: translateY(12px) scale(.9); }
    to   { opacity:1; transform: translateY(0)    scale(1); }
}
@keyframes fbmf-slide-out {
    to { opacity:0; transform: translateY(12px) scale(.9); pointer-events: none; }
}
