/* edit action  */
.fab-container {
    position: fixed;
    bottom: 28px;
    left: 28px;
    z-index: 999
}

/* Pulsing FAB */
#main-fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6b8eff, #c87bff);
    border: none;
    color: #fff;
    font-size: 1.5rem;
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: 0 8px 28px rgba(107, 142, 255, .45);
    position: relative;
}

#main-fab::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: inherit;
    animation: pulse 2.4s infinite;
    z-index: -1;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        opacity: .8
    }

    80%,
    100% {
        transform: scale(1.45);
        opacity: 0
    }
}

/* Glass menu */
.action-menu {
    background: rgba(255, 255, 255, .62);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, .75);
    border-radius: 20px;
    padding: 12px 8px;
    margin-bottom: 12px;
    opacity: 0;
    transform: scale(0.92) translateY(8px);
    pointer-events: none;
    transition: 0.36s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 14px 36px rgba(0, 0, 0, .16);
}

.fab-container.open .action-menu {
    opacity: 1;
    transform: scale(1) translateY(0);
    pointer-events: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Icon buttons */
.action-btn,
#main-fab {
    width: 40px;
    height: 40px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: #333;
    font-size: 1.25rem;
    transition: all 0.28s ease;
    position: relative;
    /* background: transparent; */
    background: aliceblue;
}

#main-fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    color: lightgrey;
}

/* Appear with slight background */
.fab-container.open .action-btn {
    opacity: 1;
    transform: translateX(0);
    /* background:rgba(255,255,255,.45); */
    border: 1px solid rgba(255, 255, 255, .45);
}

.action-btn {
    opacity: 0;
    transform: translateX(24px)
}

.fab-container.open .action-btn:nth-child(1) {
    transition-delay: 0.11s
}

.fab-container.open .action-btn:nth-child(2) {
    transition-delay: 0.07s
}

.fab-container.open .action-btn:nth-child(3) {
    transition-delay: 0.03s
}

/* Hover: white card + shadow */
.action-btn:hover,
#main-fab:hover {
    background: #fff !important;
    color: #222 !important;
    transform: scale(1.12);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .2);
}

#main-fab:hover {
    color: #fff;
    background: linear-gradient(135deg, #5a7dff, #b86bff)
}

/* Floating tooltip */
.tooltip {
    position: absolute;
    left: 64px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, .85);
    color: #fff;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s, transform 0.25s;
    transform: translateY(-50%) translateX(-8px);
}

.action-btn:hover .tooltip,
#main-fab:hover .tooltip {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.tooltip::after {
    content: '';
    position: absolute;
    right: 100%;
    top: 50%;
    border: 6px solid transparent;
    border-left-color: rgba(0, 0, 0, .85);
    /* transform:translateY(-50%); */
    transform: translateY(-50%) rotate(180deg);
}