@import "admin-variables.less";

#fontsampler-admin {

    #fontsampler-admin-ui-wrapper {
        position: relative;

        &:hover {
            .fontsampler-ui-block,
            .fontsampler-interface-row-break {
                outline: 2px solid @fs_color_ok_light;
            }
        }

        #fontsampler-ui-blocks-list {
            display: none;
        }

        // fontsampler UI sortable
        #fontsampler-ui-layout-preview {
            border: 4px solid @fs_color_light;
            padding: 10px;

            label {
                margin: 0;
            }

            // sortable preview fontsamplers
            .fontsampler-interface {
                position: relative;

                // style the otherwise invisible row break so it can be drag and dropped as well
                .fontsampler-interface-row-break {
                    cursor: move;
                    height: 1.5em;
                    background: @fs_color_light;
                    font-style: italic;
                    text-align: center;
                    margin-bottom: 10px;
                    position: relative;

                    &:before {
                        content: "ROW BREAK";
                    }

                    &:hover {
                        outline: 2px solid @fs_color_ok;
                        background: @fs_color_ok_light;
                    }

                    .fontsampler-delete-row-break {
                        position: absolute;
                        right: 0;
                        top: 0;
                        height: 100%;
                        line-height: 1;
                        border: none;
                        background: transparent;
                        cursor: pointer;
                        font-weight: bold;
                    }
                }

                .fontsampler-ui-block {
                    position: relative;

                    // on hovering a block show the overlay
                    &:hover,
                    &.fontsampler-ui-block-menu-open {
                        .fontsampler-ui-block-overlay {
                            display: block;
                            outline: 2px solid @fs_color_ok;
                        }
                    }

                    &.fontsampler-ui-block-menu-open {
                        .fontsampler-ui-block-overlay {
                            .fontsampler-ui-block-options {
                                display: block;
                            }
                        }
                    }

                    // the admin overlay of each ui block with buttons for expanding settings and layout options
                    .fontsampler-ui-block-overlay {
                        background: rgba(100, 200, 240, 0.9); //@fs_color_ok_light as rgb
                        box-sizing: border-box;
                        cursor: move !important;
                        display: none;
                        height: 100%;
                        left: 0;
                        outline: 2px solid @fs_color_ok_light;
                        opacity: 1;
                        padding: 10px;
                        position: absolute;
                        top: 0;
                        width: 100%;
                        z-index: 19;

                        // the button that toggles class settings and adding linebreak
                        .fontsampler-ui-block-settings {
                            box-sizing: border-box;
                            border: none;
                            background: transparent;
                            cursor: pointer;
                            display: block;
                            height: 100%;
                            outline: none;
                            padding: 5px;
                            position: absolute;
                            right: 0;
                            top: 0;
                            width: 30px;

                            img {
                                display: block;
                                height: 20px;
                                width: 20px;
                            }
                        }

                        // wrapper that holds line break button and column class radios
                        .fontsampler-ui-block-options {
                            border: 2px solid @fs_color_ok;
                            display: none;
                            padding: 10px;
                            position: absolute;
                            right: -1px;
                            top: 100%;
                            background: rgba(255, 200, 50, 0.9);
                            min-width: 15em;
                            width: auto;

                            .fontsampler-ui-block-add-break {
                                margin-bottom: 1em;
                            }
                            .fontsampler-ui-block-layout-classes {
                                label {
                                    display: block;
                                    margin: 0.5em 0;
                                }
                            }
                        }

                    }
                }
            }
        }
        #fontsampler-ui-layout-preview-options {
            clear: both;
            display: block;
        }

        .type-tester__slider {
            margin-top: 4px;
        }
    }

    ul.fontsampler-ui-preview-placeholder {
        li {
            display: none;
        }
    }
}