/* Keep the original operator animations, mirrored to the mobile left edge. */
@media (max-width: 720px) {
    html body.onek-body .onek-floating-actions .onek-operator-widget[data-onek-operator-widget] {
        position: fixed;
        left: max(16px, env(safe-area-inset-left, 0px)) !important;
        right: auto !important;
        bottom: calc(16px + env(safe-area-inset-bottom, 0px)) !important;
        width: 56px;
        height: 56px;
        transform: none;
        transition: transform .25s ease;
    }

    html body.onek-body .onek-floating-actions .onek-operator-widget.is-peeking[data-onek-operator-widget] {
        /* Match the 16px visible edge of TriChat's mobile launcher. */
        transform: translateX(calc(-100% - max(16px, env(safe-area-inset-left, 0px)) + 16px));
    }

    html body.onek-body .onek-operator-widget .onek-operator-widget__toggle {
        width: 56px;
        height: 56px;
        padding: 0;
    }

    html body.onek-body .onek-operator-widget .onek-operator-widget__open-icon {
        width: 34px;
        height: 34px;
    }

    /* The original circular links still spread upward; labels face inward. */
    html body.onek-body .onek-operator-widget .onek-operator-widget__item {
        justify-content: flex-start;
    }

    html body.onek-body .onek-operator-widget .onek-operator-widget__item span {
        left: 44px;
        right: auto;
    }

    html body.onek-body .onek-operator-widget__toggle:focus-visible,
    html body.onek-body .onek-operator-widget__item:focus-visible {
        outline: 2px solid #fff;
        outline-offset: 3px;
    }

    /* Telegram continuation remains available inside the open TriChat panel. */
    #trichat-root #trichat-tg {
        display: none !important;
    }

    html:has(#trichat-root.trichat-open) .onek-floating-actions {
        visibility: hidden;
        pointer-events: none;
    }
    html:has(#trichat-root.trichat-open) .onek-operator-widget__items {
        visibility: hidden !important;
        pointer-events: none !important;
    }
}

@media (max-width: 720px) and (prefers-reduced-motion: reduce) {
    html body.onek-body .onek-floating-actions .onek-operator-widget[data-onek-operator-widget] {
        transition: none;
    }
}
