@import "variables";
@import "mixins";

.editor-bottom-bar  {
    height: calc($viewer-bottom-bar-height + $viewer-bottom-bar-border-width);
    margin: 0px 16px 16px 16px;
    
    nav {
        border: $viewer-bottom-bar-border-width solid $xibo-color-primary-l60;
        border-top: 0;
        color: $xibo-color-primary;
        min-height: $viewer-bottom-bar-height;
        font-size: 0;
        z-index: $viewer-bottom-bar-z-index;
        margin: 0;
        background: $xibo-color-neutral-0;
        right: 0;
        left: 0;
        @include border-radius(0 0 4px 4px);
        flex-direction: column;

        span, .info {
            font-size: 1rem;
        }

        .divider {
            display: inline-block;
            height: 40px;
            vertical-align: middle;
            border-right: 3px solid $xibo-color-primary-l5;
            margin: 0 3px;
        }

        .btn {
            color: $xibo-color-secondary;
            width: 38px;
            font-size: 1.2rem;
            border: none;
            border-radius: 0;

            &:hover:not(:disabled) {
                color: lighten($xibo-color-secondary, 10%);
            }

            &:disabled, &.disabled {
                opacity: 0.4;
            }

            &#delete-btn {
                color: $xibo-color-neutral-0;
                background-color: $xibo-color-semantic-error;

                &:hover {
                    background-color: darken($xibo-color-semantic-error, 10%);
                }
            }

            &#undo-btn {
                color: $xibo-color-neutral-1000;
                background-color: $xibo-color-semantic-warning;

                &:hover {
                    background-color: darken($xibo-color-semantic-warning, 10%);
                }
            }
        }

        .hide-on-fs {
            display: inline-block;
        }

        .show-on-fs {
            display: none;
        }

        .viewer-navbar-controls, .viewer-navbar-info {
            width: 100%;
            display: flex;
            align-items: center;
            height: calc($viewer-bottom-bar-height / 2);
            padding: 0 1rem;
        }

        .viewer-navbar-controls {
            justify-content: space-between;
        }

        .viewer-navbar-info {
            margin: 0;
            color: $xibo-color-primary-l5;
            background-color: $xibo-color-primary;

            .info {
                width: 100%;

                .fa-arrow-right {
                    margin: 0 12px;
                }

                .label-name {
                    display: flex;
                    gap: 8px;

                    & > .name {
                        white-space: nowrap;
                        overflow: hidden;
                        text-overflow: ellipsis;
                    }


                    & > .mediaTemplate {
                        white-space: nowrap;
                    }

                    & > .mediaInfo {
                        display: inline-flex;
                        gap: 6px;
                        overflow: hidden;

                        .mediaInfoName {
                            white-space: nowrap;
                            overflow: hidden;
                            text-overflow: ellipsis;
                        }
                    }
                }
            }

            .btn {
                color: $xibo-color-primary-l5;
                height: 38px;
                width: 38px;
                font-size: 1.2rem;
            }
        }

        &.designer-layout {
            .viewer-navbar-info {
                display: none;
            }
        }
    }

    #inline-editor-save {
        display: none;
    }
}

#layout-editor.fullscreen-mode {
    .editor-bottom-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: $toolbar-card-z-index;
        margin: 0;

        &.fs-edit {
            #inline-editor-save {
                display: inline-block;
            }  
        }

        .hide-on-fs {
            display: none;
        }

        .show-on-fs {
            display: inline-block;
        }
    }
}