/* BERNARD v1.5.6 — MAIN ROOM OFF CONTROL */
.off-button {
    position: fixed;
    right: 28px;
    bottom: 22px;
    z-index: 40;

    min-width: 92px;
    height: 36px;
    padding: 0 22px;

    border: 1px solid rgba(17, 17, 17, 0.42);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    color: #111111;
    font: inherit;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 5px;
    text-transform: uppercase;

    cursor: pointer;
    opacity: 0;
    pointer-events: none;

    transition:
        opacity 1.2s ease,
        background-color 0.35s ease,
        border-color 0.35s ease,
        transform 0.35s ease;
}

#bernard.interface-content-visible .off-button {
    opacity: 1;
    pointer-events: auto;
}

.off-button:hover,
.off-button:focus-visible {
    background: rgba(255, 255, 255, 0.78);
    border-color: rgba(17, 17, 17, 0.72);
    transform: translateY(-1px);
}

.off-button:focus-visible {
    outline: 1px solid rgba(17, 17, 17, 0.7);
    outline-offset: 3px;
}

/* Stage 1: all interface lettering and graphic elements leave first. */
#bernard.off-letters-leaving .progress-panel,
#bernard.off-letters-leaving .bernard-navigation,
#bernard.off-letters-leaving .main-room-navigation-node,
#bernard.off-letters-leaving .main-room-circuits,
#bernard.off-letters-leaving .off-button {
    opacity: 0 !important;
    filter: blur(5px);
    transform: scale(0.985);
    pointer-events: none !important;

    transition:
        opacity 1.15s ease,
        filter 1.15s ease,
        transform 1.15s ease !important;
}

/* Stage 2: the head is the final visible presence. */
#bernard.off-head-leaving .bernard-presence {
    opacity: 0 !important;
    filter: blur(4px) !important;
    transform: scale(0.992) !important;

    transition:
        opacity 1.65s ease,
        filter 1.65s ease,
        transform 1.65s ease !important;
}

#bernard.off-complete {
    background: #ffffff !important;
}

@media (max-width: 760px) {
    .off-button {
        right: 16px;
        bottom: 16px;
        min-width: 78px;
        padding: 0 16px;
    }
}
