@import 'scss/font-family.scss';
@import 'theme/variables.scss';


.editor_menu {
    height: 18px;
    padding-left: 2px;
    transition: 0.3s ease-in-out;
    opacity: 0;
    pointer-events: none;

    &.active {
        opacity: 1;
        pointer-events: all;
    }

    &.parking_editor_menu {
        padding: 0px 5px 0px 4px;
    }

    .font_editor {
        &.parking_font_editor {
            flex: 1;
        }
    }

    .editor_buttons {
        width: 18px;
        height: 18px;
        font-family: $font-family-2;
        font-size: 20px;
        color: $grey;
        cursor: pointer;

        .color_picker_arrow {
            display: none !important;
        }

        &.italic_text {
            margin-left: 4px;
        }

        &.underline_text {
            margin-left: 4px;
        }

        &.active {
            svg-icon {
                path {
                    fill: $grey-2;
                }
            }
        }

        svg-icon {
            display: flex;
            justify-content: center;
            align-items: center;

            path {
                fill: $grey-9;
            }

            &:hover {
                path {
                    fill: $grey;
                }
            }
        }

        &.text_color {
            overflow: hidden;
        }

        &:hover,
        &.active {
            background-color: $grey-13;
            opacity: 1;
            color: $grey;
            border-radius: 1px;

            &.text_color {
                background-color: transparent;
            }
        }

        &:before {
            position: absolute;
            height: 100%;
            width: 100%;
            text-align: center;
            line-height: 1.6;
            background-repeat: no-repeat;
            background-position: center;
            cursor: pointer;
        }

        &.text_color {
            position: relative;
            transition: 0.3s ease-in-out;
            border-radius: 2px;
            padding: 2px;
            width: 18px;

            background-repeat: no-repeat;
            background-position: calc(100% - 3px) center;
            background-size: 6px auto;

            &.no_opacity {
                opacity: 1;
                width: 98px;
            }

            &.parking_tooltip {
                width: 100%;
            }

            &:hover {
                opacity: 1;
                background-color: $grey-12;

                .color_picker_arrow {
                    display: flex !important;
                }
            }

            .colors_patter {
                height: 18px !important;
                border-radius: 1px;
                z-index: 10;

                &.closed_pattern {
                    width: 18px;
                    overflow: hidden;
                }

                div {
                    min-width: 14px;
                    max-width: 14px;
                    height: 14px;
                    margin: 0 1px;
                    cursor: pointer;

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

                    &:hover:not(:first-child) {
                        transform: scale(1.1);
                        transform-origin: center;
                    }

                    svg-icon {
                        height: 100%;

                        svg {
                            path {
                                fill: $white-2;
                            }
                        }
                    }
                }

                .editor_buttons_colors {
                    position: relative;

                    border-radius: 1px;
                    transition:
                        transform 0.3s ease-in-out,
                        opacity 0.3s ease-in-out;
                    overflow: hidden;

                    &.hide_elements {
                        opacity: 0;
                    }

                    .color_picker_arrow {
                        position: absolute;
                        z-index: 11;
                        background-color: transparent !important;

                        &.flip_arrow {
                            transform: scaleX(-1);
                        }
                        &.regular_icon {
                            transform: scaleX(1);
                        }
                        svg-icon {
                            svg {
                                display: flex;
                                width: 6px;
                                height: 10px;

                                path {
                                    fill: $white-2;
                                }
                            }
                        }

                        &.hovering_picker {
                            svg-icon {
                                svg {
                                    width: 10px;
                                    height: 10px;
                                }
                            }
                        }
                    }
                }
            }
        }

        &.text_color {
            &:hover,
            &.active {
                background-color: $grey-12 !important;
            }
        }

        &.main_commands {
            background-color: transparent;
        }

        svg-icon {
            path {
                fill: $grey;
            }
        }

        &:hover {
            svg-icon {
                path {
                    fill: $black;
                }
            }
        }

        &.active {
            svg-icon {
                path {
                    fill: $blue-8;
                }
            }

            &:hover {
                svg-icon {
                    path {
                        fill: $blue-9;
                    }
                }
            }
        }
    }

    &.dark {
        .editor_buttons {
            &:hover,
            &.active {
                background-color: $black !important;
            }

            &.main_commands {
                background-color: transparent !important;
            }

            svg-icon {
                path {
                    fill: $grey !important;
                }
            }

            &:hover {
                svg-icon {
                    path {
                        fill: $white !important;
                    }
                }
            }

            &.active {
                svg-icon {
                    path {
                        fill: $blue-8 !important;
                    }
                }

                &:hover {
                    svg-icon {
                        path {
                            fill: $blue-10 !important;
                        }
                    }
                }
            }
        }

        .colors_patter {
            div {
                margin: 0 1px;

                &:nth-child(1) {
                    margin-right: 1px !important;
                    margin-left: 0 !important;
                }
            }

            .editor_buttons_colors .color_picker_arrow {
                svg-icon {
                    path {
                        fill: $black !important;
                    }
                }
            }
        }
    }

    .note_separator {
        margin: 0px 2px;
    }

    .note_border_line {
        height: 24px;
        width: 1px;
        margin: 0 4px;

        background-color: $bw-9;
        border-radius: 1px;

        &.dark {
            background-color: $black;
        }
    }
}
