/* Float Popup Link — small floating badge, no overlay, never blocks the page */
.fpl {
    --fpl-size: var(--fpl-size-d, 96px);
    position: fixed;
    right: 16px;
    bottom: calc(96px + env(safe-area-inset-bottom, 0px));
    z-index: 99990;
    width: var(--fpl-size);
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    transform: translateY(14px) scale(.9);
    transition: opacity .35s ease, transform .35s cubic-bezier(.2, 1.4, .4, 1);
    pointer-events: none;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}
.fpl[hidden] { display: none !important; }
.fpl.fpl-show { opacity: 1; transform: none; pointer-events: auto; }
.fpl.fpl-out { opacity: 0; transform: scale(.6); pointer-events: none; }

@media (max-width: 767px) {
    .fpl { --fpl-size: var(--fpl-size-m, 72px); right: 10px; }
}

.fpl-link {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    text-decoration: none !important;
    border: 0 !important;
    box-shadow: none !important;
    outline-offset: 4px;
}
.fpl-img {
    display: block;
    width: var(--fpl-size) !important;
    height: var(--fpl-size) !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: contain;
    border-radius: 18%;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .28));
    transition: transform .2s ease;
}
.fpl-link:hover .fpl-img,
.fpl-link:focus-visible .fpl-img { transform: scale(1.07); }

.fpl-text {
    position: relative;
    margin-top: -10px;
    max-width: calc(var(--fpl-size) + 40px);
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--fpl-bg, #e11d48);
    color: var(--fpl-fg, #fff) !important;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .25);
    border: 2px solid rgba(255, 255, 255, .85);
}
@media (max-width: 767px) {
    .fpl-text { font-size: 11.5px; padding: 3px 8px; margin-top: -8px; }
}

.fpl-x {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    padding: 0 !important;
    margin: 0 !important;
    border: 2px solid #fff !important;
    border-radius: 50% !important;
    background: rgba(17, 17, 17, .78) !important;
    color: #fff !important;
    font: 700 16px/1 Arial, sans-serif !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
    z-index: 2;
}
.fpl-x::before { content: ""; position: absolute; inset: -10px; } /* bigger touch target */
.fpl-x:hover { background: #000 !important; }
.fpl[data-side="left"] .fpl-x { right: auto; left: -8px; }

/* Attention effects — gentle, with long pauses */
.fpl-ring {
    position: absolute;
    top: 0;
    left: 50%;
    width: var(--fpl-size);
    height: var(--fpl-size);
    margin-left: calc(var(--fpl-size) / -2);
    border-radius: 50%;
    pointer-events: none;
    display: none;
}
.fpl-anim-pulse .fpl-ring {
    display: block;
    box-shadow: 0 0 0 0 var(--fpl-bg, #e11d48);
    animation: fpl-pulse 2.2s ease-out infinite;
}
.fpl-anim-bounce.fpl-show .fpl-img { animation: fpl-bounce 3.2s ease-in-out infinite; }
.fpl-anim-shake.fpl-show .fpl-img { animation: fpl-shake 4s ease-in-out infinite; }

@keyframes fpl-bounce {
    0%, 70%, 100% { transform: translateY(0); }
    78% { transform: translateY(-10px); }
    86% { transform: translateY(0); }
    92% { transform: translateY(-4px); }
}
@keyframes fpl-shake {
    0%, 80%, 100% { transform: rotate(0); }
    83% { transform: rotate(-9deg); }
    86% { transform: rotate(8deg); }
    89% { transform: rotate(-6deg); }
    92% { transform: rotate(4deg); }
}
@keyframes fpl-pulse {
    0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--fpl-bg, #e11d48) 70%, transparent); }
    100% { box-shadow: 0 0 0 18px transparent; }
}
@media (prefers-reduced-motion: reduce) {
    .fpl, .fpl * { animation: none !important; transition: none !important; }
}
@media print { .fpl { display: none !important; } }
.fpl.fpl-measure { pointer-events: none !important; transition: none !important; }
