﻿.fqm-root {
    position: fixed;
    inset: 0;
    z-index: 1000;
    pointer-events: none;
}

    .fqm-root.is-entering .fqm-host {
        animation: fqmEnter 920ms cubic-bezier(.22, 1, .36, 1);
    }

    .fqm-root.is-leaving .fqm-host {
        animation: fqmLeave 340ms cubic-bezier(.4, 0, .2, 1);
    }

.fqm-backdrop {
    position: fixed;
    inset: 0;
    border: none;
    outline: none;
    background: rgba(16, 18, 20, 0.12);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 1;
    pointer-events: auto;
    z-index: 0;
}

.fqm-host {
    position: fixed;
    right: 0;
    bottom: 0;
    width: 320px;
    height: 320px;
    pointer-events: none;
    z-index: 1;
    overflow: visible;
}

.fqm-quarter-shell {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 80px;
    height: 80px;
    border-top-left-radius: 80px;
    background: rgba(50, 117, 84, 0.75);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    pointer-events: auto;
    overflow: visible;
}

    .fqm-quarter-shell::before {
        content: "";
        position: absolute;
        inset: 0;
        border-top-left-radius: inherit;
        background: radial-gradient(circle at 22% 78%, rgba(255,255,255,0.12), transparent 58%);
        pointer-events: none;
    }

.fqm-main-button {
    position: absolute;
    left: 10px;
    bottom: 10px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    cursor: pointer;
    z-index: 3;
    pointer-events: auto;
    transition: transform 280ms cubic-bezier(.22, 1, .36, 1), opacity 240ms ease;
}

    .fqm-main-button:hover {
        transform: scale(1.04);
    }

    .fqm-main-button.open {
        transform: scale(1.03);
    }

.fqm-main-plus {
    position: relative;
    width: 30px;
    height: 30px;
    display: block;
    transition: transform 280ms cubic-bezier(.22, 1, .36, 1);
    transform: translate(10px, 10px);
}

    .fqm-main-plus span {
        position: absolute;
        left: 50%;
        top: 50%;
        width: 30px;
        height: 5px;
        background: #ffffff;
        border-radius: 999px;
        transform: translate(-50%, -50%);
        transition: transform 280ms cubic-bezier(.22, 1, .36, 1);
    }

        .fqm-main-plus span:last-child {
            transform: translate(-50%, -50%) rotate(90deg);
        }

.fqm-main-button.open .fqm-main-plus {
    transform: translate(10px, 10px) rotate(135deg);
}

/* ANCLA FIJA: este punto es el que se mueve en el arco */
.fqm-item-anchor {
    position: absolute;
    left: 38px;
    bottom: 38px;
    width: 0;
    height: 0;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    opacity: 0;
    transform: translate(0, 0) scale(0.72);
    transform-origin: center;
    pointer-events: none;
    transition: transform 360ms cubic-bezier(.22, 1, .36, 1), opacity 260ms ease;
    transition-delay: var(--delay);
    z-index: 2;
    overflow: visible;
}

    .fqm-item-anchor.show {
        opacity: 1;
        transform: translate(var(--tx), var(--ty)) scale(1);
        pointer-events: auto;
    }

    .fqm-item-anchor.hide {
        opacity: 0;
        transform: translate(0, 0) scale(0.72);
        pointer-events: none;
    }

/* CÍRCULO FIJO SOBRE EL ANCLA */
.fqm-item-bubble {
    position: absolute;
    right: -28px;
    top: -28px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.96);
    color: #327554;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

    .fqm-item-bubble i {
        font-size: 1.4rem;
        line-height: 1;
    }

/* LABEL FIJO, CRECE HACIA LA IZQUIERDA */
.fqm-item-text {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.96);
    color: #327554;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.15;
    white-space: nowrap;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.6);
    text-align: left;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fqm-item-anchor:hover .fqm-item-bubble,
.fqm-item-anchor:hover .fqm-item-text {
    background: rgba(255, 255, 255, 1);
}

@keyframes fqmEnter {
    0% {
        opacity: 0;
        transform: translate(14px, 14px) scale(0.84);
    }

    55% {
        opacity: 1;
        transform: translate(-1px, -1px) scale(1.03);
    }

    100% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
}

@keyframes fqmLeave {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(10px, 10px) scale(0.86);
    }
}

@media (min-width: 768px) {
    .fqm-root {
        display: none !important;
    }
}

@media (max-width: 420px) {
    .fqm-host {
        width: 300px;
        height: 300px;
    }

    .fqm-quarter-shell {
        width: 80px;
        height: 80px;
        border-top-left-radius: 80px;
    }

    .fqm-main-button {
        width: 58px;
        height: 58px;
        left: 10px;
        bottom: 10px;
    }

    .fqm-item-anchor {
        left: 36px;
        bottom: 36px;
    }

    .fqm-item-bubble {
        right: -26px;
        top: -26px;
        width: 52px;
        height: 52px;
    }

        .fqm-item-bubble i {
            font-size: 1.3rem;
        }

    .fqm-item-text {
        right: 38px;
        font-size: 0.78rem;
        padding: 7px 10px;
        max-width: 140px;
    }
}
