@import "../../../../../backend/assets/less/core/boot.less";

@formdocument-select-color:   var(--oc-formdocument-select-color);
@formdocument-select-bg:      var(--oc-formdocument-select-bg);

:root, [data-bs-theme="light"] {
    --oc-formdocument-select-color: #6a6cf7;
    --oc-formdocument-select-bg: #e8e8ff;
}

[data-bs-theme="dark"] {
    --oc-formdocument-select-color: #e0e0e0;
    --oc-formdocument-select-bg: #373f47;
}

.record-management-controls {
    font-size: 0;

    > div {
        display: inline-block;
        margin-right: 10px;

        &:last-child {
            margin-right: 0;
        }

        > .record-management-button {
            margin-right: 0;
        }
    }

    .record-management-button {
        display: inline-block;
        border: none;
        background: @primary-bg;
        outline: none;
        -webkit-appearance: none;
        font-size: @font-size-base;
        height: 38px;
        margin-right: 10px;
        border-radius: @border-radius-base;
        padding: 0 15px;
        position: relative;
        white-space: nowrap;

        &:last-child {
            margin-right: 0;
        }

        &[disabled] {
            cursor: default;

            > i,
            > span,
            &:after {
                opacity: 0.5;
            }
        }

        &.has-menu {
            &:after {
                .icon-OctoFont();
                content: @icon-angle-down-arrow;
                position: relative;
                font-size: 16px;
                vertical-align: middle;
                margin-left: 3px;
                margin-right: -4px;
            }
        }

        &.record-status-button {
            padding-left: 35px;
            border: 1px solid @toolbar-border;
            overflow: hidden;

            span {
                position: relative;
            }

            em {
                color: @text-muted;
                font-size: 12px;
                font-style: normal;
            }

            i {
                display: block;
                width: 10px;
                height: 10px;
                border-radius: 100%;
                position: absolute;
                left: 13px;
                top: 13px;

                transition: 0.3s width, 0.3s height, 0.3s left, 0.3s top, 0.3s background-color;
            }

            &.status-published {
                span, &:after {
                    color: white;
                }

                em {
                    color: rgba(255, 255, 255, 0.7);
                }

                &:before {
                    content: '';
                    display: block;
                    width: 10px;
                    height: 10px;
                    border-radius: 100%;
                    position: absolute;
                    left: 13px;
                    top: 13px;
                    background: white;
                    z-index: 1;
                }

                i {
                    width: 500px;
                    height: 500px;
                    left: -250px;
                    top: -250px;
                }
            }

            &.status-draft {
                padding-left: 15px;

                i {
                    width: 500px;
                    height: 500px;
                    left: -250px;
                    top: -250px;
                }

                span, &:after {
                    color: white;
                }

                &:before {
                    display: none;
                }

                &.status-initial-draft {
                    i {
                        background: #46B3A5!important;
                    }
                }
            }
        }

        &.entry-type-selector {
            background: @formdocument-select-bg;
            color: @formdocument-select-color;
        }
    }
}

.record-management-controls .record-management-button.record-status-button.status-published,
.record-management-controls .record-management-button.record-status-button.status-draft {
    border-color: rgba(255, 255, 255, 0.01);
}

[data-bs-theme="dark"] {
    .record-management-controls .record-management-button.record-status-button.status-published,
    .record-management-controls .record-management-button.record-status-button.status-draft {
        border-color: rgba(0, 0, 0, 0.6);
    }
}
