/* Unified floating action hub (speed dial): accessibility tools + guided tour.
   FIXED to the bottom-right corner in every language; the chat widget keeps its
   own Jotform-configured spot at the bottom-left. Sides never flip, so the two
   can never overlap and buttons don't jump when the language changes. */

.fab-hub {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2147483000; /* above chatbot widgets and modals */
    font-family: "Poppins", sans-serif;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

/* Launcher */
.fab-hub-toggle {
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 50%;
    background: #90CCA6;
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s, background 0.2s;
}

.fab-hub-toggle:hover {
    background: #76b88f;
}

.fab-hub-toggle i {
    transition: transform 0.25s;
}

.fab-hub[data-open="true"] .fab-hub-toggle i {
    transform: rotate(45deg);
}

.fab-hub-toggle:focus-visible,
.fab-hub-item:focus-visible {
    outline: 3px solid #1c4532;
    outline-offset: 2px;
}

/* Fan of items above the launcher */
.fab-hub-items {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    margin-bottom: 12px;
}

/* Label sits to the LEFT of the icon (icon hugs the screen edge) */
.fab-hub-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
}

.fab-hub-item-label {
    order: 0;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    white-space: nowrap;
}

.fab-hub-item-icon {
    order: 1;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #fff;
    color: #2f6846;
    border: 2px solid #90CCA6;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);
    transition: background 0.2s, color 0.2s;
}

.fab-hub-item:hover .fab-hub-item-icon {
    background: #90CCA6;
    color: #fff;
}

/* Tour submenu (when a page registers multiple tours) */
.fab-hub-tour-wrap {
    position: relative;
}

.fab-hub-tour-menu {
    position: absolute;
    bottom: 54px;
    right: 0;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    min-width: 220px;
}

.fab-hub-tour-menu button {
    display: block;
    width: 100%;
    text-align: start;
    border: none;
    background: transparent;
    padding: 10px 12px;
    font-size: 13px;
    color: #333;
    border-radius: 6px;
    cursor: pointer;
}

.fab-hub-tour-menu button:hover {
    background: rgba(144, 204, 166, 0.15);
    color: #2f6846;
}

/* ------- Adoption: hide the individual launchers once the hub manages them ------- */

/* Accessibility launcher (its panel stays and is opened through the hub) */
html.fab-hub-a11y .a11y-toggle {
    display: none !important;
}

/* Guided tour FAB (tours are started through the hub via the TourManager API) */
html.fab-hub-tour #tour-fab-container {
    display: none !important;
}

@media (prefers-reduced-motion: reduce) {
    .fab-hub-toggle,
    .fab-hub-toggle i,
    .fab-hub-item-icon {
        transition: none;
    }
}

@media (max-width: 480px) {
    .fab-hub {
        bottom: 16px;
        right: 16px;
    }
}
