/**
 * Cranio Floating Buttons — Styles
 * v1.0.0 | 2026-03-22
 * Bottom-right FAB with expand animation.
 *
 * ✏️ CONTENT — colors, sizes, positioning safe to change.
 */

/* ── FAB container: bottom-right corner ────────────────── */
.cranio-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 12px;
}

/* ── Main toggle button (green circle) ─────────────────── */
/* ✏️ CONTENT: size and color safe to change */
.cranio-fab__toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: #81d742;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    z-index: 10;
}

.cranio-fab__toggle:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Rotate + to × when expanded */
.cranio-fab__toggle[aria-expanded="true"] {
    background: #e74c3c;
    transform: rotate(45deg);
}

.cranio-fab__toggle[aria-expanded="true"]:hover {
    transform: rotate(45deg) scale(1.08);
}

.cranio-fab__toggle svg {
    width: 24px;
    height: 24px;
    pointer-events: none;
}

/* ── Child buttons container ───────────────────────────── */
.cranio-fab__children {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.cranio-fab__children.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ── Individual child button ───────────────────────────── */
.cranio-fab__btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--fab-color, #81d742);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cranio-fab__btn:hover {
    transform: scale(1.12);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.cranio-fab__btn svg {
    width: 22px;
    height: 22px;
    pointer-events: none;
}

/* ── Stagger animation for child buttons ───────────────── */
.cranio-fab__children.is-open .cranio-fab__btn:nth-child(1) {
    transition-delay: 0.05s;
}
.cranio-fab__children.is-open .cranio-fab__btn:nth-child(2) {
    transition-delay: 0.1s;
}
.cranio-fab__children.is-open .cranio-fab__btn:nth-child(3) {
    transition-delay: 0.15s;
}

/* ── Reduced motion: skip animations ───────────────────── */
@media (prefers-reduced-motion: reduce) {
    .cranio-fab__toggle,
    .cranio-fab__children,
    .cranio-fab__btn {
        transition: none !important;
    }
}

/* ── Mobile adjustments ────────────────────────────────── */
@media (max-width: 767px) {
    .cranio-fab {
        bottom: 16px;
        right: 16px;
    }

    .cranio-fab__toggle {
        width: 52px;
        height: 52px;
    }

    .cranio-fab__btn {
        width: 44px;
        height: 44px;
    }
}

/* ✅ SAFE TO RUN — verified: no secrets, no dangerous permissions, no destructive operations */
