panel[type="arrow"],
#BMB_bookmarksPopup {
    &:not([animate="false"]) {
        transform: scale(.4) !important;
        opacity: 0 !important;
        transition-property: transform, opacity !important;
        transition-duration: 0.15s !important;
        transition-timing-function: ease-out !important;
    }

    &[animate="open"] {
        transform: none !important;
        opacity: 1.0 !important;
    }

    &[animate="cancel"] {
        transform: none !important;
    }

    &[arrowposition="after_start"] {
        &:-moz-locale-dir(ltr) {
            transform-origin: 20px top !important;
        }

        &:-moz-locale-dir(rtl) {
            transform-origin: calc(100% - 20px) top !important;
        }
    }

    &[arrowposition="after_end"] {
        &:-moz-locale-dir(rtl) {
            transform-origin: 20px top !important;
        }

        &:-moz-locale-dir(ltr) {
            transform-origin: calc(100% - 20px) top !important;
        }
    }

    &[arrowposition="before_start"] {
        &:-moz-locale-dir(ltr) {
            transform-origin: 20px bottom !important;
        }

        &:-moz-locale-dir(rtl) {
            transform-origin: calc(100% - 20px) bottom !important;
        }
    }

    &[arrowposition="before_end"] {
        &:-moz-locale-dir(rtl) {
            transform-origin: 20px bottom !important;
        }

        &:-moz-locale-dir(ltr) {
            transform-origin: calc(100% - 20px) bottom !important;
        }
    }

    &[arrowposition="start_before"] {
        &:-moz-locale-dir(ltr) {
            transform-origin: right 20px !important;
        }

        &:-moz-locale-dir(rtl) {
            transform-origin: left 20px !important;
        }
    }

    &[arrowposition="end_before"] {
        &:-moz-locale-dir(rtl) {
            transform-origin: right 20px !important;
        }

        &:-moz-locale-dir(ltr) {
            transform-origin: left 20px !important;
        }
    }

    &[arrowposition="start_after"] {
        &:-moz-locale-dir(ltr) {
            transform-origin: right calc(100% - 20px) !important;
        }

        &:-moz-locale-dir(rtl) {
            transform-origin: left calc(100% - 20px) !important;
        }
    }

    &[arrowposition="end_after"] {
        &:-moz-locale-dir(rtl) {
            transform-origin: right calc(100% - 20px) !important;
        }

        &:-moz-locale-dir(ltr) {
            transform-origin: left calc(100% - 20px) !important;
        }
    }
}