.o_field_statusbar {
    > .o_statusbar_status {
        width: auto;
        height: 100%;
        .o_arrow_button_wrapper {
            .o_purple_line {
                background-color: var(--o-cc1-btn-primary);
            }

            position: relative;
            display: flex;
            flex-direction: column;
            align-items: stretch;

            div {
                position: absolute;
                bottom: -5px;
                left: -1em;
                right: 1em;
                height: 2px;
                z-index: 10;

                &.o_first {
                    right: 0;
                }

                &.o_last {
                    left: 0;
                }
            }
        }

        .o_arrow_button:not(.d-none) {
            position: relative;
            padding: var(--o-statusbar-padding-y) calc(var(--o-statusbar-padding-x) * 1.375);
            border: 0;
            clip-path: polygon(
                var(--o-statusbar-point-top-left),
                var(--o-statusbar-point-top-right),
                var(--o-statusbar-point-middle-right),
                var(--o-statusbar-point-bottom-right),
                var(--o-statusbar-point-bottom-left),
                var(--o-statusbar-point-middle-left)
            );
            margin-left: calc(-1 * var(--o-statusbar-caret-width) - var(--o-statusbar-border-width) * sqrt(3));

            &.o_last {
                --o-statusbar-point-middle-left: 0 50%;
                padding-left: var(--o-statusbar-padding-x);
                margin-left: 0;
                border-top-left-radius: var(--o-statusbar-radius);
                border-bottom-left-radius: var(--o-statusbar-radius);
            }

            &.o_first {
                --o-statusbar-point-top-right: 100% 0;
                --o-statusbar-point-bottom-right: 100% 100%;
                padding-right: var(--o-statusbar-padding-x);
                border-top-right-radius: var(--o-statusbar-radius);
                border-bottom-right-radius: var(--o-statusbar-radius);
            }

            &.dropdown-toggle::after {
                content: normal;
            }

            &::before {
                content: "";
                position: absolute;
                inset: 0;
                background-color: var(--o-statusbar-border);
                clip-path: polygon(
                    var(--o-statusbar-point-top-left),
                    var(--o-statusbar-point-top-right),
                    var(--o-statusbar-point-middle-right),
                    var(--o-statusbar-point-bottom-right),
                    var(--o-statusbar-point-bottom-left),
                    var(--o-statusbar-point-middle-left),
                    var(--o-statusbar-point-top-left),
                    var(--o-statusbar-point-inner-top-left),
                    var(--o-statusbar-point-inner-middle-left),
                    var(--o-statusbar-point-inner-bottom-left),
                    var(--o-statusbar-point-inner-bottom-right),
                    var(--o-statusbar-point-inner-middle-right),
                    var(--o-statusbar-point-inner-top-right),
                    var(--o-statusbar-point-inner-top-left)
                );
            }

            &.o_last::before {
                --o-statusbar-point-inner-top-left: var(--o-statusbar-point-top-left);
                --o-statusbar-point-inner-middle-left: var(--o-statusbar-point-middle-left);
                --o-statusbar-point-inner-bottom-left: var(--o-statusbar-point-bottom-left);
                border-top-left-radius: var(--o-statusbar-radius);
                border-bottom-left-radius: var(--o-statusbar-radius);
            }

            &.o_first::before {
                --o-statusbar-point-inner-top-right: var(--o-statusbar-point-top-right);
                --o-statusbar-point-inner-middle-right: var(--o-statusbar-point-middle-right);
                --o-statusbar-point-inner-bottom-right: var(--o-statusbar-point-bottom-right);
                border-top-right-radius: var(--o-statusbar-radius);
                border-bottom-right-radius: var(--o-statusbar-radius);
            }

            &:hover, &:focus {
                background-color: var(--o-statusbar-background-hover);
            }

            &:disabled {
                opacity: 1;
                cursor: default;

                &:not(.o_arrow_button_current) {
                    &, &:hover, &:focus {
                        color: $text-muted;
                    }
                }
            }

            &.o_arrow_button_current:disabled, &:active:not(.o_last) {
                z-index: 1;
                background-color: var(--o-statusbar-background-active);

                &::before {
                    --o-statusbar-point-inner-top-left: calc(var(--o-statusbar-border-width) * sqrt(3)) var(--o-statusbar-border-width);
                    --o-statusbar-point-inner-top-right: calc(100% - var(--o-statusbar-caret-width) - var(--o-statusbar-border-width) / sqrt(2)) var(--o-statusbar-border-width);
                    --o-statusbar-point-inner-bottom-left: calc(var(--o-statusbar-border-width) * sqrt(3)) calc(100% - var(--o-statusbar-border-width));
                    --o-statusbar-point-inner-bottom-right: calc(100% - var(--o-statusbar-caret-width) - var(--o-statusbar-border-width) / sqrt(2)) calc(100% - var(--o-statusbar-border-width));
                    background-color: var(--o-statusbar-border-active);
                }

                &.o_last::before {
                    --o-statusbar-point-inner-top-left: calc(var(--o-statusbar-border-width) * sqrt(2)) var(--o-statusbar-border-width);
                    --o-statusbar-point-inner-middle-left: calc(var(--o-statusbar-border-width) * sqrt(2)) 50%;
                    --o-statusbar-point-inner-bottom-left: calc(var(--o-statusbar-border-width) * sqrt(2)) calc(100% - var(--o-statusbar-border-width));
                }

                &.o_first::before {
                    --o-statusbar-point-inner-top-right: calc(100% - var(--o-statusbar-border-width) * sqrt(2)) var(--o-statusbar-border-width);
                    --o-statusbar-point-inner-middle-right: calc(100% - var(--o-statusbar-border-width) * sqrt(2)) 50%;
                    --o-statusbar-point-inner-bottom-right: calc(100% - var(--o-statusbar-border-width) * sqrt(2)) calc(100% - var(--o-statusbar-border-width));
                }
            }

            .o_rtl & {
                --o-statusbar-point-top-left: var(--o-statusbar-caret-width) 0;
                --o-statusbar-point-top-right: 100% 0;
                --o-statusbar-point-middle-left: 0 50%;
                --o-statusbar-point-middle-right: calc(100% - var(--o-statusbar-caret-width)) 50%;
                --o-statusbar-point-bottom-left: var(--o-statusbar-caret-width) 100%;
                --o-statusbar-point-bottom-right: 100% 100%;
                --o-statusbar-point-inner-top-left: calc(var(--o-statusbar-caret-width) + var(--o-statusbar-border-width) * sqrt(2)) 0;
                --o-statusbar-point-inner-top-right: calc(100% - var(--o-statusbar-border-width) * sqrt(2)) 0;
                --o-statusbar-point-inner-middle-left: calc(var(--o-statusbar-border-width) * sqrt(2)) 50%;
                --o-statusbar-point-inner-middle-right: calc(100% - var(--o-statusbar-caret-width) - var(--o-statusbar-border-width) * sqrt(2)) 50%;
                --o-statusbar-point-inner-bottom-left: calc(var(--o-statusbar-caret-width) + var(--o-statusbar-border-width) * sqrt(2)) 100%;
                --o-statusbar-point-inner-bottom-right: calc(100% - var(--o-statusbar-border-width) * sqrt(2)) 100%;

                &.o_last {
                    --o-statusbar-point-middle-right: 100% 50%;
                }

                &.o_first {
                    --o-statusbar-point-top-left: 0 0;
                    --o-statusbar-point-bottom-left: 0 100%;
                }

                &.o_last::before {
                    --o-statusbar-point-inner-top-right: var(--o-statusbar-point-top-right);
                    --o-statusbar-point-inner-middle-right: var(--o-statusbar-point-middle-right);
                    --o-statusbar-point-inner-bottom-right: var(--o-statusbar-point-bottom-right);
                }

                &.o_first::before {
                    --o-statusbar-point-inner-top-left: var(--o-statusbar-point-top-left);
                    --o-statusbar-point-inner-middle-left: var(--o-statusbar-point-middle-left);
                    --o-statusbar-point-inner-bottom-left: var(--o-statusbar-point-bottom-left);
                }

                &.o_arrow_button_current:disabled, &:active:not(.o_last) {
                    &::before {
                        --o-statusbar-point-inner-top-left: calc(var(--o-statusbar-caret-width) + var(--o-statusbar-border-width) / sqrt(2)) var(--o-statusbar-border-width);
                        --o-statusbar-point-inner-top-right: calc(100% - var(--o-statusbar-border-width) * sqrt(3)) var(--o-statusbar-border-width);
                        --o-statusbar-point-inner-bottom-left: calc(var(--o-statusbar-caret-width) + var(--o-statusbar-border-width) / sqrt(2)) calc(100% - var(--o-statusbar-border-width));
                        --o-statusbar-point-inner-bottom-right: calc(100% - var(--o-statusbar-border-width) * sqrt(3)) calc(100% - var(--o-statusbar-border-width));
                    }

                    &.o_last::before {
                        --o-statusbar-point-inner-top-right: calc(100% - var(--o-statusbar-border-width) * sqrt(2)) var(--o-statusbar-border-width);
                        --o-statusbar-point-inner-middle-right: calc(100% - var(--o-statusbar-border-width) * sqrt(2)) 50%;
                        --o-statusbar-point-inner-bottom-right: calc(100% - var(--o-statusbar-border-width) * sqrt(2)) calc(100% - var(--o-statusbar-border-width));
                    }

                    &.o_first::before {
                        --o-statusbar-point-inner-top-left: calc(var(--o-statusbar-border-width) * sqrt(2)) var(--o-statusbar-border-width);
                        --o-statusbar-point-inner-middle-left: calc(var(--o-statusbar-border-width) * sqrt(2)) 50%;
                        --o-statusbar-point-inner-bottom-left: calc(var(--o-statusbar-border-width) * sqrt(2)) calc(100% - var(--o-statusbar-border-width));
                    }
                }
            }
        }
    }
}
