/** 
 * Flexmonster Pivot Table & Charts https://www.flexmonster.com/
 * April 2026 (v. 2.9.128)
 * Copyright 2026 Flexmonster All rights reserved
 *
 * Flexmonster Pivot Table & Charts is a part of Flexmonster Software that is distributed under the terms and conditions of the Flexmonster Software License Agreement:
 * https://www.flexmonster.com/software-license-agreement/ ("Agreement").
 *
 * By downloading, installing, and/or otherwise using Flexmonster Pivot Table & Charts, you accept and agree to be bound by and require each of your Representatives,
 * clients and/or end-users, as the case may be, to be bound by all the terms and conditions of Agreement.
 *
 * Pricing for the commercial license models can be found on the Flexmonster pricing page:
 * https://www.flexmonster.com/pivot-table-editions-and-pricing/.
 */
@import (reference) "default/flexmonster.less";

:root {
    --fm-version: "2.9.128";
}

/* ===== RESET STYLES ===== */
#fm-pivot-view,
#fm-toolbar-wrapper {
    line-height: 1;
    -webkit-font-smoothing: antialiased !important;
    text-rendering: optimizeLegibility !important;
    -webkit-text-size-adjust: none;
}

#fm-pivot-view, 
#fm-toolbar-wrapper {
    input[type=text] {
        -webkit-appearance: none;
    }

    /* Hide HTML5 Up and Down arrows. */
    input[type="number"]::-webkit-outer-spin-button, input[type="number"]::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

    input[type="number"] {
        -moz-appearance: textfield;
    }
}

#fm-pivot-view div, #fm-pivot-view span, #fm-pivot-view applet, #fm-pivot-view object, #fm-pivot-view iframe,
#fm-pivot-view h1, #fm-pivot-view h2, #fm-pivot-view h3, #fm-pivot-view h4, #fm-pivot-view h5, #fm-pivot-view h6, #fm-pivot-view p, #fm-pivot-view blockquote, #fm-pivot-view pre,
#fm-pivot-view a, #fm-pivot-view abbr, #fm-pivot-view acronym, #fm-pivot-view address, #fm-pivot-view big, #fm-pivot-view cite, #fm-pivot-view code,
#fm-pivot-view del, #fm-pivot-view dfn, #fm-pivot-view em, #fm-pivot-view img, #fm-pivot-view ins, #fm-pivot-view kbd, #fm-pivot-view q, #fm-pivot-view s, #fm-pivot-view samp,
#fm-pivot-view small, #fm-pivot-view strike, #fm-pivot-view strong, #fm-pivot-view sub, #fm-pivot-view sup, #fm-pivot-view tt, #fm-pivot-view var,
#fm-pivot-view b, #fm-pivot-view button, #fm-pivot-view u, #fm-pivot-view i, #fm-pivot-view center,
#fm-pivot-view dl, #fm-pivot-view dt, #fm-pivot-view dd, #fm-pivot-view ol, #fm-pivot-view ul, #fm-pivot-view li,
#fm-pivot-view fieldset, #fm-pivot-view form, #fm-pivot-view label, #fm-pivot-view legend,
#fm-pivot-view table, #fm-pivot-view caption, #fm-pivot-view tbody, #fm-pivot-view tfoot, #fm-pivot-view thead, #fm-pivot-view tr, #fm-pivot-view th, #fm-pivot-view td,
#fm-pivot-view article, #fm-pivot-view aside, #fm-pivot-view canvas, #fm-pivot-view details, #fm-pivot-view embed,
#fm-pivot-view figure, #fm-pivot-view figcaption, #fm-pivot-view footer, #fm-pivot-view header,
#fm-pivot-view menu, #fm-pivot-view nav, #fm-pivot-view output, #fm-pivot-view ruby, #fm-pivot-view section, #fm-pivot-view summary,
#fm-pivot-view time, #fm-pivot-view mark, #fm-pivot-view audio, #fm-pivot-view video, 
#fm-toolbar-wrapper div, #fm-toolbar-wrapper span, #fm-toolbar-wrapper applet, #fm-toolbar-wrapper object, #fm-toolbar-wrapper iframe,
#fm-toolbar-wrapper h1, #fm-toolbar-wrapper h2, #fm-toolbar-wrapper h3, #fm-toolbar-wrapper h4, #fm-toolbar-wrapper h5, #fm-toolbar-wrapper h6, #fm-toolbar-wrapper p, #fm-toolbar-wrapper blockquote, #fm-toolbar-wrapper pre,
#fm-toolbar-wrapper a, #fm-toolbar-wrapper abbr, #fm-toolbar-wrapper acronym, #fm-toolbar-wrapper address, #fm-toolbar-wrapper big, #fm-toolbar-wrapper cite, #fm-toolbar-wrapper code,
#fm-toolbar-wrapper del, #fm-toolbar-wrapper dfn, #fm-toolbar-wrapper em, #fm-toolbar-wrapper img, #fm-toolbar-wrapper ins, #fm-toolbar-wrapper kbd, #fm-toolbar-wrapper q, #fm-toolbar-wrapper s, #fm-toolbar-wrapper samp,
#fm-toolbar-wrapper small, #fm-toolbar-wrapper strike, #fm-toolbar-wrapper strong, #fm-toolbar-wrapper sub, #fm-toolbar-wrapper sup, #fm-toolbar-wrapper tt, #fm-toolbar-wrapper var,
#fm-toolbar-wrapper b, #fm-toolbar-wrapper button, #fm-toolbar-wrapper u, #fm-toolbar-wrapper i, #fm-toolbar-wrapper center,
#fm-toolbar-wrapper dl, #fm-toolbar-wrapper dt, #fm-toolbar-wrapper dd, #fm-toolbar-wrapper ol, #fm-toolbar-wrapper ul, #fm-toolbar-wrapper li,
#fm-toolbar-wrapper fieldset, #fm-toolbar-wrapper form, #fm-toolbar-wrapper label, #fm-toolbar-wrapper legend,
#fm-toolbar-wrapper table, #fm-toolbar-wrapper caption, #fm-toolbar-wrapper tbody, #fm-toolbar-wrapper tfoot, #fm-toolbar-wrapper thead, #fm-toolbar-wrapper tr, #fm-toolbar-wrapper th, #fm-toolbar-wrapper td,
#fm-toolbar-wrapper article, #fm-toolbar-wrapper aside, #fm-toolbar-wrapper canvas, #fm-toolbar-wrapper details, #fm-toolbar-wrapper embed,
#fm-toolbar-wrapper figure, #fm-toolbar-wrapper figcaption, #fm-toolbar-wrapper footer, #fm-toolbar-wrapper header,
#fm-toolbar-wrapper menu, #fm-toolbar-wrapper nav, #fm-toolbar-wrapper output, #fm-toolbar-wrapper ruby, #fm-toolbar-wrapper section, #fm-toolbar-wrapper summary,
#fm-toolbar-wrapper time, #fm-toolbar-wrapper mark, #fm-toolbar-wrapper audio, #fm-toolbar-wrapper video {
    margin: 0;
    padding: 0;
    border: 0;
    font: inherit;
    font-size: 100%;
    vertical-align: baseline;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    -webkit-transition: none;
    transition: none;
    border-collapse: collapse;
    border-spacing: 0;
}

#fm-pivot-view ol, #fm-pivot-view ul,
#fm-toolbar-wrapper ol, #fm-toolbar-wrapper ul {
    list-style: none;
}

#fm-pivot-view table,
#fm-toolbar-wrapper table {
    border-collapse: collapse;
    border-spacing: 0;
}

#fm-pivot-view caption, #fm-pivot-view th, #fm-pivot-view td,
#fm-toolbar-wrapper caption, #fm-toolbar-wrapper th, #fm-toolbar-wrapper td {
    text-align: left;
    font-weight: normal;
    vertical-align: middle;
}

#fm-pivot-view q, #fm-pivot-view blockquote,
#fm-toolbar-wrapper q, #fm-toolbar-wrapper blockquote {
    quotes: none;
}

    #fm-pivot-view q:before, #fm-pivot-view q:after, #fm-pivot-view blockquote:before, #fm-pivot-view blockquote:after,
    #fm-toolbar-wrapper q:before, #fm-toolbar-wrapper q:after, #fm-toolbar-wrapper blockquote:before, #fm-toolbar-wrapper blockquote:after {
        content: "";
        content: none;
    }

#fm-pivot-view img,
#fm-toolbar-wrapper img {
    max-width: 100%;
    height: auto;
    height: initial;
    border: none;
}

#fm-pivot-view a,
#fm-toolbar-wrapper a {
    text-decoration: none;
}

#fm-pivot-view article, #fm-pivot-view aside, #fm-pivot-view details, #fm-pivot-view figcaption, #fm-pivot-view figure, #fm-pivot-view footer, #fm-pivot-view header, #fm-pivot-view main, #fm-pivot-view menu, #fm-pivot-view nav, #fm-pivot-view section, #fm-pivot-view summary,
#fm-toolbar-wrapper article, #fm-toolbar-wrapper aside, #fm-toolbar-wrapper details, #fm-toolbar-wrapper figcaption, #fm-toolbar-wrapper figure, #fm-toolbar-wrapper footer, #fm-toolbar-wrapper header, #fm-toolbar-wrapper main, #fm-toolbar-wrapper menu, #fm-toolbar-wrapper nav, #fm-toolbar-wrapper section, #fm-toolbar-wrapper summary {
    display: block;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

#fm-pivot-view :focus,
#fm-toolbar-wrapper :focus {
    outline: none;
}

#fm-pivot-view h1,
#fm-pivot-view h2,
#fm-pivot-view h3,
#fm-pivot-view h4,
#fm-pivot-view h5,
#fm-pivot-view h6,
#fm-toolbar-wrapper h1,
#fm-toolbar-wrapper h2,
#fm-toolbar-wrapper h3,
#fm-toolbar-wrapper h4,
#fm-toolbar-wrapper h5,
#fm-toolbar-wrapper h6  {
    font-weight: normal;
}
/*-----------STANDARD RESET END-----------------*/

@font-face {
  font-family: "flexmonster-icons";
  src: url("../assets/flexmonster-icons.woff?v2.9.94") format("woff"), 
       url("../assets/flexmonster-icons.ttf?v2.9.94") format("truetype"), 
       url("../assets/flexmonster-icons.svg#flexmonster-icons?v2.9.94") format("svg");
  font-weight: normal;
  font-style: normal;
}

.rotate(@deg: 90) {
    -webkit-transform: rotate(@deg * 1deg);
    -moz-transform: rotate(@deg * 1deg);
    transform: rotate(@deg * 1deg);
    -o-transform: rotate(@deg * 1deg);
    @IEdeg: round((@deg / 90), 0);
    filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@IEdeg);
}

/* === Do NOT remove and do NOT change .fm-csscheck class === */
.fm-csscheck {
    font-family: 'flexmonster';
}

/* ===== PIVOT UI ===== */
#fm-pivot-view .fm-ui,
#fm-pivot-view .fm-ui span,
#fm-pivot-view .fm-ui div,
#fm-pivot-view .fm-ui p,
#fm-pivot-view .fm-ui a,
#fm-pivot-view .fm-ui table,
#fm-pivot-view .fm-ui table th,
#fm-pivot-view .fm-ui table tr,
#fm-pivot-view .fm-ui table td,
#fm-pivot-view .fm-ui ul,
#fm-pivot-view .fm-ui li,
#fm-pivot-view .fm-ui input,
#fm-pivot-view .fm-ui textarea,
#fm-pivot-view .fm-ui select,
#fm-toolbar-wrapper .fm-toolbar-ui,
#fm-toolbar-wrapper .fm-toolbar-ui span,
#fm-toolbar-wrapper .fm-toolbar-ui div,
#fm-toolbar-wrapper .fm-toolbar-ui p,
#fm-toolbar-wrapper .fm-toolbar-ui a,
#fm-toolbar-wrapper .fm-toolbar-ui table,
#fm-toolbar-wrapper .fm-toolbar-ui table th,
#fm-toolbar-wrapper .fm-toolbar-ui table tr,
#fm-toolbar-wrapper .fm-toolbar-ui table td,
#fm-toolbar-wrapper .fm-toolbar-ui ul,
#fm-toolbar-wrapper .fm-toolbar-ui li,
#fm-toolbar-wrapper .fm-toolbar-ui input,
#fm-toolbar-wrapper .fm-toolbar-ui textarea,
#fm-toolbar-wrapper .fm-toolbar-ui select {
    font-family: @font-family;
    font-size: @font-size;
    text-align: left;
    color: @theme-text-color;
    -webkit-font-smoothing: antialiased;
    margin: 0;
    padding: 0;
    border-radius: 0px;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    text-shadow: none;
    float: none;
    line-height: normal;
}

#fm-pivot-view .fm-ui-mobile,
#fm-pivot-view .fm-ui-mobile span,
#fm-pivot-view .fm-ui-mobile div,
#fm-pivot-view .fm-ui-mobile p,
#fm-pivot-view .fm-ui-mobile a,
#fm-pivot-view .fm-ui-mobile table,
#fm-pivot-view .fm-ui-mobile th,
#fm-pivot-view .fm-ui-mobile tr,
#fm-pivot-view .fm-ui-mobile td,
#fm-pivot-view .fm-ui-mobile ul,
#fm-pivot-view .fm-ui-mobile li,
#fm-pivot-view .fm-ui-mobile input,
#fm-pivot-view .fm-ui-mobile textarea,
#fm-pivot-view .fm-ui-mobile select,
#fm-pivot-view .fm-ui-mobile option {
    font-size: @font-size-mobile;
    -webkit-border-radius: 0;
    border-radius: 0;
}

#fm-pivot-view .fm-ui-mobile .fm-grid-layout div.fm-cell.fm-header{
    line-height: @font-size-mobile;
}

#fm-pivot-view .fm-ui-mobile input[type="text"] {
    height: 28px;
    line-height: 28px;
    border: @ui-border;
    background-color: rgb(255, 255, 255);
}

#fm-pivot-view .fm-ui-mobile select {
    background-color: rgb(255, 255, 255);
}

#fm-pivot-view .fm-ui a {
    font-weight: normal;
}

#fm-pivot-view .fm-ui ul > li:before {
    width: 0px !important;
    height: 0px !important;
    margin: 0;
    padding: 0;
    border: 0;
}

#fm-pivot-view a.fm-ui {
    color: inherit;
    font-weight: normal;
}

    #fm-pivot-view a.fm-ui:hover {
        color: inherit;
        font-weight: normal;
        text-decoration: none;
    }

#fm-pivot-view input.fm-ui {
    font-size: 12px;
    outline: none;
}

#fm-pivot-view input.fm-ui-mobile {
    font-size: @font-size-mobile;
}

#fm-pivot-view span.fm-ui {
    font-size: 11px;
}

#fm-pivot-view span.fm-ui-mobile {
    font-size: @font-size-mobile;
}

#fm-pivot-view div.fm-ui-clear {
    clear: both;
}

#fm-pivot-view .fm-pointer-events-none {
    pointer-events: none;
}

#fm-pivot-view input[type=text].fm-ui-text-input,
#fm-pivot-view input[type=number].fm-ui-text-input {
    /*vertical-align: -webkit-baseline-middle;
    vertical-align: -moz-middle-with-baseline;*/
    -moz-box-shadow: none;
    -webkit-box-shadow: none;
    box-shadow: none;
    width: 100%;
    height: 38px;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    padding-right: 10px;
    padding-left: 10px;
    text-align: left;
    color: @ui-element-text-color;
    font-size: @ui-element-font-size;
    background: @background-ui-element-base-color;
    border: @ui-element-border;
}

    #fm-pivot-view input[type=text].fm-ui-text-input.fm-ui-prompt {
        color: @ui-prompt-color;
        font-style: italic;
    }

    // #fm-pivot-view input[type=text].fm-ui-text-input.fm-ui-mobile {
    //     height: 30px;
    // }

#fm-pivot-view .fm-ui textarea.fm-ui-text-area {
    resize: none;
    border: @ui-border;
    padding: 1px;
    -moz-box-shadow: none;
    -webkit-box-shadow: none;
    box-shadow: none;
    margin: 0;
    color: @ui-text-area-color;
    background: @ui-text-area-background-color;
    font-size: @ui-element-font-size;
}

    #fm-pivot-view .fm-ui textarea.fm-ui-text-area:focus {
        outline: none;
    }
// icons
#fm-pivot-view {
    [class^="fm-ui-icon-"]:before, 
    [class*=" fm-ui-icon-"]:before, 
    .fm-ui-icon:before {
        /* use !important to prevent issues with browser extensions that change fonts */
        font-family: flexmonster-icons !important;
        speak-as: none;
        font-style: normal;
        font-weight: normal;
        font-variant: normal;
        text-transform: none;
        line-height: 1;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }

    .fm-icon-act_add:before {
        content: "\e900";
    }

    .fm-icon-act_calc:before {
        content: "\e901";
    }

    .fm-icon-act_check:before {
        content: "\e902";
    }

    .fm-icon-act_close:before {
        content: "\e903";
    }

    .fm-icon-act_close_small:before {
        content: "\e904";
    }

    .fm-icon-act_filter:before {
        content: "\e905";
    }

    .fm-icon-act_font:before {
        content: "\e906";
    }

    .fm-icon-act_move:before {
        content: "\e907";
    }

    .fm-icon-act_roll_down:before {
        content: "\e908";
    }

    .fm-icon-act_roll_up:before {
        content: "\e909";
    }

    .fm-icon-act_search:before {
        content: "\e90a";
    }

    .fm-icon-act_sigma:before {
        content: "\e90b";
    }

    .fm-icon-act_table_settings:before {
        content: "\e90c";
    }

    .fm-icon-act_table_sort:before {
        content: "\e90d";
    }

    .fm-icon-act_trash:before {
        content: "\e90e";
    }

    .fm-icon-arrow_down:before {
        content: "\e90f";
    }

    .fm-icon-arrow_left:before {
        content: "\e910";
    }

    .fm-icon-arrow_right:before {
        content: "\e911";
    }

    .fm-icon-arrow_up:before {
        content: "\e912";
    }

    .fm-icon-calc_abs:before {
        content: "\e913";
    }

    .fm-icon-calc_and:before {
        content: "\e914";
    }

    .fm-icon-calc_assigne:before {
        content: "\e915";
    }

    .fm-icon-calc_degree:before {
        content: "\e916";
    }

    .fm-icon-calc_divide:before {
        content: "\e917";
    }

    .fm-icon-calc_equal:before {
        content: "\e918";
    }

    .fm-icon-calc_if:before {
        content: "\e919";
    }

    .fm-icon-calc_less:before {
        content: "\e91a";
    }

    .fm-icon-calc_less_equal:before {
        content: "\e91b";
    }

    .fm-icon-calc_max:before {
        content: "\e91c";
    }

    .fm-icon-calc_min:before {
        content: "\e91d";
    }

    .fm-icon-calc_minus:before {
        content: "\e91e";
    }

    .fm-icon-calc_more:before {
        content: "\e91f";
    }

    .fm-icon-calc_more_equal:before {
        content: "\e920";
    }

    .fm-icon-calc_multiply:before {
        content: "\e921";
    }

    .fm-icon-calc_notequal:before {
        content: "\e922";
    }

    .fm-icon-calc_or:before {
        content: "\e923";
    }

    .fm-icon-calc_plus:before {
        content: "\e924";
    }

    .fm-icon-chart_direction_xy:before {
        content: "\e925";
    }

    .fm-icon-count_down:before {
        content: "\e926";
    }

    .fm-icon-count_up:before {
        content: "\e927";
    }

    .fm-icon-dd_connect_csv:before {
        content: "\e928";
    }

    .fm-icon-dd_connect_json:before {
        content: "\e929";
    }

    .fm-icon-dd_export_bar:before {
        content: "\e92a";
    }

    .fm-icon-dd_export_bar_hor:before {
        content: "\e92b";
    }

    .fm-icon-dd_export_bar_lane:before {
        content: "\e92c";
    }

    .fm-icon-dd_export_bar_stack:before {
        content: "\e92d";
    }

    .fm-icon-dd_export_line:before {
        content: "\e92e";
    }

    .fm-icon-dd_export_pie:before {
        content: "\e92f";
    }

    .fm-icon-dd_export_scatter:before {
        content: "\e930";
    }

    .fm-icon-dd_format:before {
        content: "\e931";
    }

    .fm-icon-dd_format_1:before {
        content: "\e932";
    }

    .fm-icon-dd_open_local:before {
        content: "\e933";
    }

    .fm-icon-dd_open_remote:before {
        content: "\e934";
    }

    .fm-icon-dd_save_exel:before {
        content: "\e935";
    }

    .fm-icon-dd_save_html:before {
        content: "\e936";
    }

    .fm-icon-dd_save_image:before {
        content: "\e937";
    }

    .fm-icon-dd_save_pdf:before {
        content: "\e938";
    }

    .fm-icon-dd_save_print:before {
        content: "\e939";
    }

    .fm-icon-direction_direction_y:before {
        content: "\e93a";
    }

    .fm-icon-menu_charts:before {
        content: "\e93b";
    }

    .fm-icon-menu_connect:before {
        content: "\e93c";
    }

    .fm-icon-menu_export:before {
        content: "\e93d";
    }

    .fm-icon-menu_fields:before {
        content: "\e93e";
    }

    .fm-icon-menu_format:before {
        content: "\e93f";
    }

    .fm-icon-menu_fullscreen_close:before {
        content: "\e940";
    }

    .fm-icon-menu_fullscreen_open:before {
        content: "\e941";
    }

    .fm-icon-menu_grid:before {
        content: "\e942";
    }

    .fm-icon-menu_open:before {
        content: "\e943";
    }

    .fm-icon-menu_options:before {
        content: "\e944";
    }

    .fm-icon-menu_save:before {
        content: "\e945";
    }

    .fm-icon-notif_arrow:before {
        content: "\e946";
    }

    .fm-icon-notif_confirm:before {
        content: "\e947";
    }

    .fm-icon-notif_info:before {
        content: "\e948";
    }

    .fm-icon-notif_warning:before {
        content: "\e949";
    }
}
.fm-ui-icon {
    display: block;
    position: absolute;
    font-family: 'flexmonster-icons' !important;
    speak-as: none;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    width: auto;
    height: auto;
    height: initial;
    background: transparent;
    /* Better Font Rendering =========== */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

// mixins
.fm-ui-vam {
    top: 50%;
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);
    -moz-transform: translateY(-50%);
    -webkit-transform: translateY(-50%);
}
.fm-ui-icon-vam {
    .fm-ui-icon;
    .fm-ui-vam;
}

.fm-ui-ham {
    left: 50%;
    -webkit-transform: translateX(-50%);
    -ms-transform: translateX(-50%);
    transform: translateX(-50%);
}

.fm-ui-icon-ham {
    .fm-ui-icon;
    .fm-ui-ham;
}

.fm-ui-icon-c {
    .fm-ui-icon;
    top: 50%;
    left: 50%;
    transform: translateY(-50%) translateX(-50%);
    -ms-transform: translateY(-50%) translateX(-50%);
    -moz-transform: translateY(-50%) translateX(-50%);
    -webkit-transform: translateY(-50%) translateX(-50%);
}

.fm-shadow {
    -webkit-box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

// labels 
#fm-pivot-view {
    span.fm-ui-label {
        color: @ui-label-color;
        font-size: @ui-label-font-size;

        * {
            font-size: @ui-label-font-size;
        }

        b {
            font-weight: bold;
        }
    }

    span.fm-ui-label-light {
        color: @ui-label-color-light;
    }
}
// buttons
#fm-pivot-view,
#fm-toolbar-wrapper {
    button.fm-ui-btn,
    a.fm-ui-btn {
        -webkit-appearance: none;
        -moz-appearance: none;
        -webkit-box-sizing: border-box;
        box-sizing: border-box;
        text-transform: uppercase;
        position: relative;
        outline: none;
        border: none;
        border-radius: @ui-btn-border-radius;
        cursor: pointer;
        text-align: center;
        display: inline-block;
        vertical-align: top;
        font-size: @ui-btn-font-size;
        font-weight: bold;
        padding: 10px 12px;
        letter-spacing: 0.5px;
        min-width: 90px;
        color: @ui-btn-text-color;
        border: @ui-border-dark;
        background-color: @background-ui-element-base-color;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;

        &:hover {
            font-weight: bold;
            color: @ui-btn-dark-color-hover;
            border-color: @ui-btn-dark-color-hover;
            background-color: @ui-background-light;
        }

        &:hover,
        &:focus,
        &:active {
            outline: none;
        }
    }


    

    a.fm-ui-btn-dark,
    button.fm-ui-btn-dark {
        color: @ui-btn-dark-text-color;
        background: @ui-background-dark;

        &:hover {
            font-weight: bold;
            color: @ui-btn-dark-text-color;
            background: @ui-btn-dark-color-hover;
        }

        &:disabled {
            opacity: 1;
            pointer-events: none;
            cursor: default;
            color: lighten(@ui-btn-dark-text-color, 30%);
            background: lighten(@ui-background-dark, 30%);
        }
    }

    a.fm-ui-btn-light,
    button.fm-ui-btn-light {
        background: @ui-background-superlight;
        border: @ui-element-border;
        color: @ui-btn-light-text-color;
        font-weight: normal;
        text-transform: none;
        padding: 11px 11px;

        &:hover {
            background: @ui-btn-color-hover;//#f8f8f8;
            border-color: @ui-border-color-light;
            color: @ui-btn-light-text-color;
            font-weight: normal;
        }
    }

    a.fm-ui-btn-superlight,
    button.fm-ui-btn-superlight {
        background: @background-ui-element-base-color;
        border: @ui-element-border;
        color: @ui-btn-light-text-color;
        font-weight: normal;
        text-transform: none;
        padding: 11px 11px;
        padding-top: 9px;

        &:hover {
            background: @ui-btn-color-light-hover;
            border-color: @ui-border-color-light;
            color: @ui-btn-light-text-color;
            font-weight: normal;
        }
    }

    a.fm-ui-btn.fm-ui-btn-close,
    button.fm-ui-btn.fm-ui-btn-close {
        font-size: 0;
        border: none;
        background: none;
        min-width: auto;
        min-width: initial;
        width: 30px;
        height: 30px;
        padding: 2px;
        &:before {
            .fm-ui-icon;
            content: "\e903";
            font-size: 26px;
            position: static;
        }
    }

    .fm-ui-btns-row {
        font-size: 0;

        .fm-ui-btn {
            margin-right: 20px;
            height: 38px;
            &:last-child {
               margin-right: 0;
            }
        }
    }
}

// toggle button
#fm-pivot-view {
    a.fm-ui-toggle-btn,
    button.fm-ui-toggle-btn {
        color: @ui-btn-toggle-text-color;
        font-size: @ui-btn-font-size;
        line-height: 36px;
        display: inline-block;
        text-align: center;
        cursor: pointer;
        border: @ui-element-border;
        border-radius: @ui-btn-border-radius;
        background: @background-ui-element-base-color;

        &.fm-selected {
            color: @ui-btn-toggle-selected-text-color;
            background: @ui-background-light;
        }

        &:hover {
            color: @ui-btn-toggle-selected-text-color;
            background: @ui-btn-color-hover;
        }
    }

    a.fm-ui-toggle-btn-dark,
    button.fm-ui-toggle-btn-dark {
        color: @ui-btn-toggle-selected-text-color;
        background: @ui-background-light;

        &.fm-selected {
            color: @ui-btn-toggle-dark-selected-text-color;
            background: @ui-background-dark;
            border-color: @ui-border-color-dark;
    
            &:hover {
                background: @ui-btn-dark-color-hover;
                border-color: @ui-btn-dark-color-hover;
            }
        }
    }
}

#fm-pivot-view a.fm-ui-link-btn {
    background: none;
    font-size: 12px;
    text-decoration: underline;
    line-height: 1;
    width: auto;
    width: initial;
    height: auto;
    height: initial;
    border: none;
    padding: 0;
    cursor: pointer;
    
    &:hover {
        background: none;
        text-decoration: none;
    }

    &.fm-ui-pressed {
        background: none;
        text-decoration: underline;
    }
}

// checkbox
#fm-pivot-view {
    a.fm-ui-checkbox {
        cursor: pointer;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        display: inline-block;
        vertical-align: middle;

        .fm-ui-label {
            padding-left: 30px;
            position: relative;
            line-height: 1.2;
            color: @ui-element-text-color;
            font-size: @ui-element-font-size;

            &:before {
                content: '';
                display: inline-block;
                box-sizing: border-box;
                position: absolute;
                left: 0;
                top: 0;
                width: 18px;
                height: 18px;
                border: @ui-element-border;
                background: @background-ui-element-base-color;
            }

            &:before:hover {
                border-color: @ui-border-color;
            }

            &:after {
                .fm-ui-icon-vam;
                opacity: 0;
                content: '\e947';
                color: @ui-element-checkbox-color;
                font-size: 20px;
                left: -1px;
            }
        }


        &.fm-selected {
            .fm-ui-label:after {
                opacity: 1;
                font-weight: @ui-element-checkbox-font-weight;
                width: 0;
            }

            .fm-ui-label:before {
                border: 1px solid @ui-background-dark;
                background: @ui-background-dark;
            }
        }

        &.fm-ui-semi-selected {
            .fm-ui-label:after {
                content: '';
                border: 5px solid @ui-background-dark;
                background-color: @ui-background-dark;
                width: 0;
                height: 0;
                left: 4px;
                top: 9px;
                opacity: 1;
            }
        }
    }
}

.fm-ui-arrow-up {
    &:before,
    &:after {
        content: '';
        position: absolute;
        display: block;
        left: 50%;
        -webkit-transform: translateX(-50%);
        -ms-transform: translateX(-50%);
        transform: translateX(-50%);
    }

    &:before {
        width: 0px;
        height: 0px;
        border-style: solid;
        border-width: 0 5.5px 6px 5.5px;
        border-color: transparent transparent @ui-element-border-color transparent;
        top: -7px;
    }

    &:after {
        width: 0px;
        height: 0px;
        border-style: solid;
        border-width: 0 4.5px 6px 4.5px;
        border-color: transparent transparent @background-ui-element-base-color transparent;
        top: -6px;
    }
}

// dropdown
#fm-toolbar-wrapper,
#fm-pivot-view {
    div.fm-ui-dropdown {
        text-align: left;
        display: inline-block;
        vertical-align: top;
        width: auto;
        width: initial;
        position: relative;
        -webkit-box-sizing: border-box;
        box-sizing: border-box;

        .fm-ui-dropdown-btn {
            display: block;
            position: relative;
            background-color: @background-ui-element-base-color;
            text-align: left;
            border: @ui-element-border;
            border-radius: 0;
            padding: 9px 25px 10px 10px;
            -webkit-box-sizing: border-box;
            box-sizing: border-box;
            cursor: pointer;
            height: 38px;

            .fm-ui-label {
                color: @ui-element-text-color;
                font-size: @ui-element-font-size;
                vertical-align: top;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
                display: inline-block;
                width: 100%;
                line-height: 18px;
            }
        }

        .fm-ui-dropdown-btn:after {
            .fm-ui-icon-vam;
            content: "\e908";
            right: 8px;
            font-size: 21px;
            color: @ui-icon-color;
            margin-top: -1px;
        }

        .fm-ui-dropdown-btn.fm-selected:after {
            content: "\e909";
        }

        .fm-ui-dropdown-btn.fm-selected + .fm-ui-dropdown-list {
            margin-top: 5px;
            visibility: visible;
            opacity: 1;
        }

        .fm-ui-dropdown-list {
            .fm-ui-arrow-up;
            .fm-shadow;

            display: block;
            position: absolute;
            z-index: 3;
            left: 0;
            top: 100%;
            border: @ui-element-border;
            margin-top: 20px;
            visibility: hidden;
            min-width: 100%;
            -webkit-box-sizing: border-box;
            box-sizing: border-box;
            opacity: 1;
            background: @background-ui-element-base-color;

            ul {
                overflow-y: auto;
                max-height: 300px;

                li {
                    display: block;
                    border-bottom: @ui-element-inner-border;
                    padding: 9px 9px;
                    cursor: pointer;
                    position: relative;

                    .fm-ui-label {
                        color: @ui-element-text-color;
                        font-size: @ui-element-font-size;
                        white-space: nowrap;
                        overflow: hidden;
                        text-overflow: ellipsis;
                        display: inline-block;
                        width: 100%;
                    }

                    &:last-child {
                        border-bottom: none;
                    }

                    &:hover {
                        background: @ui-background-light;
                    }

                    &.fm-selected {
                        background: @ui-background-light;
                        padding-right: 32px;
                        position: relative;

                        &:after {
                            .fm-ui-icon-vam;
                            content: '\e902';
                            color: @ui-icon-color;
                            right: 6px;
                            font-size: 22px;
                            margin-top: -2px;
                        }
                    }
                }
            }
        }

    }
}

/* popup */
#fm-pivot-view {
    div.fm-ui-window {
        .fm-shadow;
        max-width: 100%;
        background: @background-base-color;
        margin: 0 auto 0;
        border: @ui-pop-up-border;
        padding: 24px 30px 30px;
        -webkit-box-sizing: border-box;
        box-sizing: border-box;
        position: absolute;
        z-index: 7;

        .fm-popup-header {
            min-height: 40px;
            margin-bottom: 10px;
            
            &.fm-ph-simple {
                margin-bottom: 24px;
            }

            .fm-popup-icons-row {
                margin-bottom: 25px;
                margin-top: 7px;
            }

            .fm-ui-btns-row {
               position: absolute;
               right: 30px;
            }
        }

        .fm-popup-title {
            color: @ui-title-color;
            font-size: @ui-title-font-size;
            display: block;
            padding: 5px 0;
        }

        .fm-popup-subtitle {
            color: @ui-subtitle-color;
            font-size: @ui-subtitle-font-size;
            margin-top: 5px;
            display: block;
        }
    }

    div.fm-ui-popup {
        z-index: 12;

        &.fm-layout-mobile {
            padding: 20px;

            .fm-popup-subtitle {
                display: none;
            }

            .fm-ui-btns-row {
                right: 20px;
            }
        }

        &.fm-layout-mobile-small {
            .fm-popup-header {
                margin-bottom: 10px;
                
                .fm-ui-col {
                    width: 100%;
                    margin-bottom: 10px;
                }

                .fm-ui-btns-row {
                    position: relative;
                    right: initial;
                    right: auto;
                    text-align: left;

                    .fm-ui-btn {
                        width: ~"calc(50% - 5px)";
                        width: ~"-webkit-calc(50% - 5px)";
                        margin-right: 10px;

                        &:last-child {
                            margin-right: 0;
                        }
                    }
                }

                .fm-popup-title {
                    font-size: @ui-title-font-size-smaller;
                    line-height: 1;
                }
            }
        }
    }
}

// datepicker
#fm-pivot-view {
    div.fm-ui-datepicker {
        .fm-ui-dp-header {
            text-align: center;
            padding: 10px;
            font-weight: bold;
            border-bottom: @ui-border-light;
            position: relative;

            .fm-ui-dp-month {
                margin-right: 5px;
            }

            .fm-ui-dp-year, .fm-ui-dp-month {
                cursor: pointer;
                text-decoration: underline;
                &:hover {
                    text-decoration: none;
                }
                &.fm-disabled {
                    cursor: auto;
                    text-decoration: none;
                }
            }

            .fm-ui-btn {
                padding: 0;
                border: none;
                min-width: auto;
                position: absolute;
                background: none;
                width: 37px;
                height: 37px;
                top: 0;

                &:before {
                    .fm-ui-icon;
                    .rotate(90);
                    font-size: 24px;
                    top: 6px;
                    left: 6px;
                }
                &.fm-prev-btn {
                    left: 0;
                    &:before {
                        content: "\e908";
                    }
                }
                &.fm-next-btn {
                    right: 0;
                    &:before {
                        content: "\e909";
                    }
                }
            }
        }
        .fm-ui-dp-week {
            padding: 10px;
            border-bottom: @ui-border-light;
            background-color: @ui-background-superlight;
            
            .fm-ui-dp-day-title {
                text-align: center;
                color: @ui-label-color-light;
            }
        }
        .fm-ui-dp-dates {
            padding: 10px 10px;

            .fm-ui-dp-date-label {
                text-align: center;
                padding: 5px;
                cursor: pointer;
                position: relative;

                &:hover {
                    background-color: @ui-background-light;
                }
                &.fm-highlighted {
                    font-weight: bold;
                }
                &.fm-muted {
                    font-weight: normal;
                    color: @ui-label-color-light;
                }
                &.fm-selected {
                    font-weight: normal;
                    color: @background-base-color;
                    background-color: @ui-background-dark;
                    border: 1px solid @ui-background-dark;
                }
            }
        }
        .fm-ui-dp-col-7 {
            width: 14.285%;
            display: inline-block;
        }
        .fm-ui-dp-col-5 {
            width: 20%;
            display: inline-block;
        }
        .fm-ui-dp-col-3 {
            width: 33.333%;
            display: inline-block;
        }
        .fm-ui-dp-footer {
            display: none;
            text-align: center;
            margin-bottom: 5px;

            .fm-cancel-btn {
                display: inline-block;
                padding: 10px;
                color: @ui-label-color-light;
            }
        }

        .fm-ui-dp-time {
            padding: 10px;
            border-top: @ui-border-light;
            text-align: center;

            .fm-ui-label {
                margin-right: 5px;
            }

            input.fm-ui-dp-time-input {
                padding: 2px 1px 2px 4px;
                border: @ui-border-light;
                color: @ui-element-text-color;
                font-size: @ui-element-font-size;
                text-align: center;
            }
        }

        &.fm-ui-dp-view-months {
            .fm-ui-dp-header {
                .fm-ui-btn {
                    display: none;
                }
            }
            .fm-ui-dp-week {
                display: none;
            }
            .fm-ui-dp-dates {
                padding-bottom: 0;
            }
            .fm-ui-dp-footer {
                display: block;
            }
        }

        &.fm-ui-dp-view-years {
            .fm-ui-dp-header {
                .fm-ui-dp-month {
                    display: none;
                }
            }
            .fm-ui-dp-week {
                display: none;
            }
            .fm-ui-dp-dates {
                padding-bottom: 0;
            }
            .fm-ui-dp-footer {
                display: block;
            }
        }
    }

    div.fm-ui-datepicker-input {
        position: relative;

        &.fm-opened {
            .fm-ui-datepicker-dropdown {
                display: block;
            }
        }

        .fm-ui-datepicker-dropdown {
            .fm-ui-arrow-up;
            .fm-shadow;
            display: none;
            background-color: @background-base-color;
            border: @ui-border-light;
            position: absolute;
            width: 300px;
            right: 0;
            top: 100%;
            margin-top: 5px;
            z-index: 1;

            &:after, &:before {
                left: auto;
            }
            &:after {
                right: 8px;
            }
            &:before {
                right: 6px;
            }
        }

        .fm-ui-datepicker-icon {
            right: 0;
            font-size: 20px;
            color: @theme-color;
            cursor: pointer;
            width: 35px;
            height: 100%;
            position: absolute;

            
            &:after {
                .fm-ui-icon-c;
                content: "\e900";
            }

        }
    }
}

#fm-toolbar-wrapper,
#fm-pivot-view {
    .fm-ui {
        .fm-ui-row {
            font-size: 0;
        }

        .fm-ui-col,
        .fm-ui-col-2,
        .fm-ui-col-3,
        .fm-ui-col-9 {
            display: inline-block;
            vertical-align: top;
            min-height: 1px;
        }

        .fm-ui-col-2 {
            width: 50%;
        }

        .fm-ui-col-3 {
            margin-right: 30px;
            width: ~"-webkit-calc(33.33% - 20px)";
            width: ~"calc(33.33% - 20px)";
            
            &:nth-child(3n+3) {
                margin-right: 0;
            }
        }

        .fm-ui-col-9 {
            margin-right: 1px;
            margin-bottom: 1px;
            width: ~"-webkit-calc(11.11% - 0.9px)";
            width: ~"calc(11.11% - 0.9px)";
            
            &:nth-child(9n+9) {
                margin-right: 0;
            }
        }

        .fm-vam {
            vertical-align: middle;
        }

        .fm-vat {
            vertical-align: top;
        }

        .fm-tar {
            text-align: right;
        }

        .fm-tal {
            text-align: left;
        }

        .fm-tac {
            text-align: center;
        }

        .fm-mb30 {
            margin-bottom: 30px;
        }
    }
}

#fm-pivot-view {
    .fm-helper {
        .fm-shadow;
        display: inline-block;
        background: @ui-draggable-item-backgound-color;
        opacity: 0.9;
        padding: 10px 9px;
        font-family: @font-family;
        font-size: @ui-label-font-size;
        font-weight: bold;
        border: @ui-border-light;
        pointer-events: none;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
        max-width: 250px;
        color: @ui-draggable-item-text-color;

        .fm-label {
            width: ~"calc(100% - 20px)";
            display: inline-block;
            text-overflow: ellipsis;
            overflow: hidden;
        }
        
        .fm-drag-icon {
            float: right;
            position: relative;
        }

        &.fm-no-drop {
            .fm-drag-icon:after {
                .fm-ui-icon;
                content: "\ea0e";
                color: @theme-color-danger;
                right: 0;
            }  
        }

        &.fm-drag-remove {
            .fm-drag-icon::after {
                .fm-ui-icon;
                content: "\e90e";
                color: @theme-color-danger;
                right: -4px;
                top: -4px;
                font-size: 21px;
            }  
        }
    }
    
    @media (max-width: 1370px) and (pointer: coarse) {
        .fm-helper {
            .fm-shadow;
            display: inline-block;
            background: @ui-draggable-item-backgound-color;
            opacity: 0.9;
            padding: 10px 9px;
            font-family: @font-family;
            font-size: @ui-label-font-size;
            font-weight: bold;
            border: @ui-border-light;
            pointer-events: none;
            white-space: nowrap;
            text-overflow: ellipsis;
            overflow: hidden;
            max-width: 250px;
            color: @ui-draggable-item-text-color;
    
            .fm-label {
                width: ~"calc(100% - 20px)";
                display: inline-block;
                text-overflow: ellipsis;
                overflow: hidden;
            }
            
            .fm-drag-icon {
                float: right;
                position: relative;
            }
    
            &.fm-no-drop {
                .fm-drag-icon:after {
                    .fm-ui-icon;
                    content: "\ea0e";
                    color: @theme-color-danger;
                    right: 0;
                }  
            }
    
            &.fm-drag-remove {
                border-color: red;
                border-width: 2px;
                display: flex;

                .fm-label {
                    display: flex;
                    padding-left: 10px;
                }

                .fm-drag-icon::after {
                    .fm-ui-icon;
                    content: "\e90e";
                    color: @theme-color-danger;
                    left: -8px;
                    top: -5px;
                    font-size: 21px;
                }  
            }
        } 
    }

    .fm-header-helper {
        text-transform: uppercase;
        border: none;
        background: @ui-draggable-item-backgound-color;
        padding: 8px 6px;
        font-size: @font-size;
        border: @ui-border;
        cursor: move;

        &.fm-drag-remove {
            border-color: red;
            border-width: 2px;

            .fm-remove-icon {
                display: inline-block;
                margin-left: 4px;
                width: 10px;
                position: relative;

                &:after {
                    .fm-ui-icon;
                    content: "\e90e";
                    color: @theme-color-danger;
                    top: -16px;
                    left: -7px;
                    font-size: 21px;
                }
            }
        }
    }

    @media (max-width: 1370px) and (pointer: coarse) {
        .fm-header-helper {
            text-transform: uppercase;
            border: none;
            background: @ui-draggable-item-backgound-color;
            padding: 12px 18px;
            font-size: @font-size * 1.2;
            border: @ui-border;
            cursor: move;
    
            &.fm-drag-remove {
                border-color: red;
                border-width: 2px;

                .fm-remove-icon {
                    display: inline-block;
                    margin-left: 4px;
                    width: 10px;
                    position: relative;

                    &:after {
                        .fm-ui-icon;
                        content: "\e90e";
                        color: @theme-color-danger;
                        top: -23px;
                        left: -15px;
                        font-size: 21px * 1.5;
                    }
                }
            }
        }
    }

    .fm-drop-indicator {
        height: 2px;
        background: @ui-background-dark;
    }
}

#fm-pivot-view div.fm-ui-panel {
    position: relative;
    background: @background-base-color;
    border: @ui-border;
}

#fm-pivot-view div.fm-ui-modal-overlay {
    background-color: white;
    opacity: 0.8;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 11;
    width: 100%;
    height: 100%;
    
    &.fm-ui-opaque {
        opacity: 1;
    }

    &.fm-ui-transparent {
        opacity: 0;
    }

}

#fm-pivot-view div.fm-ui-toolbar {
    background: @background-base-color;
    border-top: 1px dotted #dcdcdc;
    border-left: none;
    border-right: none;
    border-bottom: none;
    margin-bottom: 0px;
}

#fm-pivot-view div.fm-ui-hgroup {
    overflow: hidden;
}

    #fm-pivot-view div.fm-ui-hgroup > * {
        float: left;
    }

#fm-pivot-view div.fm-ui-vgroup > * {
    display: block;
}

#fm-pivot-view ul.fm-ui-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

#fm-pivot-view {
    .fm-ui-context-submenu {
        position: absolute;
    }
}

#fm-pivot-view .fm-ui-disabled,
#fm-toolbar-wrapper .fm-ui-disabled {
    pointer-events: none !important;
    cursor: default !important;
    opacity: 0.5 !important;
}

// virtual list
#fm-pivot-view {
    div.fm-ui-vlist {
        position: relative;
        overflow-x: hidden;
        overflow-y: auto;

        ul.fm-ui-list {
            position: absolute;
            overflow: hidden;
            width: 100%;
            top: 0;
            background: @background-ui-element-base-color;
        }

        div.fm-ui-vlist-placeholder {
            width: 100%;
        }
    }
}

#fm-pivot-view div.fm-ui-divider {
    background-color: @ui-background-light;
    position: absolute;
    z-index: 1;

    &:hover {
        background-color: darken(@ui-background-light, 2%);
    }

    &:before {
        .fm-ui-icon-c;
        content: "\e907";
        font-size: 13px;
        color: @ui-border-color;
    }

    &.fm-ui-horizontal {
        left: 0;
        right: 0;
        height: 9px;
        
        &:hover {
            cursor: row-resize;
        }

        &:before {
            top: 4px;
        }
    }
    
    &.fm-ui-vertical {
        top: 0;
        bottom: 0;
        width: 9px;
        
        &:hover {
            cursor: col-resize;
        }

        &:before {
            left: -2px;
            .rotate(90);
        }
    }
}

#fm-pivot-view .fm-ui-toolbar-mobile {
    height: 48px;
    border-bottom: @ui-border;
}

    #fm-pivot-view .fm-ui-toolbar-mobile .fm-ui-header-display {
        pointer-events: none;
        position: absolute;
        top: 12px;
        font-size: 17px;
        font-weight: bold;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
        text-align: center;
        display: inline-block;
        width: 100%;
    }

@media only screen and (max-width:560px) {
    #fm-pivot-view .fm-ui-toolbar-mobile .fm-ui-header-display {
        font-size: 14px;
        top: 15px;
    }
}

#fm-pivot-view .fm-ui-right {
    position: absolute;
    right: 0;
    top: 0;
}

#fm-pivot-view .fm-ui-left {
    position: absolute;
    left: 0;
    top: 0;
}

#fm-pivot-view a.fm-ui-btn.fm-disabled {
    pointer-events: none;
    cursor: default;
    color: #aaa;
    opacity: 0.4;
}

#fm-pivot-view a.fm-ui-btn:hover.fm-disabled {
    background: @background-ui-element-base-color;
}

#fm-pivot-view a.fm-ui-btn:active.fm-disabled {
    background: @background-ui-element-base-color;
}

// Context Menu
#fm-pivot-view .fm-ui-context-menu {
    .fm-shadow;
    position: absolute;
    background-color: @background-ui-element-base-color;
    border: @ui-border;
    z-index: 20;

    .fm-ui-context-submenu {
        .fm-shadow;
        position: absolute;
        background-color: @background-ui-element-base-color;
        border: @ui-border;
        z-index: 21;
        
        .fm-ui-list {
            max-height: 300px;
            overflow-y: auto;
        }
    }

    .fm-ui-list {
        min-width: 200px;

        li {
            padding: 10px;
            border-bottom: @ui-element-inner-border;
            cursor: pointer;
            position: relative;

            &:last-child {
                border-bottom: none;
            }

            &.fm-ui-active,
            &:hover {
                background-color: @ui-background-light;
            }

            &.fm-has-submenu:after {
                .fm-ui-icon-vam;
                content: "\e911";
                right: 5px;
                font-size: 15px;
            }

            &.fm-selected {
                background: @ui-background-light;
                padding-right: 28px;
                
                &:before {
                    .fm-ui-icon;
                    content: '\e902';
                    right: 30px;
                    top: 6px;
                    color: @ui-border-color;
                    font-size: 26px;
                }
            }

        }
    }
}

/* ===== PIVOT UI END ===== */

/* Filter */

#fm-pivot-view .fm-filter-view {
    min-width: 320px;

    &.fm-ui-window {
        padding: 0;
    }

    .fm-filter-view-content {
        padding: 24px 30px 30px;
        width: 500px;
        min-width: 320px;
        max-width: 100%;
        height: 386px;
        min-height: 386px;

        &.fm-no-member-filters {
            height: unset;
            min-height: unset;
        }

        &.fm-query-filter-opened {
            height: 256px;
            min-height: 256px;
        }
    }

    .fm-popup-header {
        margin-bottom: 25px;

        .fm-ui-row {
            .fm-ui-btns-row {
                white-space: nowrap;
                position: absolute;
                right: 0;
            }
        }

        .fm-popup-title {
            text-overflow: ellipsis;
            overflow: hidden;
            white-space: nowrap;
        }
    }

    .fm-bold-btn {
        font-weight: bold;
        text-transform: uppercase;
    }

    .fm-filter-sort-row {
        display: flex;
        position: relative;
        margin-bottom: 20px;

        .fm-sort-col {
            position: absolute;
            right: 0;
            top: 0;
            
            a.fm-ui-toggle-btn.fm-sort-btn,
            button.fm-ui-toggle-btn.fm-sort-btn {
                width: 60px;
                .fm-bold-btn;
            }
        
            .fm-sort-label {
                margin-right: 10px;
                display: none;
            }
        
            .fm-sort-btns {
                display: inline-block;

                .fm-sort-btn:first-child {
                    border-right: none;
                    border-top-right-radius: 0;
                    border-bottom-right-radius: 0;
                }
                .fm-sort-btn:last-child {
                    border-top-left-radius: 0;
                    border-bottom-left-radius: 0;
                }
            }
        }
        .fm-filters-col {
            .fm-filter-label {
                width: 55px;
                display: inline-block;
                margin-right: 5px;
                margin-bottom: 5px;
                vertical-align: middle;
                line-height: 1;
                overflow: hidden;
            }
            a.fm-ui-toggle-btn,
            button.fm-ui-toggle-btn {
                color: @ui-btn-toggle-selected-text-color;
            }
        }
    }

    .fm-sort-only {
        .fm-filter-sort-row {
            .fm-sort-col {
                position: relative;
                display: block;
                
                .fm-sort-label {
                    display: inline-block;
                }
            }
        }
    }

    .fm-filter-btn {
        .fm-bold-btn;
        position: relative;
        min-width: 90px;
        max-width: 130px;
        padding-left: 10px;
        padding-right: 10px;
        height: 38px;

        &.fm-has-filter {
            padding-right: 20px;
            &:after {
                .fm-ui-icon-vam;
                right: 5px;
                content: "\e905";
                font-size: 18px;
            }
        }

        &.fm-labels-filter-btn {
            margin-right: 20px;
        }

        .fm-ui-arrow-up {
            display: none;
            position: relative;
            top: 22px;
            z-index: 1;

            &:after {
                border-bottom-color: @ui-background-superlight;
                top: -7px;
            }

            &:before {
                top: -8px;
            }
        }

        &.fm-selected {
            .fm-ui-arrow-up {
                display: block;
            }
        }

        .fm-ui-label {
            display: inline-block;
            text-align: center;
            white-space: nowrap;
            width: 100%;
            max-width: 100%;
            overflow: hidden;
            vertical-align: middle;
            margin-bottom: 2px;
            line-height: 36px;
        }
    }

    .fm-filters-table {
        border: @ui-element-border;
        margin-bottom: 30px;
        margin-top: 10px;
        height: ~"calc(100% - 108px)";
        height: ~"-webkit-calc(100% - 108px)";

        .fm-ui-checkbox.fm-selected {
            font-weight: bold;
        }

        .fm-filters-table-content {
            position: relative;
            height: ~"calc(100% - 37px)";
            height: ~"-webkit-calc(100% - 37px)";

            .fm-members-filter-list {
                overflow-y: auto;
                height: 100%;

                li {
                    border-bottom: @ui-element-inner-border;
                    padding: 10px 9px;
                    cursor: pointer;
                    white-space: nowrap;
                    text-overflow: ellipsis;
                    overflow: hidden;
                    height: 37px;

                    .fm-expand-toggle-btn {
                        color: @ui-border-color;
                        display: inline-block;
                        font-size: @ui-btn-font-size;
                        position: relative;
                        height: 100%;
                        width: 30px;
                    }

                    .fm-expand-toggle-btn:before {
                        .fm-ui-icon;
                        content: "\e911";
                        top: -7px;
                        text-align: center;
                        width: 30px;
                        padding: 8px 0;
                    }

                    .fm-expand-toggle-btn.fm-selected:before {
                        content: "\e90f";
                    }

                    .fm-ungroup-btn {
                        position: absolute;
                        right: 10px;
                    }

                    .fm-ui-checkbox {
                        vertical-align: top;
                        margin-top: -1px;
                    }
                }

                &.fm-tree-list:not(.fm-is-searched) {
                    li {
                        padding-left: 0;
                    }
                }
            }
        }

        
        .fm-search-highlight {
            background-color: @grid-table-header-filter-column-search-highlight;
            font-weight: inherit;
        }

        .fm-filters-table-header {
            border-bottom: @ui-element-border;
            background: @ui-background-light;
            position: relative;
            height: 37px;

            .fm-select-all-wrapper {
                width: 50%;
                padding: 9px;

                .fm-select-all-label {
                    width: 100%;
                    text-overflow: ellipsis;
                    overflow: hidden;
                    white-space: nowrap;
                    height: 18px;
                }
            }

            .fm-select-counter-wrap {
                width: ~"calc(50% - 100px)";
                width: ~"-webkit-calc(50% - 100px)";
                padding-top: 12px;
                padding-right: 9px;
                
                .fm-select-counter {
                    width: 100%;
                    text-align: right;
                    color: @ui-label-color-light;
                    font-size: 12px;
                    text-overflow: ellipsis;
                    overflow: hidden;
                    white-space: nowrap;
                }
            }

            .fm-search-wrap {
                position: absolute;
                top: 0;
                right: 0;
                width: 100px;
                height: 100%;
                border-left: @ui-element-border;

                .fm-search-inp {
                    position: absolute;
                    right: 0;
                    width: 100%;
                    height: 36px;
                    padding-left: 39px;
                    padding-right: 39px;
                    color: @ui-element-text-color;
                    font-size: @ui-element-font-size;
                    background: @background-ui-element-base-color;
                    opacity: 0;
                    border: none;
                    visibility: hidden;
                    border-left: @ui-element-border;
                }

                .fm-close-search {
                    opacity: 0;
                    visibility: hidden;
                    position: absolute;
                    right: 0;
                    top: 0;
                    height: 100%;
                    width: 36px;
                    min-width: 36px;
                    border: none;
                    background: transparent;
                    cursor: pointer;
                    color: @ui-icon-color;
                    outline-offset: -2px;

                    &:before {
                        .fm-ui-icon;
                        content: "\e903";
                        font-size: 26px;
                        position: absolute;
                        top: 5px;
                        left: 6px;
                    }

                    &:hover {
                        color: @ui-icon-color-dark;
                    }
                }

                .fm-search-btn {
                    position: absolute;
                    height: 36px;
                    width: 100%;
                    font-size: 14px;
                    // text-align: center;
                    cursor: pointer;
                    border: none;
                    background: transparent;
                    color: @ui-label-color-light;
                    padding-top: 10px;
                    left: 10px;
                    right: 25px;

                    &:after {
                        .fm-ui-icon;
                        content: "\e90a";
                        font-size: 25px;
                        color: @ui-icon-color;
                        position: absolute;
                        top: 5px;
                        right: 14px;
                    }

                    &:hover {
                        color: @ui-label-color;

                        &:after {
                            color: @ui-label-color;
                        }
                    }
                }

                &.fm-search-opened {
                    width: 50%;
                    height: 100%;
                    border-left: none;

                    .fm-close-search,
                    .fm-search-inp {
                        visibility: visible;
                        opacity: 1;
                    }

                    .fm-select-counter {
                        display: none;
                    }

                    .fm-search-btn {
                        font-size: 0;
                        width: 40px;
                        pointer-events: none;
                        z-index: 1;

                        .fm-icon-act_search:before {
                            color: @ui-prompt-icon-color;
                        }
                    }
                }
            }
        }
    }

    .fm-filters-table:last-child {
        margin-bottom: 0;
    }

    .fm-filters-subview-wrap {
        .fm-filters-subview {
            background: @ui-background-superlight;
            border: @ui-border-superlight;
            position: relative;
            padding: 14px 13px;
            font-size: 0;
        }

        .fm-buttons-bar {
            text-align: right;
            margin-top: 10px;
            .fm-ui-link-btn {
                &.fm-muted {
                    color: @ui-label-color-light;
                }
            }
        }

        &.fm-values-filter-view {
            .fm-measures-dropdown, 
            .fm-conditions-dropdown,
            .fm-num-input-1 {
                width: ~"calc(33.33% - 6.66px)";
                width: ~"-webkit-calc(33.33% - 6.66px)";
            }
            .fm-measures-dropdown,
            .fm-conditions-dropdown {
                margin-right: 10px;
            }
            .fm-num-input-2 {
                display: none;
            }
            &.fm-range {
                .fm-measures-dropdown, 
                .fm-conditions-dropdown, 
                .fm-num-input-1,
                .fm-num-input-2 {
                    width: ~"calc(25% - 7.5px)";
                    width: ~"-webkit-calc(25% - 7.5px)";
                }
                .fm-num-input-1 {
                    margin-right: 10px;
                }
                .fm-num-input-2 {
                    display: inline-block;
                }
            }
        }

        &.fm-labels-filter-view { 
            .fm-conditions-dropdown, 
            .fm-txt-input-1 {
                width: ~"calc(50% - 5px)";
                width: ~"-webkit-calc(50% - 5px)";
            }
            .fm-conditions-dropdown {
                margin-right: 10px;
            }
            .fm-txt-input-2 {
                display: none;
            }
            &.fm-range {
                .fm-conditions-dropdown, 
                .fm-txt-input-1,
                .fm-txt-input-2 {
                    width: ~"calc(33.33% - 6.66px)";
                    width: ~"-webkit-calc(33.33% - 6.66px)";
                }
                .fm-txt-input-1 {
                    margin-right: 10px;
                }
                .fm-txt-input-2 {
                    display: inline-block;
                }
            }
        }

        &.fm-numbers-filter-view { 
            .fm-conditions-dropdown, 
            .fm-num-input-1 {
                width: ~"calc(50% - 5px)";
                width: ~"-webkit-calc(50% - 5px)";
            }
            .fm-conditions-dropdown {
                margin-right: 10px;
            }
            .fm-num-input-2 {
                display: none;
            }
            &.fm-range {
                .fm-conditions-dropdown, 
                .fm-num-input-1,
                .fm-num-input-2 {
                    width: ~"calc(33.33% - 6.66px)";
                    width: ~"-webkit-calc(33.33% - 6.66px)";
                }
                .fm-num-input-1 {
                    margin-right: 10px;
                }
                .fm-num-input-2 {
                    display: inline-block;
                }
            }
        }

        &.fm-time-filter-view {
            .fm-conditions-dropdown, 
            .fm-num-input-1 {
                width: ~"calc(50% - 45px)";
                width: ~"-webkit-calc(50% - 45px)";
                margin-right: 10px;
            }
            .fm-interval-dropdown {
                width: 70px;
            }
            .fm-num-input-2 {
                display: none;
                margin-right: 10px;
            }
            &.fm-range {
                .fm-num-input-1,
                .fm-num-input-2 {
                    width: ~"calc(20% - 7px)";
                    width: ~"-webkit-calc(20% - 7px)";
                }
                .fm-num-input-2 {
                    display: inline-block;
                }
            }
        }
    
        &.fm-dates-filter-view {
            .fm-conditions-dropdown, 
            .fm-datepicker-1,
            .fm-periods-dropdown {
                width: ~"calc(50% - 5px)";
                width: ~"-webkit-calc(50% - 5px)";
            }
            .fm-conditions-dropdown {
                margin-right: 10px;
            }
            .fm-datepicker-1 {
                display: inline-block;
            }
            .fm-datepicker-2,
            .fm-periods-dropdown {
                display: none;
            }
    
            &.fm-date-range {
                .fm-conditions-dropdown, 
                .fm-datepicker-1,
                .fm-datepicker-2 {
                    width: ~"calc(33.33% - 6.66px)";
                    width: ~"-webkit-calc(33.33% - 6.66px)";
                }
                .fm-datepicker-1 {
                    margin-right: 10px;
                }
                .fm-datepicker-2 {
                    display: inline-block;
                }
                .fm-ui-datepicker-input.fm-with-time .fm-ui-datepicker-icon {
                    display: none;
                }
            }
    
            &.fm-date-period {
                .fm-datepicker-1,
                .fm-datepicker-2 {
                    display: none;
                }
                .fm-periods-dropdown {
                    display: inline-block;
                }
            }
        }
    }

    .fm-add-group-view {
        margin-bottom: 20px;

        .fm-filters-subview {
            &:before {
                right: 150px;
            }
            &:after {
                right: 151px;
            }
        }
    }

    .fm-filter-flat-layout {
        .fm-values-filter-view {
            .fm-measures-dropdown {
                display: none;
            }
            .fm-conditions-dropdown,
            .fm-num-input-1 {
                width: ~"calc(50% - 5px)";
                width: ~"-webkit-calc(50% - 5px)";
            }
            .fm-num-input-1 {
                margin-right: 0;
            }
            &.fm-range {
                .fm-measures-dropdown, 
                .fm-conditions-dropdown, 
                .fm-num-input-1,
                .fm-num-input-2 {
                    width: ~"calc(33.33% - 6.66px)";
                    width: ~"-webkit-calc(33.33% - 6.66px)";
                }
            }
        }
    }

    .fm-filter-pages-layout {
        .fm-filters-col {
            width: 100%;
        }
        .fm-labels-filter-btn {
            margin-right: 0;
        }
    }

    .fm-filter-pages-layout,
    .fm-filter-flat-layout {
        &.fm-no-query-filters {
            .fm-filters-table {
                height: ~"calc(100% - 60px)";
                height: ~"-webkit-calc(100% - 60px)";
            }
            .fm-filter-sort-row {
                margin-bottom: 0;
            }
        }
    }
    /* layouts */
    &.fm-layout-mobile-small {
        .fm-filter-view-content {
            padding: 20px;

            &.fm-query-filter-opened {
                height: 384px;
                min-height: 384px;
                
                &.fm-filter-pages-layout,
                &.fm-filter-flat-layout {
                    height: 288px;
                    min-height: 288px;
                }
            }
        }
        .fm-popup-header {
            .fm-ui-col, .fm-ui-col-2 {
                width: 100%;
            }
              
            .fm-ui-col-2 {
                margin-bottom: 10px;
            }

            .fm-ui-btns-row {
                position: relative;
            }

            .fm-popup-title {
                line-height: 1.1;
            }
        }

        .fm-filter-sort-row {
            flex-direction: column;

            .fm-sort-col {
                order: 1;
                position: relative;
                margin-bottom: 10px;
                .fm-sort-btns {
                    display: block;
                    a.fm-ui-toggle-btn.fm-sort-btn,
                    button.fm-ui-toggle-btn.fm-sort-btn {
                        width: 50%;
                    }
                }
                .fm-sort-label {
                    display: none;
                }
            }
            .fm-filters-col {
                order: 2;

                .fm-filter-label {
                    display: none;
                }
                .fm-filter-btn {
                    width: ~"calc(50% - 5px)";
                    width: ~"-webkit-calc(50% - 5px)";
                    max-width: 50%;
                    max-width: 50%;

                    &.fm-labels-filter-btn {
                        margin-right: 10px;
                    }
                }
            }
        }

        .fm-filters-subview-wrap {
            &.fm-values-filter-view {
                .fm-measures-dropdown, 
                .fm-conditions-dropdown {
                    width: ~"calc(50% - 5px)";
                    width: ~"-webkit-calc(50% - 5px)";
                    margin-right: 0;
                    margin-bottom: 10px;
                }
                .fm-num-input-1 {
                    width: 100%;
                }
                .fm-measures-dropdown {
                    margin-right: 10px;
                }
                &.fm-range {
                    .fm-num-input-1,
                    .fm-num-input-2 {
                        width: ~"calc(50% - 5px)";
                        width: ~"-webkit-calc(50% - 5px)";
                    }
                    .fm-num-input-1 {
                        margin-right: 10px;
                    }
                }
            }
            &.fm-dates-filter-view {
                &.fm-date-range {
                    .fm-conditions-dropdown {
                        width: 100%;
                        margin-bottom: 10px;
                    }
                    .fm-datepicker-1,
                    .fm-datepicker-2 {
                        width: ~"calc(50% - 5px)";
                        width: ~"-webkit-calc(50% - 5px)";
                    }
                    .fm-ui-datepicker-input.fm-with-time .fm-ui-datepicker-icon {
                        display: none;
                    }
                }
            }
            &.fm-labels-filter-view { 
                &.fm-range {
                    .fm-conditions-dropdown {
                        width: 100%;
                        margin-bottom: 10px;
                    }
                    .fm-txt-input-1,
                    .fm-txt-input-2 {
                        width: ~"calc(50% - 5px)";
                        width: ~"-webkit-calc(50% - 5px)";
                    }
                }
            }
    
            &.fm-numbers-filter-view {
                &.fm-range {
                    .fm-conditions-dropdown {
                        width: 100%;
                        margin-bottom: 10px;
                    }
                    .fm-num-input-1,
                    .fm-num-input-2 {
                        width: ~"calc(50% - 5px)";
                        width: ~"-webkit-calc(50% - 5px)";
                    }
                }
            }
    
            &.fm-time-filter-view {
                &.fm-range {
                    .fm-conditions-dropdown {
                        width: 100%;
                        margin-bottom: 10px;
                    }
                    .fm-num-input-1,
                    .fm-num-input-2 {
                        width: ~"calc(50% - 45px)";
                        width: ~"-webkit-calc(50% - 45px)";
                    }
                }
            }
        } 

        .fm-filters-table {
            height: ~"calc(100% - 202px)";
            height: ~"-webkit-calc(100% - 202px)";

            .fm-filters-table-header {
                .fm-select-all-wrapper {
                    width: ~"calc(100% - 100px)";
                    width: ~"-webkit-calc(100% - 100px)";
                }
                .fm-select-counter-wrap {
                    display: none;
                }
            }
        }

        .fm-no-query-filters {
            .fm-sort-col {
                margin-bottom: 0;
            }
            .fm-filters-table {
                height: ~"calc(100% - 154px)";
                height: ~"-webkit-calc(100% - 154px)";
            }
        }

        .fm-filter-pages-layout,
        .fm-filter-flat-layout {
            .fm-filters-table {
                height: ~"calc(100% - 154px)";
                height: ~"-webkit-calc(100% - 154px)";
            }
            &.fm-no-query-filters {
                .fm-filters-table {
                    margin-top: 0;
                    height: ~"calc(100% - 96px)";
                    height: ~"-webkit-calc(100% - 96px)";
                }
                
            }
        }
    }
}

/* Pivot view */

#fm-pivot-view {
    min-width: 300px;
    min-height: 200px;
    position: relative;
    background: @background-base-color;
    border: @ui-component-border;
    outline: none;
    box-sizing: border-box;
}

#fm-pivot-view .fm-branding-bar {
    background-color: @background-base-color;
    border-top: @ui-component-border;
    width: 100%;
    height: 21px;
    position: absolute;
    bottom: 0px;
    z-index: 2;

    > span {
        line-height: 21px;
        color: @ui-label-color-light;
    
        a {
            color: lighten(#df3800, 30%);
        }
    }

    .fm-version-label {
        float: left;
        margin-left: 5px;
    }

    .fm-link {
        float: right;
        margin-right: 5px;
        vertical-align: top;
    }

    .fm-info-icon {
        display: inline-block;
        height: 13px;
        width: 13px;
        margin-left: 5px;
        margin-right: 2px;
        color: @ui-border-color-light;
        font-size: 16px;
        cursor: pointer;
    
        &:before {
            .fm-ui-icon;
            content: "\ea0c";
        }
    }

    &.fm-layout-660 {
        span, span a {
            font-size: 11px;
        }
    }

    &.fm-layout-520 {
        .fm-version-label {
            display: none;
        }
    }
}

@media all and (max-width:600px) {
    #fm-pivot-view {
        min-width: initial;
        min-width: auto;
        min-height: initial;
        min-height: auto;
    }
}

#fm-pivot-view .fm-grid-view {
    background-color: @background-base-color;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#fm-pivot-view .fm-grid-column {
    width: 100px;
}

#fm-pivot-view .fm-grid-row {
    height: 30px;
}

#fm-pivot-view .fm-grid-column-mobile {
    width: 100px;
}

#fm-pivot-view .fm-grid-row-mobile {
    height: 30px;
}

#fm-pivot-view {
    span.fm-ui-label.fm-pivot-title {
        text-align: center;
        font-weight: bold;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding: 4px 10px 5px;
    }
}


/* Charts */
#fm-pivot-view .fm-charts-view {
    background-color: @background-base-color;

    span.fm-ui-label.fm-charts-msg {
        position: absolute;
        display: block;
        text-align: center;
        top: 50%;
        width: 100%;
    }

    .fm-header-toolbar {
        background-color: @ui-background-superlight;
        border-bottom: @ui-border-light;
        padding: 20px 20px;

        &.fm-fields-list-padding {
            padding-right: 60px;
        }

        .fm-ui-col-2 {
            white-space: nowrap;

            &.fm-wide {
                width: ~"calc(100% - 50px)";
            }
        }

        .fm-ui-dropdown {
            margin-right: 10px;
            max-width: 200px;
        }

        .fm-charts-filters-container {
            text-align: right;
            white-space: nowrap;

            .fm-ui-btn {
                border-radius: 0;
                margin-right: 10px;
                height: 38px;
                padding-right: 35px;
                text-align: left;

                &:last-child {
                    margin-right: 0;
                }

                &:after {
                    .fm-ui-icon-vam;
                    content: "\e90c";
                    right: 10px;
                    font-size: 18px;
                    letter-spacing: -2px;
                    color: @ui-icon-color;
                }

                &:hover:after {
                    color: @ui-icon-color-dark;
                }

                &.fm-filtered:after {
                    content: "\e905\e90c";
                }

                &.fm-filtered {
                    padding-right: 48px;
                }
            }
        }

        .fm-charts-filters-btn {
            width: 50px;
            margin: 0;

            .fm-ui-dropdown-btn {

                &:before {
                    .fm-ui-icon-vam;
                    content: "\e905";
                    color: @ui-icon-color;
                    font-size: 24px;
                    left: 5px;
                }

                &:after {
                    right: 4px;
                }

                .fm-ui-label {
                    font-size: 0;
                }
            }

            .fm-ui-dropdown-list {
                min-width: 150px;
                max-width: 200px;
                width: auto;
                width: initial;
                left: auto;
                left: initial;
                right: 0;

                .fm-ui-list {
                    width: 100% !important;

                    li {
                        padding-right: 25px;
                        position: relative;

                        &:after {
                            .fm-ui-icon-vam;
                            content: '\e90c';
                            color: @ui-icon-color;
                            right: 4px;
                            font-size: 24px;
                        }


                        &.fm-filtered {
                            padding-right: 55px;

                            &::after {
                                content: "\e905\e90c";
                            }
                        }
                    }
                }

                &:before,
                &:after {
                    left: auto;
                    left: initial;
                }

                &:before {
                    right: 12px;
                }

                &:after {
                    right: 14px;
                }
            }
        }
    }

    .fm-chart {
        padding: 10px;
    }

    .fm-chart-legend {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;

        .fm-chart-legend-container {
            background-color: @ui-background-superlight;
            border-top: @ui-border-light;
            padding: 10px 20px;
            overflow: auto;
        }

        .fm-chart-legend-btn {
            border-left: none;
            border-bottom: none;
            border-color: @ui-border-color-superlight;
            background-color: @ui-background-superlight;
            min-width: auto;
            min-width: initial;
            width: 25px;
            height: 25px;
            position: absolute;
            top: -25px;
            padding: 0;

            &:after {
                .fm-ui-icon;
                font-size: 20px;
                padding: 2px;
                color: @ui-border-color;
                position: static;
            }

            &.fm-hide:after {
                content: "\e908";
            }

            &.fm-show:after {
                content: "\e909";
            }
        }

        table {
            border-collapse: separate;
            margin: 0px;
            width: auto;
            width: initial;

            td {
                padding-right: 10px;
                vertical-align: top;
            }
        }

        ul {
            list-style-type: none;
            position: relative;
            vertical-align: bottom;
            font-size: @ui-label-font-size;
            display: inline-table;

            li {
                padding: 2px 0;
                white-space: nowrap;

                &.fm-collapsed, &.fm-expanded {
                    cursor: pointer;
                }

                .generate-levels(10);

                .generate-levels(@n, @i: 1) when (@i =< @n) {
                    &.fm-level-@{i} {
                        padding-left: @i * 18px;
                    }

                    .generate-levels(@n, (@i + 1));
                }

                .fm-icon-display {
                    display: inline-block;
                    width: 14px;
                    height: 14px;
                    margin-right: 4px;
                    border-radius: 50%;
                    position: relative;
                }

                .fm-text-display {
                    display: inline-block;
                    white-space: nowrap;
                    font-size: @ui-label-font-size;
                    color: @ui-label-color-light;
                    vertical-align: bottom;
                    margin-bottom: 1px;
                }

                &.fm-collapsed .fm-icon-display:before {
                    content: '';
                    position: absolute;
                    width: 8px;
                    height: 2px;
                    background: #fff;
                    top: 6px;
                    right: 3px;
                }

                &.fm-collapsed .fm-icon-display:after {
                    content: '';
                    position: absolute;
                    width: 2px;
                    height: 8px;
                    background: #fff;
                    top: 3px;
                    right: 6px;
                }

                &.fm-expanded {
                    .fm-icon-display:before {
                        content: '';
                        position: absolute;
                        width: 8px;
                        height: 2px;
                        background: @ui-border-color;
                        top: 6px;
                        right: 3px;
                    }
                }
            }
        }
    }
}
#fm-pivot-view .fm-axis text {
    font-size: @charts-axis-font-size;
    text-rendering: geometricPrecision;
    fill: @charts-axis-text-color;
}

#fm-pivot-view .fm-axis path,
#fm-pivot-view .fm-axis line {
    fill: none;
    stroke: @charts-axis-stroke-color;
    shape-rendering: crispEdges;
}

#fm-pivot-view .fm-axis line {
    shape-rendering: geometricPrecision;
}

#fm-pivot-view .fm-x .tick line {
    display: none;
}

#fm-pivot-view .fm-x.fm-axis.fm-title {
    font-size: @charts-axis-font-size;
    font-weight: bold;
    fill: @charts-axis-title-color;
}

#fm-pivot-view .fm-line {
    fill: none;
    stroke-width: 1px;
}

#fm-pivot-view .fm-circle {
    fill: @charts-point-fill-color;
    stroke-width: 1px;
}

#fm-pivot-view .fm-scatter-point {
    fill: @charts-point-fill-color;
    stroke-width: 1px;
}

#fm-pivot-view .fm-arc path {
    stroke: #fff;
    stroke-width: 0.5px;
}

#fm-pivot-view .fm-bar {
    shape-rendering: crispEdges;
}

#fm-pivot-view .fm-bar-stack {
    shape-rendering: crispEdges;
}

    #fm-pivot-view .fm-bar-stack path {
        stroke: #fff;
        stroke-width: 0.5px;
    }

#fm-pivot-view .fm-pie-label {
    font-size: @charts-label-font-size;
    fill: @charts-pie-label-color;
}

#fm-pivot-view .fm-chart svg {
    .fm-label {
        white-space: pre;
    }
}

#fm-pivot-view .fm-data-label {
    font-size: @font-size;
    fill: @charts-pie-label-color;
}

.fm-charts-color-1 {
    fill: #EE232C;
}

.fm-charts-color-2 {
    fill: #478EC8;
}

.fm-charts-color-3 {
    fill: #FF8F00;
}

.fm-charts-color-4 {
    fill: #4DBF5A;
}

.fm-charts-color-5 {
    fill: #e042a6;
}

.fm-charts-color-6 {
    fill: #59BBAB;
}

.fm-charts-color-7 {
    fill: #b96bdd;
}

.fm-charts-color-8 {
    fill: #EDC200;
}

.fm-charts-color-9 {
    fill: #24c0de;
}

.fm-charts-color-10 {
    fill: none;
}

/* Fields */
#fm-pivot-view .fm-fields-view-wrap {
    position: absolute;
    z-index: 11;
    right: 0;
    top: 0;

    &.fm-fields-opened {
        position: relative;
        z-index: 12;

        .fm-btn-open-fields {
            display: none;
        }
    }
    &.fm-fields-instant {
        &.fm-fields-opened {
            position: absolute;
            z-index: 11;
        }
    }

    button.fm-btn-open-fields {
        font-size: 0;
        border: none;
        background-color: @background-ui-element-base-color;
        min-width: auto;
        min-width: initial;
        padding: 6px;
        width: 44px;
        height: 44px;
        border-left: @ui-component-border;
        border-bottom: @ui-component-border;
        border-radius: 0;
        -webkit-box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);

        &:hover {
            background-color: @ui-background-light;
        }

        &:before {
            .fm-ui-icon;
            padding-left: 1px;
            content: "\e94c";
            font-size: 30px;
            color: @ui-icon-color;
            position: static;
        }
    }
}

#fm-pivot-view .fm-fields-view {
    &.fm-pivot-fields {
        width: 780px;
        min-width: 450px;
        height: 455px;
        min-height: 455px;
    }

    .fm-btn-add-measure-2 {
        position: absolute;
        top: 0;
        right: 0;
        font-size: 0;
        border: none;
        background-color: transparent;
        min-width: auto;
        min-width: initial;
        padding: 2px;
        width: 26px;
        height: 100%;
        border-left: @ui-element-border;
        border-radius: 0;
        
        &:before {
            .fm-ui-icon-c;
            color: @ui-icon-color;
            font-size: 24px;
        }

        &:hover:before {
            color: @ui-icon-color-dark;
        }
    }

    .fm-popup-header {
        display: flex;
        .fm-ui-col:first-child {
            min-width: 100px;

            span.fm-ui-label {
                white-space: nowrap;
                text-overflow: ellipsis;
                overflow: hidden;
            }
        }

        .fm-ui-col:nth-child(1) {
            flex: 1;

            .fm-popup-subtitle {
                width: fit-content;
            }
        }

        .fm-ui-col:nth-child(2) {
            min-width: fit-content;
            position: relative;
            right: 0px;
            margin-left: 30px;
        }

        .fm-btn-add-measure {
            padding-right: 32px;
            max-width: 250px;
            white-space: nowrap;
            text-overflow: ellipsis;
            overflow: hidden;

            &:before {
                .fm-ui-icon-vam;
                right: 4px;
                color: @ui-icon-color;
                font-size: 24px;
            }

            &:hover:before {
                color: @ui-icon-color-dark;
            }
        }
    }

    .fm-popup-content {
        height: ~"calc(100% - 68px)";
        height: ~"-webkit-calc(100% - 68px)";

        .fm-ui-row {
            height: 100%;
        }

        .fm-ui-col-3 {
            height: 100%;
        }

        .fm-list-wrap {
            border: @ui-element-border;
            position: relative;

            .fm-list-header {
                background: @ui-background-light;
                border-bottom: @ui-element-border;
                padding: 5px 10px;
                position: relative;

                span.fm-ui-label {
                    color: @ui-label-color-light;
                }

                &.fm-list-header-wide {
                    padding: 0px;
                    height: 35px;
                }

                .fm-list-header-label-wrap {
                    width: ~"calc(100% - 40px)";
                    width: ~"-webkit-calc(100% - 40px)";
                    padding: 10px;
                }

                .fm-btn-collapse-expand-all {
                    margin-left: 8px;
                }

                .fm-search-wrap {
                    position: absolute;
                    top: 0;
                    right: 0;
                    width: 40px;
                    height: 100%;
                    border-left: @ui-element-border;
                    z-index: 9;

                    .fm-search-inp {
                        z-index: 2;
                        position: absolute;
                        right: 0;
                        width: 100%;
                        height: 34px;
                        padding-left: 39px;
                        padding-right: 39px;
                        color: @ui-element-text-color;
                        font-size: @ui-element-font-size;
                        background: @background-ui-element-base-color;
                        opacity: 0;
                        border: none;
                        visibility: hidden;
                    }

                    .fm-search-inp-flat {
                        z-index: 2;
                        position: absolute;
                        right: 0;
                        width: 100%;
                        height: 36px;
                        padding-left: 39px;
                        padding-right: 39px;
                        color: @ui-element-text-color;
                        font-size: @ui-element-font-size;
                        background: @background-ui-element-base-color;
                        opacity: 0;
                        border: none;
                        visibility: hidden;
                    }

                    .fm-icon-act_close {
                        opacity: 0;
                        visibility: hidden;
                        position: absolute;
                        right: 0;
                        top: 0;
                        height: 100%;
                        width: 39px;
                        cursor: pointer;
                        z-index: 3;
                        color: @ui-icon-color;

                        &:before {
                            font-size: 26px;
                            position: absolute;
                            top: 4px;
                            left: 8px;
                        }

                        &:hover {
                            color: @ui-icon-color-dark;
                        }
                    }


                    .fm-search-btn {
                        position: absolute;
                        height: 36px;
                        width: 100%;
                        font-size: 14px;
                        text-align: center;
                        cursor: pointer;
                        z-index: 3;
                        border: none;
                        background: transparent;
                        color: @ui-label-color-light;
                        padding-bottom: 4px;
                        padding-right: 16px;

                        .fm-icon-act_search {
                            color: @ui-icon-color;
                            position: absolute;
                            top: 5px;
                            right: 7px;

                            &:before {
                                font-size: 25px;
                            }
                        }

                        &:hover {
                            color: @ui-label-color;

                            .fm-icon-act_search,
                            .fm-icon-act_search:before {
                                color: @ui-label-color;
                            }
                        }
                    }

                    &.fm-search-opened {
                        width: 100%;
                        height: 100%;
                        border-left: none;

                        .fm-icon-act_close,
                        .fm-search-inp {
                            visibility: visible;
                            opacity: 1;
                        }

                        .fm-select-counter {
                            display: none;
                        }

                        .fm-search-btn {
                            font-size: 0;
                            width: 40px;
                            left: 0;
                            pointer-events: none;

                            .fm-icon-act_search:before {
                                color: @ui-prompt-icon-color;
                            }
                        }
                    }

                    &.fm-search-opened-flat {
                        width: 50%;
                        height: 100%;

                        .fm-icon-act_close,
                        .fm-search-inp-flat {
                            visibility: visible;
                            opacity: 1;
                        }

                        .fm-select-counter {
                            display: none;
                        }

                        .fm-search-btn {
                            font-size: 0;
                            width: 40px;
                            left: 0;
                            pointer-events: none;

                            .fm-icon-act_search:before {
                                color: @ui-prompt-icon-color;
                            }
                        }
                    }
                }
            }

            .fm-list-content {
                min-height: 37px;

                .fm-ui-list {
                    height: ~"calc(100% - 4px)";
                    height: ~"-webkit-calc(100% - 4px)";
                    overflow-x: hidden;
                    overflow-y: auto;
                    position: relative;
                }

                li {
                    border-bottom: @ui-element-inner-border;
                    padding: 10px 9px;
                    position: relative;
                    cursor: move;
                    background: @background-ui-element-base-color;
                    height: 38px;
                    white-space: nowrap;

                    // &:last-child {
                    //     margin-bottom: 10px;
                    // }

                    span {
                        vertical-align: middle;
                    }

                    .fm-text-display {
                        font-size: @ui-label-font-size;
                        display: inline-block;
                        white-space: nowrap;
                        text-overflow: ellipsis;
                        overflow: hidden;
                    }

                    .fm-drag-handle {
                        .fm-ui-icon-vam;
                        color: @ui-border-color-light;
                        font-size: 20px;
                        padding: 8px 6px;
                        right: 0;
                        touch-action: none;

                        &:before {
                            content: "\e907";
                        }
                    }
                }

                li.fm-values {
                    padding-left: 24px;

                    &:before {
                        .fm-ui-icon;
                        content: "\e90b";
                        font-size: 20px;
                        color: @ui-border-color-light;
                        left: 2px;
                        top: 8px;
                    }
                }

                li.fm-selected {
                    .fm-text-display {
                        font-weight: bold;
                    }
                }

                .fm-search-highlight {
                    background-color: @grid-table-header-filter-column-search-highlight;
                    font-weight: inherit;
                }

                .fm-lst-hierarchies {
                    position: relative;

                    &.fm-drop-effect {
                       &::after {
                           content: '';
                           position: absolute;
                           top: 0;
                           left: 0;
                           background: red;
                           display: block;
                           width: 100%;
                           height: 100%;
                       }
                    }

                    li {
                        .fm-text-display {
                            position: absolute;
                            left: 30px;
                            right: 30px;
                        }
                    }
                    // check/uncheck
                    .fm-check-icon {
                        display: inline-block;
                        width: 18px;
                        height: 18px;
                        margin-right: 5px;
                        cursor: pointer;
                        position: relative;
                    }

                    li.fm-unchecked:not(.fm-level-folder) {
                        .fm-icon-display {
                            .fm-check-icon;
                            border: @ui-border-light;
                            background: @background-ui-element-base-color;
                        }
                    }

                    li.fm-checked:not(.fm-level-folder) {
                        .fm-icon-display {
                            .fm-check-icon;
                            background: @ui-background-dark;
                            border: 1px solid @ui-background-dark;

                            &:before {
                                .fm-ui-icon;
                                content: '\e947';
                                color: @ui-element-checkbox-color;
                                font-size: 20px;
                                font-weight: @ui-element-checkbox-font-weight;
                                top: -2px;
                                left: -2px;
                                width: 0;
                            }
                        }
                    }
                    // folder
                    li.fm-folder {
                        cursor: pointer;

                        .fm-text-display {
                            right: 10px;
                        }

                        .fm-icon-display {
                            display: inline-block;
                            width: 17px;
                            height: 17px;
                            margin-right: 5px;
                            position: relative;

                            &:before {
                                .fm-ui-icon;
                                font-size: 14px;
                                color: @ui-border-color;
                                padding: 2px;
                            }
                        }

                        &.fm-collapsed .fm-icon-display:before {
                            content: "\e911";
                        }

                        &.fm-expanded .fm-icon-display:before {
                            content: "\e90f";
                        }
                    }
                    // level folder
                    li.fm-level-folder {
                        .fm-text-display {
                            left: 52px;
                            right: 20px;
                        }

                        &.fm-unchecked {
                            .fm-moreicon-display {
                                .fm-check-icon;
                                border: @ui-border-light;
                                background: @background-ui-element-base-color;
                            }
                        }

                        &.fm-checked {
                            .fm-moreicon-display {
                                .fm-check-icon;
                                background: @ui-background-dark;
                            }

                            .fm-moreicon-display:before {
                                .fm-ui-icon;
                                content: '\e947';
                                color: @ui-element-checkbox-color;
                                font-weight: @ui-element-checkbox-font-weight;
                                font-size: 20px;
                                top: -2px;
                                left: -1px;
                                width: 0;
                            }
                        }
                    }
                    // measures folder
                    li.fm-measures-folder {
                        &:after {
                            .fm-ui-icon-vam;
                            content: "\e90b";
                            right: 6px;
                            font-size: 20px;
                            color: @ui-border-color-superlight;
                        }

                        .fm-text-display {
                            right: 20px;
                        }
                    }
                    // measure
                    li.fm-measure:not(.fm-calculated) {
                        &:after {
                            .fm-ui-icon-vam;
                            content: "\e90b";
                            right: 24px;
                            font-size: 20px;
                            color: @ui-border-color-superlight;
                        }

                        .fm-text-display {
                            right: 50px;
                        }
                    }

                    li.fm-calculated {
                        .fm-text-display {
                            right: 44px;
                        }

                        .fm-calc-display {
                            .fm-ui-icon-vam;
                            cursor: pointer;
                            color: @ui-border-color-superlight;
                            right: 22px;
                            font-size: 20px;
                            padding: 8px 5px;

                            &:hover {
                                color: @ui-border-color;
                            }

                            &:before {
                                content: "\e94f";
                            }
                        }
                    }
                    // kpi folder
                    li.fm-kpis-folder {
                        &:after {
                            .fm-ui-icon-vam;
                            content: "\e94a";
                            right: 8px;
                            font-size: 16px;
                            color: @ui-border-color-superlight;
                        }

                        .fm-text-display {
                            right: 25px;
                        }
                    }
                    // levels
                    .generate-levels(10);

                    .generate-levels(@n, @i: 1) when (@i =< @n) {
                        .fm-level-@{i} {
                            padding-left: 10px + @i * 10px;

                            .fm-text-display {
                                left: 32px + @i * 10px;
                            }

                            &.fm-level .fm-text-display {
                                left: 44px + @i * 10px;
                            }

                            &.fm-level-folder .fm-text-display {
                                left: 54px + @i * 10px;
                            }

                            &.fm-level .fm-icon-display {
                                left: 12px;                                
                            }
                        }

                        .generate-levels(@n, (@i + 1));
                    }
                }

                .fm-lst-measures {
                    position: relative;

                    .fm-text-display {
                        width: ~"calc(100% - 50px)";
                        width: ~"-webkit-calc(100% - 50px)";
                    }

                    .fm-aggr-display {
                        width: 32px;
                        height: 100%;
                        position: absolute;
                        right: 26px;
                        top: 0;
                        cursor: pointer;
                        padding-top: 8px;

                        &:before, &:after {
                            .fm-ui-icon;
                            color: @ui-icon-color;
                        }
                        &:hover::before,
                        &:hover::after {
                            color: @ui-icon-color-dark;
                        }
                        &::before {
                            content: "\e90b";
                            font-size: 20px;
                        }
                        &::after {
                            content: "\e908";
                            font-size: 16px;
                            left: 14px;
                            top: 10px;
                        }
                    }

                    .fm-calc-display {
                        .fm-ui-icon-vam;
                        cursor: pointer;
                        color: @ui-icon-color;
                        right: 32px;
                        font-size: 20px;
                        padding: 8px 5px;

                        &:hover {
                            color: @ui-icon-color-dark;
                        }

                        &:before {
                            content: "\e94f";
                        }
                    }
                }

                .fm-lst-pages, .fm-lst-columns, .fm-lst-rows {
                    .fm-text-display {
                        width: ~"calc(100% - 20px)";
                        width: ~"-webkit-calc(100% - 20px)";
                    }
                }
            }

            .fm-prompt {
                position: absolute;
                bottom: 0;
                width: 100%;
                padding: 12px;
                color: @ui-prompt-color;
                font-style: italic;
                text-align: center;
                z-index: -1;
            }
        }

        .fm-list-wrap-pages,
        .fm-list-wrap-columns {
            margin-bottom: 30px;
        }

        .fm-list-wrap-pages,
        .fm-list-wrap-columns,
        .fm-list-wrap-rows,
        .fm-list-wrap-measures {
            height: ~"-webkit-calc(50% - 15px)";
            height: ~"calc(50% - 15px)";

            .fm-list-content {
                height: ~"-webkit-calc(100% - 23px)";
                height: ~"calc(100% - 23px)";
            }

            .fm-dragging-move {
                display: none;
            }
        }

        .fm-list-wrap-all {
            height: 100%;

            .fm-list-content {
                height: ~"-webkit-calc(100% - 31px)";
                height: ~"calc(100% - 31px)";
            }
        }
    }

    &.fm-layout-mobile {
        .fm-popup-content {
            height: ~"calc(100% - 50px)";
            height: ~"-webkit-calc(100% - 50px)";
        }
    }

    &.fm-layout-mobile-small {
        .fm-popup-header {
            flex-direction: column;
        }
        
        .fm-ui-col:nth-child(2) {
            margin-left: auto;
        }

        .fm-popup-content {
            height: ~"calc(100% - 95px)";
            height: ~"-webkit-calc(100% - 95px)";
        }

        .fm-btn-add-measure {
            display: none !important;
        }
    }

    &.fm-flat-fields {
        min-width: 320px;
        width: 480px;
        min-height: 467px;
        height: 467px;

        .fm-popup-header {

            .fm-btn-add-measure {
                min-width: 40px;
                width: 40px;
                padding: 0;

                &::before {
                    .fm-ui-icon-c; 
                    right: auto;
                    right: initial;
                }
            }
        }

        .fm-popup-content {
            .fm-list-wrap {
                min-height: 342px;
                height: 100%;

                .fm-list-header {
                    padding: 10px 9px;

                    .fm-ui-checkbox {
                        span.fm-ui-label {
                            color: @ui-label-color;
                            padding-left: 26px;
                        }

                        &.fm-selected {
                            font-weight: bold;
                        }
                    }
                }

                .fm-list-content {
                    height: ~"calc(100% - 34px)";
                    height: ~"-webkit-calc(100% - 34px)";

                    .fm-lst-hierarchies {
                        .fm-aggr-display {
                            width: 32px;
                            height: 100%;
                            position: absolute;
                            right: 26px;
                            top: 0;
                            cursor: pointer;
                            padding-top: 8px;
    
                            &:before, &:after {
                                .fm-ui-icon;
                                color: @ui-icon-color;
                            }
                            &:hover::before,
                            &:hover::after {
                                color: @ui-icon-color-dark;
                            }
                            &::before {
                                content: "\e90b";
                                font-size: 20px;
                            }
                            &::after {
                                content: "\e908";
                                font-size: 16px;
                                left: 14px;
                                top: 10px;
                            }
                        }

                        li {
                            .fm-text-display {
                                left: 35px;
                            }

                            &.fm-calculated .fm-calc-display {
                                color: @ui-icon-color;
                                right: 33px;

                                &:hover {
                                    color: @ui-icon-color-dark;
                                }
                            }
                        }

                        .fm-dragging-move {
                            display: none;
                        }

                        li.fm-has-aggs {
                            .fm-text-display {
                                right: 55px;
                            } 
                        }

                        li.fm-measure::after {
                            content: none;
                        }
                    }
                }
            }
        }
    }
    // instant view
    &.fm-instant-view {
        position: absolute;
        width: 300px;
        min-width: 300px;
        min-height: 100%;
        right: 0;
        top: 0;
        height: 100%;
        background-color: @background-base-color;
        border-left: @ui-element-border;
        // -webkit-box-shadow: -20px 0 20px -20px rgba(0, 0, 0, 0.1);
        // box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);

        .fm-list-wrap {
            border: none;
        }

        .fm-popup-content {
            height: 100%;
            .fm-list-wrap-all {
                height: 100%;
                .fm-list-content {
                    height: ~"calc(100% - 35px)";
                    height: ~"-webkit-calc(100% - 35px)";
                    .fm-lst-hierarchies {
                        max-height: 100%;
                        height: 100%;
                    }
                } 
            }
        }
        
        .fm-btn-add-measure,
        .fm-btn-close-fields {
            position: absolute;
            top: 0;
            font-size: 0;
            border: none;
            background-color: transparent;
            min-width: auto;
            min-width: initial;
            padding: 2px;
            width: 36px;
            height: 100%;
            border-left: @ui-element-border;
            border-radius: 0;
    
            &:hover {
                background-color: @ui-background-light;
            }

            &:before {
                .fm-ui-icon;
                padding-left: 1px;
                font-size: 30px;
                color: @ui-icon-color;
                position: static;
            }
        }

        .fm-btn-close-fields {
            right: 0;
            &:before {
                .rotate(180);
                content: "\e94c";
            }
        }

        .fm-btn-add-measure {
            right: 36px;
            &::before {
                content: "\e901";
            }
        }

        &.fm-flat-fields {
            .fm-list-wrap-all {
                height: ~"calc(100% - 2px)";
                height: ~"-webkit-calc(100% - 2px)";
            }
        }

        &.fm-pivot-fields {
            .fm-popup-content {
                .fm-list-wrap-all {
                    height: 40%;
                }

                .fm-ui-row {
                    height: 20%;
                    border-top: @ui-element-border;

                    .fm-ui-col-2 {
                        height: 100%;
                    }

                    .fm-list-wrap {
                        height: 100%;
                        margin: 0;

                        &.fm-list-wrap-pages {
                            border-right: @ui-element-border;
                        }
                    }
                }

                .fm-list-wrap {
                    .fm-list-content {
                        height: ~"calc(100% - 25px)";
                        height: ~"-webkit-calc(100% - 25px)";
                        li {
                            padding-top: 5px;
                            padding-bottom: 5px;
                            height: 28px;  
    
                            &.fm-values:before {
                                top: 3px;
                            }
                        }
                        .fm-lst-measures .fm-aggr-display {
                            padding-top: 3px;
                            &:after {
                                top: 6px;
                            }
                        }
                    }
                    
                    &.fm-list-wrap-all {
                        .fm-list-content {
                            height: ~"calc(100% - 35px)";
                            height: ~"-webkit-calc(100% - 35px)";
                        }
                    }
                }
            }
        }
    }
    /* layouts */
    &.fm-layout-tablet {

        .fm-list-wrap .fm-list-header.fm-list-header-wide {
            .fm-list-header-label-wrap {
                position: absolute;
                top: 50%;
                transform: translate(0,-50%);
            }

            span.fm-ui-label {
                display: block;
            }

            .fm-btn-collapse-expand-all {
                margin-left: 0px;
            }
        }
    }

    &.fm-layout-mobile {
        .fm-btn-add-measure {
            font-size: 0;
            min-width: 40px;
            width: 40px;
            padding: 0;

            &:before {
                .fm-ui-icon-c;
                right: auto;
                right: initial;
            }
        }

        .fm-ui-col-3 {
            margin-right: 12px;
            width: ~"calc(33.33% - 8px)";
            width: ~"-webkit-calc(33.33% - 8px)";

            &:nth-child(3n+3) {
                margin-right: 0;
            }
        }

        .fm-list-wrap-pages,
        .fm-list-wrap-columns {
            margin-bottom: 12px;
        }

        .fm-list-wrap-pages,
        .fm-list-wrap-columns,
        .fm-list-wrap-measures,
        .fm-list-wrap-rows {
            height: ~"calc(50% - 6px)";
            height: ~"-webkit-calc(50% - 6px)";
        }
    }

    &.fm-layout-mobile-small {
        .fm-ui-btns-row {
            .fm-ui-btn:not(.fm-btn-add-measure) {
                width: ~"calc(50% - 40px)";
                width: ~"-webkit-calc(50% - 40px)";
            }
        }
    }
}

#fm-pivot-view {
    .fm-aggregations-view {
        width: 200px;
        background: @background-ui-element-base-color;
        z-index: 9;
        border: @ui-element-border;
        position: absolute;
        -webkit-box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
        padding: 0;

        .fm-arrow {
            .fm-ui-vam;
            position: absolute;
            right: 0;

            &:after,
            &:before {
                .fm-ui-vam;
                content: "";
                display: block;
                position: absolute;
                width: 0px;
                height: 0px;
                border-style: solid;
            }

            &:before {
                border-width: 5.5px 0 5.5px 6px;
                border-color: transparent transparent transparent @ui-border-color-light;
            }

            &:after {
                border-width: 4.5px 0 4.5px 5px;
                border-color: transparent transparent transparent @ui-background-light;
            }
        }

        ul.fm-ui-list {
            max-height: 300px;
            overflow-y: auto;
            overflow-x: hidden;

            li {
                padding: 10px 9px;
                border-bottom: @ui-element-inner-border;
                cursor: pointer;
                position: relative;

                &:last-child {
                    border-bottom: none;
                }

                &:hover {
                    background: @ui-background-light;
                }

                &.fm-selected {
                    background: @ui-background-light;
                    padding-right: 28px;

                    &:before {
                        .fm-ui-icon;
                        content: '\e902';
                        right: 25px;
                        left: auto;
                        top: 6px;
                        color: @ui-border-color;
                        font-size: 22px;
                    }
                }
            }
        }
    }
}

#fm-pivot-view {
    div.fm-ui-modal-overlay.fm-dt-fields-overlay {
        z-index: 13;
    }

    div.fm-ui-popup.fm-dt-fields {
        z-index: 14;

        .fm-btn-add-measure {
            display: none;
        }
    }
}

/* Drill trough view */
#fm-pivot-view .fm-drillthrough-view {
    overflow: hidden;
    min-width: 320px;

    .fm-header-container {
        position: relative;
        margin-bottom: 10px;
    }

    .fm-details-container {
        margin-bottom: 20px;

        .fm-ui-label {
            margin-right: 20px;
            display: inline-block;
            max-width: 33%;
            vertical-align: top;

            b {
                color: @ui-label-color;
            }
        }

        .fm-ui-label:last-child {
            margin-right: 0;
        }
    }

    .fm-grid-container {
        border: @ui-component-border;
        position: relative;
    }

    .fm-popup-title {
        padding-right: 30px;
    }

    .fm-ui-btn-close {
        position: absolute;
        top: 0;
        right: 0;
    }
}

#fm-pivot-view input[type=text].fm-ui-text-input.fm-editing-cell {
    position: absolute;
    font-size: @font-size;
}

#fm-pivot-view textarea.fm-ui-text-area.fm-editing-cell {
    position: absolute;
    font-size: @font-size;
    padding-left: 4px;
    padding-top: 7px;
    box-sizing: border-box;
    z-index: 2;
}

/* Drill trough view end */

/* Calculated view */
#fm-pivot-view div.fm-calculated-view {
    z-index: 14;
    min-width: 320px;
    width: 480px;

    .fm-popup-header {
        .fm-popup-title {
            font-size: 20px;
            line-height: 28px;
        }

        .fm-ui-col:first-child {
            margin-right: 30px;
        }

        .fm-remove-btn {
            min-width: 40px;
            max-width: 40px;
            padding: 0;
            
            &:before {
                .fm-ui-icon-c;
                font-size: 30px;
                color: @ui-icon-color;
            }
            &:hover:before {
                color: @ui-icon-color-dark;
            }
        }
    }

    .fm-popup-content {
        position: relative;

        .fm-name-input {
            margin-bottom: 20px;
        }

        /*Calculated view search */
        .fm-list-header {
            background: @ui-background-light;
            position: relative;
            border: @ui-element-border;
            border-bottom: 0px;

            .fm-list-header-label-wrap {
                width: calc(100% - 40px);
                width: -webkit-calc(100% - 40px);
                padding: 10px;
            }

            span.fm-ui-label {
                color: @ui-label-color-light;
            }

            .fm-search-wrap {
                position: absolute;
                top: 0;
                right: 0;
                width: 40px;
                height: 100%;
                border-left: @ui-element-border;
                z-index: 9;

                .fm-search-btn {
                    position: absolute;
                    width: 100%;
                    height: 38px;
                    cursor: pointer;
                    z-index: 3;
                    border: none;
                    background: transparent;
        
                    .fm-icon-act_search {
                        color: @ui-icon-color;
                        position: absolute;
                        top: 5px;
                        right: 7px;

                        &::before {
                            font-size: 25px;
                        }
                    }
                }

                &.fm-search-opened {
                    width: 100%;
                    height: 100%;
                    border-left: none;

                    .fm-icon-act_close,
                    .fm-search-inp {
                        visibility: visible;
                        opacity: 1;
                    }

                    .fm-select-counter {
                        display: none;
                    }

                    .fm-search-btn {
                        font-size: 0;
                        width: 40px;
                        left: 0;
                        pointer-events: none;

                        .fm-icon-act_search:before {
                            color: @ui-prompt-icon-color;
                        }
                    }
                }

                .fm-icon-act_close {
                    visibility: hidden;
                    position: absolute;
                    right: 0;
                    top: 0;
                    height: 100%;
                    width: 39px;
                    cursor: pointer;
                    z-index: 3;
                    color: @ui-icon-color;


                    &::before {
                        font-size: 26px;
                        position: absolute;
                        top: 5px;
                        left: 6px;
                    }
                }

                .fm-search-inp {
                    visibility: hidden;
                    position: absolute;
                    right: 0;
                    top: 0px;
                    width: 100%;
                    height: 37px;
                    padding-left: 40px;
                    padding-right: 40px;
                    border-top: 0px;
                    border-right: 0px;
                    border-left: 0px;
                }
            }
        }

        .fm-list-content {
            border: @ui-element-border;
            margin-bottom: 20px;
        }
        
        .fm-lst-measures {
            position: relative;
            height: 191px;
            overflow-x: hidden;
            overflow-y: auto;

            li {
                border-bottom: @ui-element-inner-border;
                padding: 10px 9px;
                position: relative;
                cursor: move;
                background: @background-ui-element-base-color;
                height: 38px;
                white-space: nowrap;

                span {
                    vertical-align: middle;
                }

                .fm-text-display {
                    font-size: @ui-label-font-size;
                    display: inline-block;
                    white-space: nowrap;
                    text-overflow: ellipsis;
                    overflow: hidden;
                    width: ~"calc(100% - 50px)";
                    width: ~"-webkit-calc(100% - 50px)";

                    .fm-search-highlight {
                        background-color: @grid-table-header-filter-column-search-highlight;
                        font-weight: inherit;
                    }
                }

                .fm-aggr-display {
                    width: 32px;
                    height: 100%;
                    position: absolute;
                    right: 26px;
                    top: 0;
                    cursor: pointer;
                    padding-top: 7px;

                    &:before, &:after {
                        .fm-ui-icon;
                        color: @ui-icon-color;
                    }
                    &:hover::before,
                    &:hover::after {
                        color: @ui-icon-color-dark;
                    }
                    &::before {
                        content: "\e90b";
                        font-size: 20px;
                    }
                    &::after {
                        content: "\e908";
                        font-size: 16px;
                        left: 14px;
                        top: 10px;
                    }
                }

                .fm-drag-handle {
                    .fm-ui-icon-vam;
                    color: @ui-border-color-light;
                    font-size: 20px;
                    padding: 8px;
                    right: 0;
                    touch-action: none;
                    
                    &:before {
                        content: "\e907";
                    }
                }
            }
        }

        .fm-func-btn-group {
            margin-top: 20px;
            margin-bottom: 20px;

            .fm-calc-action {           
                -webkit-appearance: none;
                -moz-appearance: none;
                -webkit-box-sizing: border-box;
                box-sizing: border-box;
                outline: none;
                border: none;
                border: @ui-border-dark;
                white-space: nowrap;
                text-overflow: ellipsis;
                overflow: hidden;

                height: 38px;
                line-height: 36px;
                font-size: @ui-btn-font-size;
                background: @ui-background;
                position: relative;
                display: inline-block;
                vertical-align: top;
                color: @ui-btn-calc-text-color;
                text-align: center;
                cursor: pointer;

                &:hover {
                    opacity: .85;
                }

                &:hover,
                &:focus,
                &:active {
                    outline: none;
                }

                &:first-child {
                    border-top-left-radius: @ui-btn-border-radius;
                }
                &:nth-child(9) {
                    border-top-right-radius: @ui-btn-border-radius;
                }
                &:nth-child(10) {
                    border-bottom-left-radius: @ui-btn-border-radius;
                }
                &:last-child {
                    border-bottom-right-radius: @ui-btn-border-radius;
                }
            }
        }

        .fm-formula-wrap {
            position: relative;

            .fm-formula-input {
                width: 100%;
                height: 80px;
                font-size: @ui-label-font-size;
                border: @ui-element-border;
                font-family: monospace;

                &.fm-droppable-over {
                    background: @ui-background-superlight;
                    border: @ui-border;
                }
            }

            .fm-prompt {
                position: absolute;
                bottom: 10px;
                pointer-events: none;
                left: 0;
                width: 100%;
                text-align: center;
                color: @ui-prompt-color;
                font-style: italic;
            }
        }
    }

    &.fm-layout-mobile {
        .fm-popup-header .fm-ui-col:first-child {
            margin-right: 10px;
        }
    }

    &.fm-layout-mobile-small {
        .fm-with-delete-btn {
            .fm-popup-header {
                .fm-ui-btns-row {
                    .fm-ui-btn:not(.fm-remove-btn) {
                        width: ~"calc(50% - 40px)";
                        width: ~"-webkit-calc(50% - 40px)";
                    }
                }
            } 
        }
    }
}

#fm-pivot-view div.fm-ui-modal-overlay.fm-calculated-view-overlay {
    z-index: 13;
}
/* PRELOADER VIEW */
#fm-pivot-view div.fm-ui-modal-overlay.fm-overlay-preloader {
    z-index: 20;
}
#fm-pivot-view div.fm-preloader-view {
    z-index: 21;
    width: 320px;
    height: 100px;

    .fm-spinner {
        position: relative;        
        &:before {
            .fm-ui-icon;
            content: "\e97b";
            font-size: 32px;
            left: 7px;
            top: 10px;
            color: @ui-border-color;

            -webkit-animation-name: spin;
            -webkit-animation-duration: 1000ms;
            -webkit-animation-iteration-count: infinite;
            -webkit-animation-timing-function: linear;
            -moz-animation-name: spin;
            -moz-animation-duration: 1000ms;
            -moz-animation-iteration-count: infinite;
            -moz-animation-timing-function: linear;
            -ms-animation-name: spin;
            -ms-animation-duration: 1000ms;
            -ms-animation-iteration-count: infinite;
            -ms-animation-timing-function: linear;
            -o-transition: rotate(3600deg);
        }

        @-moz-keyframes spin {
            from { -moz-transform: rotate(0deg); }
            to { -moz-transform: rotate(360deg); }
        }
        @-webkit-keyframes spin {
            from { -webkit-transform: rotate(0deg); }
            to { -webkit-transform: rotate(360deg); }
        }
        @keyframes spin {
            from {transform:rotate(0deg);}
            to {transform:rotate(360deg);}
        }
    }


    .fm-message-label {
        display: block;
        padding-left: 70px;
        padding-top: 8px;
    }

    .fm-details-label {
        display: block;
        color: @ui-label-color-light;
        padding-left: 70px;
        padding-top: 2px;
        font-size: 12px;
    }
}

/* PRELOADER END */

/* ALERT VIEW */
#fm-pivot-view div.fm-ui-modal-overlay.fm-overlay-alert {
    z-index: 16;
}
#fm-pivot-view div.fm-prompt-view {
    z-index: 17;

    .fm-content {
        max-width: 300px;
        min-width: 300px;
        word-wrap: break-word;
    }

    .fm-message-label {
        display: block;
        margin-bottom: 10px;
    }

    .fm-ui-btns-row {
        margin-top: 10px;

        .fm-ui-btn {
            margin-top: 10px;
        }
    }
}
#fm-pivot-view div.fm-alert-view {
    z-index: 17;

    .fm-content {
        margin-left: 100px;
        max-width: 300px;
        word-wrap: break-word;
    }

    .fm-popup-title {
        margin-bottom: 15px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .fm-build-version {
        color: @theme-text-color-light;
        font-size: @ui-element-font-size - 1;
    }

    .fm-alert-icon {
        position: absolute;
        left: 50px;
        .fm-ui-vam;
    }

    .fm-ui-btns-row {
        margin-top: 10px;

        .fm-ui-btn {
            margin-top: 10px;
        }
    }

    .fm-circle {
        display: block;
        border-radius: 50%;
        //background: @ui-background;
        border: 30px solid @ui-background;
        width: 60px;
        height: 60px;
        position: relative;
        margin-left: -10px;

        .fm-ui-icon {
            color: @ui-alert-icon-color;
            font-size: 38px;
            padding: 11px;
            position: absolute;
            top: -29px;
            left: -29px;
        }
    }

    .fm-hexagon {
        display: block;
        position: relative;
        width: 32.33px;
        height: 56px;
        background-color: @ui-background;
        margin: 16.17px 0;

        .fm-ui-icon {
            color: @ui-alert-icon-color;
            font-size: 38px;
            top: 8px;
            left: -2px;
        }
    }

    .fm-hexagon:before, .fm-hexagon:after {
        content: "";
        position: absolute;
        width: 0;
        border-top: 28px solid transparent;
        border-bottom: 28px solid transparent;
    }

    .fm-hexagon:before {
        left: 100%;
        border-left: 16.17px solid @ui-background;
    }

    .fm-hexagon:after {
        right: 100%;
        width: 0;
        border-right: 16.17px solid @ui-background;
    }

    .fm-triangle-wrap {
        position: relative;

        .fm-ui-icon {
            color: @ui-alert-icon-color;
            font-size: 38px;
            top: -4px;
            left: -1px;
        }

        .fm-triangle {
            position: relative;
            background-color: @ui-background;
            text-align: left;
            display: block;
            margin-top: -7px;
        }

        .fm-triangle:before,
        .fm-triangle:after {
            content: '';
            position: absolute;
            background-color: inherit;
        }

        .fm-triangle,
        .fm-triangle:before,
        .fm-triangle:after {
            width: 35px;
            height: 35px;
            border-top-right-radius: 30%;
        }

        .fm-triangle {
            -webkit-transform: rotate(-60deg) skewX(-30deg) scale(1, 0.866);
            -ms-transform: rotate(-60deg) skewX(-30deg) scale(1, 0.866);
            transform: rotate(-60deg) skewX(-30deg) scale(1, 0.866);
        }

        .fm-triangle:before {
            -webkit-transform: rotate(-135deg) skewX(-45deg) scale(1.414, 0.707) translate(0, -50%);
            -ms-transform: rotate(-135deg) skewX(-45deg) scale(1.414, 0.707) translate(0, -50%);
            transform: rotate(-135deg) skewX(-45deg) scale(1.414, 0.707) translate(0, -50%);
        }

        .fm-triangle:after {
            -webkit-transform: rotate(135deg) skewY(-45deg) scale(0.707, 1.414) translate(50%);
            -ms-transform: rotate(135deg) skewY(-45deg) scale(0.707, 1.414) translate(50%);
            transform: rotate(135deg) skewY(-45deg) scale(0.707, 1.414) translate(50%);
        }
    }

    &.fm-layout-mobile-small {
        .fm-content {
            margin-left: 0;
        }
        
        .fm-alert-icon {
            display: none;
        }
    }
}
/* ALERT VIEW END*/

.fm-noselect {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* NEW GRID */
#fm-pivot-view .fm-grid-layout {
    position: relative;
    overflow: hidden;
    z-index: 1;

    div.fm-scroll-pane {
        overflow: auto;
    
        div.fm-scroll-content {
            position: relative;
        }
        
        div.fm-scroll-content-float {
            position: relative;
        }
    
        div.fm-scroll-placeholder {
            position: relative;
            height: 100%;
        }
    }
    
    div.fm-cell {
        background-color: @grid-cell-color;
        color: @grid-cell-text-color;
        box-sizing: border-box;
        vertical-align: top;
        border-right: @grid-cell-border-right;
        border-bottom: @grid-cell-border-bottom;
        padding: 7px 4px;
        line-height: normal;
    }

    div.fm-row {
        white-space: nowrap;
        box-sizing: border-box;
    
        &.fm-row-hidden {
            position: absolute;
            top: -1000px;
            z-index: -1;
        }
    }

    div.fm-row > div {
        display: inline-block;
    }

    .fm-data-sheet {
        .fm-scroll-placeholder {
            z-index: 1;
        }
    }

    .fm-data-sheet,
    .fm-cols-sheet {
        div.fm-row {
            display: flex;
        }
        div.fm-row > div {
            flex-shrink: 0;
        }
    }

    .fm-rows-sheet {
        div.fm-row {
            display: flex;

            & > div.fm-sheet-header {
                display: flex;
                flex-direction: column;
                justify-content: center;
            }
        }
    } 

    div.fm-scroll-pane div.fm-scroll-content {
        position: absolute;
        top: 0;
        left: 0;
        overflow: hidden;
        white-space: nowrap;
        /*pointer-events: none;*/
    }

    .fm-data-sheet,
    .fm-rows-sheet,
    .fm-cols-sheet,
    .fm-sheet-headers {
        position: absolute;
        overflow: hidden;
        background-color: @background-base-color;
    }

    .fm-data-sheet {
        border-top: @grid-data-sheet-border-top;
        border-left: @grid-data-sheet-border-left;
    }

    .fm-cell {
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
    }

    .fm-data-sheet .fm-cell {
        text-align: right;
    }
    
    .fm-cols-sheet .fm-scroll-pane,
    .fm-rows-sheet .fm-scroll-pane {
        overflow: hidden;
    }

    div.fm-scroll-pane div.fm-scroll-content .fm-cell {
        position: relative;
    }
    
    div.fm-scroll-pane div.fm-scroll-content-float .fm-cell {
        position: absolute;
    }
    
    div.fm-header-r {
        background-color: @grid-table-header-row-color;
        color: @grid-table-header-row-text-color;
        border-right: @grid-table-header-row-border-right;
        border-bottom: @grid-table-header-row-border-bottom;
    }

    div.fm-header-c {
        background-color: @grid-table-header-column-color;
        color: @grid-table-header-column-text-color;
        border-right: @grid-table-header-column-border-right;
        border-bottom: @grid-table-header-column-border-bottom;
    }
    
    div.fm-filter-header {
        cursor: pointer;
    
        &.fm-live-filtering-header {
            cursor: auto;
        }
    }

    div.fm-total-r{
        font-weight: @grid-total-row-cell-font-weight;
        background-color: @grid-total-row-cell-color;
        color: @grid-total-row-cell-text-color;
        border-right: @grid-total-row-cell-border-right;
        border-bottom: @grid-total-row-cell-border-bottom;
    }

    div.fm-total-c{
        font-weight: @grid-total-column-cell-font-weight;
        background-color: @grid-total-column-cell-color;
        color: @grid-total-column-cell-text-color;
        border-right: @grid-total-column-cell-border-right;
        border-bottom: @grid-total-column-cell-border-bottom;
    }

    div.fm-grand-total-r {
        font-weight: @grid-grand-total-row-cell-font-weight;
        background-color: @grid-grand-total-row-cell-color;
        color: @grid-grand-total-row-cell-text-color;
        border-right: @grid-grand-total-row-cell-border-right;
        border-bottom: @grid-grand-total-row-cell-border-bottom;
    }

    div.fm-grand-total-c {
        font-weight: @grid-grand-total-column-cell-font-weight;
        background-color: @grid-grand-total-column-cell-color;
        color: @grid-grand-total-column-cell-text-color;
        border-right: @grid-grand-total-column-cell-border-right;
        border-bottom: @grid-grand-total-column-cell-border-bottom;
    }

    div.fm-grand-total-c.fm-grand-total-r {
        font-weight: @grid-grand-total-row-column-cell-font-weight;
        background-color: @grid-grand-total-row-column-cell-color;
        color: @grid-grand-total-row-column-cell-text-color;
        border-right: @grid-grand-total-row-column-cell-border-right;
        border-bottom: @grid-grand-total-row-column-cell-border-bottom;
    }
    
    div.fm-header.fm-total-r {
        font-weight: @grid-table-header-total-row-cell-font-weight;
        background-color: @grid-table-header-total-row-cell-color;
        color: @grid-table-header-total-row-cell-text-color;
        border-right: @grid-table-header-total-row-cell-border-right;
        border-bottom: @grid-table-header-total-row-cell-border-bottom;
    }
    div.fm-header.fm-total-c {
        font-weight: @grid-table-header-total-column-cell-font-weight;
        background-color: @grid-table-header-total-column-cell-color;
        color: @grid-table-header-total-column-cell-text-color;
        border-right: @grid-table-header-total-column-cell-border-right;
        border-bottom: @grid-table-header-total-column-cell-border-bottom;
    }

    div.fm-header.fm-grand-total-r {
        font-weight: @grid-table-header-grand-total-row-cell-font-weight;
        background-color: @grid-table-header-grand-total-row-cell-color;
        color: @grid-table-header-grand-total-row-cell-text-color;
        border-right: @grid-table-header-grand-total-row-cell-border-right;
        border-bottom: @grid-table-header-grand-total-row-cell-border-bottom;
        
    }
    div.fm-header.fm-grand-total-c {
        font-weight: @grid-table-header-grand-total-column-cell-font-weight;
        background-color: @grid-table-header-grand-total-column-cell-color;
        color: @grid-table-header-grand-total-column-cell-text-color;
        border-right: @grid-table-header-grand-total-column-cell-border-right;
        border-bottom: @grid-table-header-grand-total-column-cell-border-bottom;
    }

    &.fm-flat-view div.fm-total,
    &.fm-flat-view div.fm-grand-total {
        text-align: right;
    }

    .fm-filters {
        position: absolute;
        background-color: @grid-table-header-filter-column-pane-color;
        color: @grid-table-header-filter-column-pane-text-color;
    }
    
    .fm-cols-filter {
        border-right: @grid-table-header-filter-column-pane-border-right;
        z-index: 1;
        .fm-row{
            border-bottom: @grid-table-header-filter-column-pane-border-bottom;
        }
    }
        
    .fm-filters .fm-header,
    &.fm-flat-view .fm-header {
        background-color: @grid-table-header-filter-cell-color;
        color: @grid-table-header-filter-cell-text-color;
        font-weight: bold;
        text-transform: uppercase; 
        position: relative;
        border-bottom: @grid-table-header-filter-cell-border-bottom;
        border-right: @grid-table-header-filter-cell-border-right;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .fm-filters .fm-filter-header,
    &.fm-flat-view .fm-filter-header {
        background-color: @grid-flat-table-filter-header-color;
        color: @grid-flat-table-filter-header-text-color;
        font-weight: bold;
        text-transform: uppercase; 
        position: relative;
        border-bottom: @grid-flat-table-filter-cell-border-bottom;
        border-right: @grid-flat-table-filter-cell-border-right;
        overflow: hidden;
        text-overflow: ellipsis;

        &:hover {
            background-color: @grid-flat-table-filter-header-color-hover;
        }
    }

    div.fm-filter-header,
    a.fm-filter-header {
        padding-right: 20px;

        &.fm-filtered {
            padding-right: 35px;
        }

        &.fm-live-filtering-header:hover {
            background-color: @grid-live-filter-color;
        }
    }

    &.fm-flat-view {
        div.fm-filter-header,
        a.fm-filter-header {
            padding-right: 30px;

            &.fm-filtered {
                padding-right: 40px;
            }
        }
    }

    i.fm-icon {
        position: absolute;
        height: 100%;
        width: 16px;
        top: 0;
    }
    
    i.fm-icon:before {
        font-family: flexmonster-icons;
        font-weight: normal;
        font-size: 15px;
        color: @grid-icon-color;
        position: absolute;
        top: 6px;
    }

    &.fm-flat-view i.fm-icon:before {
        color: @grid-filter-icon-color;
    }
    
    .fm-filter-header i.fm-filter-icon {
        right: 2px;
        pointer-events: none;
    }
    
    .fm-filter-header i.fm-filter-icon:before {
        content: "\e90c";
        color: @grid-filter-icon-color;
    }
    
    .fm-filter-header.fm-filtered i.fm-filtered-icon {
        right: 16px;
        pointer-events: none;
    }

    &.fm-flat-view {
        .fm-filter-header.fm-filtered i.fm-filtered-icon {
            right: 22px;
        }
    }
    
    .fm-filter-header.fm-filtered i.fm-filtered-icon:before {
        content: "\e905";
        color: @grid-filter-icon-color;
    }

    .fm-filter-header.fm-dragging-move {
        opacity: 0.5;
    }
    .fm-header-drop-indicator {
        background-color: @ui-border-color-dark;
    }

    .fm-draggable {
        touch-action: none;
        
        &:not(.fm-filter-header) {
            cursor: move;
        }
    }

    .fm-filters {
        &.fm-cols-filter {
            .fm-filter-header{
                border-right: @grid-table-header-filter-column-cell-border-right;
                border-bottom: @grid-table-header-filter-column-cell-border-bottom;
                background-color: @grid-table-header-filter-column-cell-color;
                color: @grid-table-header-filter-column-cell-text-color;

                &:hover{
                    background-color: @grid-table-header-filter-column-cell-color-hover;
                }
            }
            .fm-header-drop-indicator {
                display: inline-block;
                width: 3px;
                height: 100%;
            }
        }

        &.fm-rows-filter {
            .fm-filter-header{
                border-right: @grid-table-header-filter-row-cell-border-right;
                border-bottom: @grid-table-header-filter-row-cell-border-bottom;
                background-color: @grid-table-header-filter-row-cell-color;
                color: @grid-table-header-filter-row-cell-text-color;

                &:hover{
                    background-color: @grid-table-header-filter-row-cell-color-hover;
                }
            }

            .fm-header-drop-indicator {
                display: block;
                width: 100%;
                height: 3px;
            }
        }

        &.fm-page-filter {
            .fm-header-drop-indicator {
                float: none;
                display: inline-block;
                width: 3px;
                height: 40px;
                vertical-align: top;
                margin-right: 5px;
            }
        }
    }

    &.fm-classic-view {
        .fm-filters {
            &.fm-rows-filter {
                .fm-header-drop-indicator {
                    display: inline-block;
                    width: 3px;
                    height: 30px;
                }
            }
        }
    }

    &.fm-flat-view {
        .fm-header-drop-indicator {
            position:absolute;
            width: 3px;
            height: 30px;
        }
    }

    /* pages filter */

    .fm-filters.fm-page-filter {
        padding: 7px 0 0 7px;
        border-bottom: @ui-border-light;
        background-color: @grid-sheet-header-color;
        white-space: nowrap;
        overflow-x: auto;

        a.fm-filter-header {
            text-align: left;
            border: none;
            background-color: @grid-report-filter-cell-color;
            margin-bottom: 5px;
            margin-right: 5px;
            padding-top: 6px;
            padding-bottom: 7px;
            padding-left: 5px;
            padding-right: 24px;
            width: auto;
            width: initial;
            min-width: 80px;
            line-height: 15px;
            white-space: nowrap;
            font-weight: bold !important;
            display: inline-block;
            float: none;
            cursor: pointer;

            &.fm-filtered {
                padding-right: 40px;
            }

            &:hover {
                background-color: @grid-report-filter-cell-color-hover;
            }     
            
            i.fm-icon:before {
                top: 7px;
            }

            i.fm-filter-icon {
                right: 4px;
            }

            i.fm-filtered-icon {
                right: 20px;
            }

            .fm-filter-desc {
                display: inline-block;
                font-weight: normal !important;
                text-transform: none;
                color: @grid-report-filter-subtext-color;
                font-size: 10px;
                padding-top: 4px;
                margin-left: 4px;
            }
        }
    }

    /* levels */

    &.fm-compact-view {
        .fm-header-r.fm-level-1 {
            padding-left: 15px;
            background-position: 12px center;
        }
    
        .fm-header-r.fm-level-2 {
            padding-left: 27px;
            background-position: 24px center;
        }
    
        .fm-header-r.fm-level-3 {
            padding-left: 39px;
            background-position: 36px center;
        }
    
        .fm-header-r.fm-level-4 {
            padding-left: 51px;
            background-position: 48px center;
        }
    
        .fm-header-r.fm-level-5 {
            padding-left: 63px;
            background-position: 60px center;
        }
    
        .fm-header-r.fm-level-6 {
            padding-left: 75px;
            background-position: 72px center;
        }
    
        .fm-header-r.fm-level-7 {
            padding-left: 87px;
            background-position: 84px center;
        }
    
        .fm-header-r.fm-level-8 {
            padding-left: 99px;
            background-position: 96px center;
        }
    
        .fm-header-r.fm-level-9 {
            padding-left: 111px;
            background-position: 108px center;
        }
    
        .fm-header-r.fm-level-10 {
            padding-left: 123px;
            background-position: 120px center;
        }
        .fm-header-r.fm-level-11 {
            padding-left: 135px;
            background-position: 132px center;
        }
    
        .fm-header-r.fm-level-12 {
            padding-left: 147px;
            background-position: 144px center;
        }
    
        .fm-header-r.fm-level-13 {
            padding-left: 159px;
            background-position: 156px center;
        }
    
        .fm-header-r.fm-level-14 {
            padding-left: 171px;
            background-position: 168px center;
        }
    
        .fm-header-r.fm-level-15 {
            padding-left: 183px;
            background-position: 180px center;
        }
    
        .fm-header-r.fm-level-16 {
            padding-left: 195px;
            background-position: 192px center;
        }
    
        .fm-header-r.fm-level-17 {
            padding-left: 207px;
            background-position: 204px center;
        }
    
        .fm-header-r.fm-level-18 {
            padding-left: 219px;
            background-position: 216px center;
        }
    
        .fm-header-r.fm-level-19 {
            padding-left: 231px;
            background-position: 228px center;
        }
    
        .fm-header-r.fm-level-20 {
            padding-left: 243px;
            background-position: 240px center;
        }
    }
    
    /* collapsed / expanded */

    div.fm-collapsed,
    div.fm-expanded {
        cursor: pointer;
    }

    .fm-collapsed .fm-collapsed-icon,
    .fm-expanded .fm-expanded-icon {
        position: relative;
        display: inline-block;
        height: 12px;
        width: 11px;
    }

    .fm-collapsed .fm-collapsed-icon:before,
    .fm-expanded .fm-expanded-icon:before {
        top: 0;
        left: -4px;
    }

    .fm-collapsed .fm-collapsed-icon:before {
        content: "\e911";
    }   

    .fm-expanded .fm-expanded-icon:before {
        content: "\e90f";
    }

    /* sort */

    i.fm-icon.fm-sort-icon {
        cursor: pointer;
        right: 0;
        
        &:before {
            font-size: 17px;
        }

        &.fm-with-order span {
            color: @grid-filter-icon-color;
            font-size: 10px;
            font-weight: normal;
            line-height: 30px;
            margin-left: -4px;
        }
    }

    .fm-cell.fm-v-sort,
    .fm-cell.fm-h-sort {
        padding-right: 16px;
    }
    .fm-v-sort:not(.fm-live-filtering-header):hover .fm-v-sort-icon:before,
    .fm-v-sort.fm-live-filtering-header .fm-v-sort-icon:hover:before,
    .fm-v-sort .fm-v-sort-asc:before,
    .fm-v-sort .fm-v-sort-desc:before,
    .fm-h-sort:hover .fm-h-sort-icon:before,
    .fm-h-sort .fm-h-sort-asc:before,
    .fm-h-sort .fm-h-sort-desc:before {
        content: "\e90d";
    }
    .fm-v-sort:not(.fm-live-filtering-header):hover .fm-v-sort-icon-asc:before,
    .fm-v-sort.fm-live-filtering-header .fm-v-sort-icon-asc:hover:before {
        content: "\e90d";
        .rotate(180);
    }
    .fm-v-sort .fm-v-sort-asc:before {
         .rotate(180);
    }
    .fm-h-sort:hover .fm-h-sort-icon:before,
    .fm-h-sort .fm-h-sort-desc:before {
        right: 1px;
        .rotate(270);
    }
    .fm-h-sort .fm-h-sort-asc:before {
        right: 2px;
        .rotate(90);
    }

    /* drill down links */

    span.fm-hierarchy-link {
        white-space: nowrap;
        color: @grid-drilldown-link-text-color;
        font-size: 10px;
        text-decoration: underline;
        cursor: pointer;
        margin-left: 4px;
    }

    span.fm-hierarchy-link:before {
        text-indent: 0;
        margin-right: 2px;
        display:inline-block;
    }
    .fm-drilled-up span.fm-hierarchy-link:before {
        content: "+";
    }
    .fm-drilled-down span.fm-hierarchy-link:before {
        content: "-";
    }

    /* sheet headers */
    div.fm-sheet-header,
    .fm-filters div.fm-sheet-header {
        border-right: @grid-sheet-header-border-right;
        border-bottom: @grid-sheet-header-border-bottom;
        color: @grid-sheet-header-text-color;
        background-color: @grid-sheet-header-color;
        text-align: center;
        line-height: 23px;
        padding: 0 0;
    }

    .fm-sheet-headers .fm-sheet-header {
        display: inline-block;
    }

    /* KPI cells */
    div.fm-cell {
        &.fm-kpi:after {
            .fm-ui-icon;
            position: relative;
            color: @ui-border-color;
            font-size: 16px;
            padding-top: 3px;
        }
        &.fm-kpi-trend-bad-icon:after {
            content: "\ea3e";
        }
        &.fm-kpi-trend-risk-icon:after {
            content: "\ea3d";
        }
        &.fm-kpi-trend-ok-icon:after {
            content: "\ea3c";
        }
        &.fm-kpi-trend-rising-icon:after {
            content: "\ea3b";
        }
        &.fm-kpi-trend-good-icon:after {
            content: "\ea3a";
        }
        &.fm-kpi-status-bad-icon:after {
            content: "\e951";
        }
        &.fm-kpi-status-risk-icon:after {
            content: "\e954";
        }
        &.fm-kpi-status-ok-icon:after {
            content: "\e952";
        }
        &.fm-kpi-status-rising-icon:after {
            content: "\e953";
        }
        &.fm-kpi-status-good-icon:after {
            content: "\e950";
        }
    }

    /* member properties */
    div.fm-cell {
        .fm-member-property-label {
            font-style: italic;
        }
    }

    /* selection canvas */
    .fm-sheet-selection-canvas {
        position: absolute;
        background-color: @grid-selection-canvas-color;
        pointer-events: none;
        box-sizing: border-box;
        border: @grid-selection-canvas-border;
        z-index: 1;
    }

    .fm-sheet-selection-canvas.fm-clear-border {
        border: none;
    }

    .fm-sheet-selection-canvas.fm-clear-border-right {
        border-right: none;
    }

    .fm-sheet-selection-canvas.fm-clear-border-left {
        border-left: none;
    }

    .fm-sheet-selection-canvas.fm-clear-border-top {
        border-top: none;
    }

    .fm-sheet-selection-canvas.fm-clear-border-bottom {
        border-bottom: none;
    }

    .fm-auto-calculation-bar {
        position: absolute;
        background-color: @grid-auto-calculation-bar;
        opacity: 1;
        pointer-events: none;
        box-sizing: border-box;
        z-index: 2;
        height: 17px;
        overflow: hidden;
    }

    .fm-auto-calculation-bar .fm-auto-calculation-bar-conainer {
        overflow: hidden;
        white-space: nowrap;
    }

    .fm-auto-calculation-bar .fm-auto-calculation-bar-content {
        margin-left: 5px;
        margin-right: 5px;
        vertical-align: middle;
        display: inline-block;
    }

    .fm-auto-calculation-bar .fm-auto-calculation-bar-content-text {
        color: @grid-auto-calculation-bar-text-color;
        text-transform: uppercase;
        margin-right: 5px;
        float: left;
        font-size: 11px;
        line-height: 17px;
    }

    .fm-auto-calculation-bar .fm-auto-calculation-bar-content-results {
        color: @grid-auto-calculation-bar-text-results-color;
        font-weight: bold;
        display: inline-block;
        font-size: 11px;
        line-height: 17px;
    }

    .fm-sheet-selection-header {
        border: none;
    }

    /* flat view */
    &.fm-flat-view {
        .fm-filter-header {
            padding-left: 16px;

            i.fm-filter-icon {
                left: 0;
            }
        }
    } 
    
    /* live filtering  */
    .fm-live-filtering-header {
        div {
            position: relative;
            margin-top: 4px;
            
            .fm-ui-text-input {
                position: absolute;
                padding: 0 4px;
                height: 22px;
                top: 0;
                left: 0;
            }
        }
    }

    &.fm-compact-view, &.fm-classic-view {
        .fm-live-filtering-header {
            min-width: 100px;
            .fm-ui-text-input {
                width: ~"calc(100% + 16px)";
            }

            &.fm-filtered {
                .fm-ui-text-input {
                    width: ~"calc(100% + 31px)";
                }
            }
        }
    }

    &.fm-flat-view {
        .fm-filter-header.fm-live-filtering-header {
            padding: 7px;
            padding-bottom: 29px;
        
            &.fm-filtered {
                padding-right: 40px;
        
                .fm-ui-text-input {
                    width: ~"calc(100% + 23px)";
                }
            }
        }
    }
    
    /* resize handles */
    .fm-resize-handles {
        position: absolute;

        .fm-wrapper {
            position: relative;
            width: 100%;
            height: 100%;
        }

        .fm-indicator {
            border: 1px solid @grid-resize-handle-color;
            position: absolute;
            z-index: 1;
        }

        .fm-handle {
            position: absolute;
            z-index: 1;
            pointer-events: all;

            &:hover {
                border: 4px solid @grid-resize-handle-color;
            }

            &.fm-active {
                border: 4px solid @grid-resize-handle-color;
            }

            &:after {
                content:'';
                position: absolute;
                top: -5px;
                bottom: -5px; 
                left: -5px;
                right: -5px; 
            }
        }

        &.fm-cols-resize {
            .fm-handle {
                width: 7px;
                margin-left: -3px;
                height: 100%;
                min-height: 25px;
                cursor: col-resize;
            }
        }

        &.fm-rows-resize {
            .fm-handle {
                height: 7px;
                margin-top: -3px;
                width: 100%;
                min-width: 25px;
                cursor: row-resize;
            }
        }
    }
}


/*
 * 	Toolbar for Flexmonster Pivot Table & Charts Component
 */

#fm-toolbar-wrapper [class^="fm-"],
#fm-toolbar-wrapper [class*=" fm-"] {
    color: @theme-text-color;
    line-height: 1;
}

#fm-toolbar-wrapper [class^="fm-"] strong,
#fm-toolbar-wrapper [class*=" fm-"] strong {
    font-weight: bold;
}

#fm-toolbar-wrapper [class^="fm-"] a,
#fm-toolbar-wrapper [class*=" fm-"] a {
    text-decoration: none;
}

#fm-toolbar-wrapper [class^="fm-"] *, [class*=" fm-"] * {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

#fm-toolbar-wrapper [class^="fm-"] ul,
#fm-toolbar-wrapper [class^="fm-"] ol,
#fm-toolbar-wrapper [class^="fm-"] p,
#fm-toolbar-wrapper [class*=" fm-"] ul,
#fm-toolbar-wrapper [class*=" fm-"] ol,
#fm-toolbar-wrapper [class*=" fm-"] p {
    list-style: none;
    margin: 0;
    padding: 0;
}

#fm-toolbar-wrapper [class^="fm-icon-"]:before,
#fm-toolbar-wrapper [class*=" fm-icon-"]:before,
#fm-toolbar-wrapper .fm-icon:before {
    /* use !important to prevent issues with browser extensions that change fonts */
    font-family: 'flexmonster-icons' !important;
    speak-as: none;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    /* Better Font Rendering =========== */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-button-add .fm-icon:before,
#fm-toolbar-wrapper .fm-toolbar-ui .fm-button-add-large .fm-icon:before,
#fm-toolbar-wrapper .fm-toolbar-ui .fm-colorpick-btn .fm-icon,
#fm-toolbar-wrapper .fm-toolbar-ui .fm-cp-currentmark,
#fm-toolbar-wrapper .fm-toolbar-ui .fm-cp-currentmark:before {
    font-size: 30px;
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    -ms-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    -moz-transform: translate(-50%, -50%);
    -webkit-transform: translate(-50%, -50%);
    font-weight: normal;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-condition-row .fm-cr-delete {
    content: '';
    display: block;
    position: absolute;
    top: -42px;
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);
    -moz-transform: translateY(-50%);
    -webkit-transform: translateY(-50%);
}

/* TOOLBAR */
#fm-toolbar-wrapper {
    height: 80px;
}

    #fm-toolbar-wrapper #fm-toolbar {
        width: 100%;
        height: 80px;
        list-style: none;
        background: @toolbar-background-color;
        white-space: nowrap;
    }

        #fm-toolbar-wrapper #fm-toolbar,
        #fm-toolbar-wrapper #fm-toolbar div,
        #fm-toolbar-wrapper #fm-toolbar span,
        #fm-toolbar-wrapper #fm-toolbar p,
        #fm-toolbar-wrapper #fm-toolbar a,
        #fm-toolbar-wrapper #fm-toolbar table,
        #fm-toolbar-wrapper #fm-toolbar table th,
        #fm-toolbar-wrapper #fm-toolbar table tr,
        #fm-toolbar-wrapper #fm-toolbar table td,
        #fm-toolbar-wrapper #fm-toolbar ul,
        #fm-toolbar-wrapper #fm-toolbar li,
        #fm-toolbar-wrapper #fm-toolbar input,
        #fm-toolbar-wrapper #fm-toolbar textarea,
        #fm-toolbar-wrapper #fm-toolbar select {
            font-family: @font-family;
            font-size: @ui-label-font-size;
            color: @toolbar-text-color;
            text-align: left;
            padding: 0;
            margin: 0;
            font-weight: normal;
            text-shadow: none;
        }

            /* TABS */
            #fm-toolbar-wrapper #fm-toolbar > li {
                display: inline-block;
            }

            #fm-toolbar-wrapper #fm-toolbar li:before {
                content: none;
            }

            #fm-toolbar-wrapper #fm-toolbar .fm-dropdown-content li {
                float: none;
                width: 140px;
            }


#fm-toolbar-wrapper #fm-toolbar {
    .fm-toolbar-group-left {
        position: absolute;
        left: 0;
    }

    .fm-toolbar-group-right {
        position: absolute;
        right: 0;
    }

    li {
        cursor: pointer;

        svg {
            transform: translateZ(0);
            fill: @toolbar-icon-fill-border;

            .fill-border {
                fill: @toolbar-icon-fill-border;
            }

            .fill-background {
                fill: @toolbar-icon-fill-background;
            }
        }

        a:hover svg,
        li:hover > .fm-svg-icon > svg {
            fill: darken(@toolbar-icon-fill-border, 10%);

            .fill-border {
                fill: darken(@toolbar-icon-fill-border, 10%);
            }

            .fill-background {
                fill: darken(@toolbar-icon-fill-background, 10%);
            }
        }
    }

    > li,
    > .fm-toolbar-group-left > li,
    > .fm-toolbar-group-right > li {
        > a {
            .fm-svg-icon {
                position: absolute;
                text-align: center;
                bottom: 25px;
                width: 100%;
            }
            .fm-tab-label {
                position: absolute;
                top: 55px;
                left: 0;
                right: 0;
            }
        }
    }

    .fm-dropdown-content {
        li {
            height: 36px;

            .fm-svg-icon {
                position: absolute;
                left: 0;
                right: 0;

                svg {
                    width: 36px;
                    height: 36px;
                }
            }

            .fm-tab-label {
                display: inline-block;
                padding: 12px 0px;
                padding-left: 36px;
                max-width: 200px;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
            }

            .fm-tab-checkbox {
                &:before {
                    content: '';
                    display: inline-block;
                    box-sizing: border-box;
                    position: absolute;
                    left: 10px;
                    top: 9px;
                    width: 18px;
                    height: 18px;
                    border: @ui-element-border;
                    background: @background-ui-element-base-color;
                }
    
                &:before:hover {
                    border-color: @ui-border-color;
                }
    
                &:after {
                    .fm-ui-icon;
                    left: 10px;
                    top: 8px;
                    opacity: 0;
                    content: '\e947';
                    color: @ui-element-checkbox-color;
                    font-size: 18px;
                }
        
                
            }

            &.fm-selected {
                .fm-tab-checkbox:after {
                    opacity: 1;
                    font-weight: @ui-element-checkbox-font-weight;
                    width: 0;
                }
    
                .fm-tab-checkbox:before {
                    border: 1px solid @ui-background-dark;
                    background: @ui-background-dark;
                }
            }
        } 
    }

    #fm-tab-charts-multiple {
        border-top: @toolbar-dropdown-element-divider;
        > span.fm-tab-checkbox {
            position: absolute;
        }
    }
}

#fm-toolbar-wrapper #fm-toolbar li#fm-tab-fullscreen {
    width: 70px;
}

#fm-toolbar-wrapper .fm-list-wrapper.fm-mobile #fm-toolbar {
    overflow-x: auto;
}

#fm-toolbar-wrapper.fm-mobile #fm-toolbar {
    li#fm-tab-format-conditional {
        width: 80px;
    }
    li#fm-tab-charts-bar-stack {
        width: 80px;
    }
}

/* Tabs */
#fm-toolbar-wrapper #fm-toolbar li {
    display: inline-block;
    background: none;
    vertical-align: top;
    padding: 0;
    position: static;
    width: 57px;
}

#fm-toolbar-wrapper #fm-toolbar a {
    height: 80px;
    display: block;
    text-decoration: none;
    border: none;
    position: relative;
}

    #fm-toolbar-wrapper #fm-toolbar a > span {
        text-align: center;
        text-overflow: ellipsis;
        overflow: hidden;
        height: 15px;
    }

#fm-toolbar-wrapper #fm-toolbar li:first-child a {
    margin-left: 1px;
}

#fm-toolbar-wrapper #fm-toolbar li.fm-divider {
    width: 0px;
    margin: 20px 15px 0px 15px;
    height: 40px;
    border-right: @ui-border-light;
}

#fm-toolbar-wrapper .fm-list-wrapper.fm-mobile #fm-toolbar li.fm-divider {
    display: none;
}

#fm-toolbar-wrapper #fm-toolbar li.fm-v-divider {
    height: 0px;
    width: 140px;
    border-bottom: @toolbar-dropdown-element-divider;
}

/* Tab menu */
#fm-toolbar-wrapper #fm-toolbar .fm-dropdown {
    position: absolute;
    display: none;
    top: 80px;
    z-index: 25;
}

#fm-toolbar-wrapper #fm-toolbar .fm-opened .fm-dropdown {
    display: block;
}

#fm-toolbar-wrapper #fm-toolbar .fm-dropdown-content:after {
    content: '';
    border-width: 5px;
    border-color: transparent transparent @background-ui-element-base-color;
    border-style: outset outset solid;
    border-style: solid;
    top: -10px;
    left: 23px;
    width: 0;
    height: 0;
    position: absolute;
}

#fm-toolbar-wrapper #fm-toolbar .fm-dropdown-content:before {
    content: '';
    border-color: transparent transparent @ui-element-border-color;
    border-style: outset outset solid;
    border-width: 6px;
    position: absolute;
    top: -12px;
    left: 22px;
}

#fm-toolbar-wrapper #fm-toolbar .fm-dropdown-scrollable-left:after {
    left: 1px;
}

#fm-toolbar-wrapper #fm-toolbar .fm-dropdown-scrollable-left:before {
    left: 0px;
}

#fm-toolbar-wrapper #fm-toolbar .fm-align-right .fm-dropdown-content:after {
    left: inherit;
    right: 20px;
}

#fm-toolbar-wrapper #fm-toolbar .fm-align-right .fm-dropdown-content:before {
    left: inherit;
    right: 19px;
}


#fm-toolbar-wrapper #fm-toolbar .fm-dropdown-scrollable-right:after {
    left: inherit;
    right: 0px;
}

#fm-toolbar-wrapper #fm-toolbar .fm-dropdown-scrollable-right:before {
    left: inherit;
    right: -1px;
}

#fm-toolbar-wrapper #fm-toolbar .fm-dropdown-content {
    padding: 0;
    list-style: none;
    background: @toolbar-dropdown-background-color;
    border: @toolbar-dropdown-border;
    display: flex;
    flex-direction: column;
    overflow-x: auto;
    overflow-y: hidden;
}

    #fm-toolbar-wrapper #fm-toolbar .fm-dropdown-content li {
        width: 100%;
        padding-right: 6px;
        min-width: 120px;

        &:hover {
            background-color: @toolbar-dropdown-element-hover;
        }
    }

    // #fm-toolbar-wrapper #fm-toolbar .fm-dropdown-content a {
    //     text-shadow: none;
    //     text-align: left;
    //     padding: 0;
    //     margin: 0px 1px 1px 1px;
    //     height: 37px;
    // }

    // #fm-toolbar-wrapper #fm-toolbar .fm-dropdown-content li:first-child {
    //     margin-top: 1px;
    // }

    /*#fm-toolbar-wrapper #fm-toolbar .fm-dropdown-content a.disabled {
        pointer-events: none;
        cursor: default;
        color: #AAA;
    }*/


    // #fm-toolbar-wrapper #fm-toolbar .fm-dropdown-content li span {
    //     display: inline;
    //     position: absolute;
    //     left: 36px;
    //     right: 0;
    //     bottom: 11px;
    //     text-overflow: ellipsis;
    //     overflow: hidden;
    //     text-align: left;
    // }

/* POPUP WINDOW */
#fm-toolbar-wrapper div.fm-popup {
    position: absolute;
    min-width: 270px;
    z-index: 100;
    font-family: @font-family;
    max-width: 100%;
    background: @background-base-color;
    border: @ui-pop-up-border;
    margin: 0 auto;
    -webkit-box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    padding: 24px 30px 24px 30px;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

#fm-toolbar-wrapper div.fm-popup.fm-popup-w700 {
    width: 700px;
}

#fm-toolbar-wrapper div.fm-popup.fm-popup-w570 {
    width: 570px;
}

#fm-toolbar-wrapper div.fm-popup.fm-popup-w500 {
    width: 500px;
}

#fm-toolbar-wrapper div.fm-popup.fm-popup-w460 {
    width: 462px;
}

#fm-toolbar-wrapper div.fm-panel .fm-toolbox {
    margin-top: 30px;
    text-align: center;
}

#fm-toolbar-wrapper div.fm-panel .fm-title-bar .fm-toolbox {
    flex: 1;
    margin-top: 0;
    min-width: fit-content;
    width: fit-content;
    float: right;
    text-align: right;
    margin-left: 30px;
}

#fm-toolbar-wrapper div.fm-panel .fm-toolbox .fm-ui-btn {
     height: 38px;
     max-width: ~"calc((100% - 83px) / 2)";
     max-width: ~"-webkit-calc((100% - 83px) / 2)";
     margin-right: 20px;
}

#fm-toolbar-wrapper div.fm-panel .fm-toolbox .fm-ui-btn:last-child {
    margin-right: 0px;
}

#fm-toolbar-wrapper div.fm-panel .fm-toolbox.fm-ui-col .fm-ui-btn:last-child {
    float: right;
}

#fm-toolbar-wrapper div.fm-panel .fm-panel-content {
    position: relative;
    
    .fm-title-bar {
        display: flex;
        justify-content: center;
        clear: both;
        margin-bottom: 24px;

        .fm-title-text {
            color: @ui-title-color;
            font-size: @ui-title-font-size;
            text-align: center;
            text-shadow: none;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            padding: 5px 0;

            &.fm-ui-col {
                text-align: left;
                flex: 1;
            }
        }
    }
} 

#fm-toolbar-wrapper .fm-popup-modal-overlay {
    z-index: 20;
}

    #fm-toolbar-wrapper .fm-popup-modal-overlay .fm-modal-overlay {
        opacity: 0;
    }

#fm-toolbar-wrapper div.fm-modal-overlay {
    background: rgba(255, 255, 255, 0.7);
    position: absolute;
    top: 0;
    left: 0;
    z-index: 10;
    width: 100%;
    height: 100%;
}

#fm-toolbar-wrapper .fm-portrait-radio {
    margin-left: 14px;
}

#fm-toolbar-wrapper .fm-landscape-radio {
    margin-left: 14px;
}

#fm-toolbar-wrapper div.fm-panel.fm-popup {
    &.fm-layout-mobile {
        padding: 20px;

        .fm-panel-content {
            .fm-title-bar {
                display: flex;
                flex-direction: column;
                
                .fm-title-text.fm-ui-col {
                    max-width: none !important;
                    width: 100%;
                    font-size: @ui-title-font-size-smaller;
                    margin-bottom: 10px;
                }
            }

            .fm-toolbox {
                display: flex;
                max-width: none !important;
                width: auto !important;
                margin-left: 0;

                .fm-ui-btn:not(.fm-button-add) {
                    max-width: none;
                    flex: 1;
                }
            }
        } 
    }
}

/* Conditional formatting */
#fm-toolbar-wrapper .fm-popup-conditional {
    width: 610px;
    min-width: 400px;

    .fm-toolbox {
        max-width: 54% !important;
        width: 54% !important;
    }

    .fm-title-text {
        max-width: 46% !important;
        width: ~"-webkit-calc(100% - 270px)";
        width: ~"calc(100% - 270px)";
    }

    .fm-popup-content {
        overflow-x: hidden;
        overflow-y: auto;
        /*min-height: 149px;*/
        max-height: 298px;
        width: 100%;
    }

    .fm-ui-btn.fm-button-add {
        min-width: 40px;
        width: 40px;
    }

    .fm-condition-row {
        border-top: @ui-border-light;
        padding: 30px 30px;
        margin-left: -30px;
        width: ~"-webkit-calc(100% + 60px)";
        width: ~"calc(100% + 60px)";

        .fm-wrap-relative {
            position: relative;
        }

        .fm-cr-delete {
            position: absolute;
            color: @ui-icon-color;
            cursor: pointer;
            font-size: 30px;
            right: 0;
        }

        .fm-cr-delete:hover {
            color: @ui-icon-color-dark;
        }

        .fm-values {
            width: ~"calc(100% - 390px)";
            width: ~"-webkit-calc(100% - 390px)";
        }

        .fm-conditions {
            width: 150px;
        }

        .fm-font-family {
            width: ~"calc(100% - 390px)";
            width: ~"-webkit-calc(100% - 390px)";
        }

        .fm-font-size {
            width: 100px;
        }

        .fm-sample {
            width: 120px;
        }
    }

    &.fm-layout-mobile {
        .fm-values {
            width: ~"calc(100% - 100px)";
            width: ~"-webkit-calc(100% - 100px)";
            margin-bottom: 10px;
        }

        .fm-conditions {
            width: ~"calc(100% - 230px)";
            width: ~"-webkit-calc(100% - 230px)";
            margin-left: 60px;
        }

        .fm-font-family {
            width: ~"calc(100% - 100px)";
            width: ~"-webkit-calc(100% - 100px)";
            margin-bottom: 10px;
        }

        .fm-font-size {
            width: ~"calc(100% - 230px)";
            width: ~"-webkit-calc(100% - 230px)";
            margin-left: 60px;
        }

        .fm-sample {
            width: 70px;
        }

        .fm-cr-delete {
            top: -90px;
        }
    }
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-cr-inner {
  font-size: 0;
  margin-bottom: 10px;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-cr-inner:nth-child(2) {
  margin-bottom: 0;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-cr-inner .fm-cr-lbl {
  display: inline-block;
  vertical-align: top;
  color: @ui-label-color-light;
  font-size: @ui-label-font-size;
  margin-right: 10px;
  text-align: right;
  padding: 11px 0;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-cr-inner .fm-cr-lbl:last-child {
  margin-right: 0;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-cr-inner .fm-ui-dropdown,
#fm-toolbar-wrapper .fm-toolbar-ui .fm-number-inp, 
#fm-toolbar-wrapper .fm-toolbar-ui .fm-cr-inner .fm-inp, 
#fm-toolbar-wrapper .fm-toolbar-ui .fm-cr-inner .fm-colorpick-wrap {
  display: inline-block;
  vertical-align: top;
  margin-right: 10px;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-cr-inner .fm-ui-dropdown:last-child, 
#fm-toolbar-wrapper .fm-toolbar-ui .fm-cr-inner .fm-number-inp:last-child, 
#fm-toolbar-wrapper .fm-toolbar-ui .fm-cr-inner .fm-inp:last-child, 
#fm-toolbar-wrapper .fm-toolbar-ui .fm-cr-inner .fm-colorpick-wrap:last-child {
  margin-right: 0;
}

#fm-toolbar-wrapper .fm-icon-act_trash:before {
    content: "\e903";
}

#fm-toolbar-wrapper .fm-toolbar-ui span.fm-and-label {
    display: inline-block;
    text-align: center;
    padding: 12px 0;
}

/* GENERAL */

#fm-toolbar-wrapper div.fm-popup input[type=text],
#fm-toolbar-wrapper div.fm-popup input[type=number],
#fm-toolbar-wrapper div.fm-popup input[type=password] {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    border: @ui-element-border;
    background-color: @background-ui-element-base-color;
    height: 38px;
    padding: 0 9px;
    color: @ui-element-text-color;
    font-size: @ui-element-font-size;
    width: 100%;
    -webkit-appearance: none;
    border-radius: 0px;
    -moz-box-shadow: none;
    -webkit-box-shadow: none;
    box-shadow: none;
    margin: 0;
    text-align: left;
    font-family: @font-family;
}

#fm-toolbar-wrapper div.fm-popup input:disabled {
    opacity: 0.5;
    filter: alpha(opacity=50);
    -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
    background-color: @background-ui-element-base-color;
}

#fm-toolbar-wrapper div.fm-popup input.fm-half-input {
    padding-right: 0;
    border-right: none;
}

#fm-toolbar-wrapper .fm-toolbar-ui select {
    border: @ui-element-border;
    background-color: @background-ui-element-base-color;
    -webkit-appearance: none;
    -moz-appearance: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    border-radius: 0px;
    margin: 0;
    outline: none;
    height: 38px;
    font-size: @ui-element-font-size;
    font-family: @font-family;
    width: 100%;
    color: @ui-element-text-color;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    padding: 4px 35px 4px 10px;
    cursor: pointer;
}

#fm-toolbar-wrapper .fm-toolbar-ui div.fm-ui-dropdown {

    position: static;

    .fm-ui-dropdown-btn {
        font-size: 14px;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
    }
    
    .fm-ui-dropdown-list {
        position: absolute;
        margin-top: 6px;
        min-width: auto;
        min-width: initial;
        
        li {
            font-size: 14px;
        }
    }

    &.fm-opened .fm-ui-dropdown-list {
        visibility: visible;
    }
}

#fm-toolbar-wrapper div.fm-popup select::-ms-expand {
    display: none;
}

#fm-toolbar-wrapper div.fm-popup select:disabled {
    opacity: 0.5;
    filter: alpha(opacity=50);
    -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";
    cursor: none;
    pointer-events: none;
}

#fm-toolbar-wrapper div.fm-popup select * {
    margin: 0 !important;
}

#fm-toolbar-wrapper div.fm-popup select option.placeholder {
    color: white;
    font-size: 0px;
    display: none;
}

#fm-toolbar-wrapper div.fm-clear {
    clear: both;
}

/* Hack for Firefox */
@-moz-document url-prefix() {
    #fm-toolbar-wrapper select {
        text-indent: 0;
    }
}

/* COLOR PICKER */
#fm-toolbar-wrapper .fm-toolbar-ui .fm-colorpick-btn {
  border: @ui-element-border;
  height: 38px;
  position: relative;
  font-size: 28px;
  cursor: pointer;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-colorpick-btn span {
    font-size: 28px;
}

#fm-toolbar-wrapper .fm-icon-act_font:before {
  content: "\e906";
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-colorpick-popup {
  background: @background-base-color;
  width: 396px;
  padding: 30px 30px;
  border: @ui-element-border;
  position: absolute;
  -webkit-transition: opacity 0.3s;
  transition: opacity 0.3s;
  display: none;
  left: 50%;
  margin-left: -178px;
  margin-top: -5px;
  z-index: 99;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-colorpick-popup:before,
#fm-toolbar-wrapper .fm-toolbar-ui .fm-colorpick-popup:after {
    content: '';
    display: block;
    position: absolute;
    left: 50%;
    -ms-transform: translateX(-50%);
    transform: translateX(-50%);
    -moz-transform: translateX(-50%);
    -webkit-transform: translateX(-50%);
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-colorpick-popup:before {
  width: 0px;
  height: 0px;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-colorpick-popup:after {
  width: 0px;
  height: 0px;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-colorpick-popup.fm-arrow-up:before {
  top: -6px;
  border-left: 5.5px solid transparent;
  border-right: 5.5px solid transparent;
  border-bottom: 6px solid @ui-element-border-color;
  border-top: 0 solid transparent;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-colorpick-popup.fm-arrow-up:after {
  top: -5px;
  border-left: 4.5px solid transparent;
  border-right: 4.5px solid transparent;
  border-bottom: 5px solid #fff;
  border-top: 0 solid transparent;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-colorpick-popup.fm-arrow-down:before {
    bottom: -6px;
    border-left: 5.5px solid transparent;
    border-right: 5.5px solid transparent;
    border-top: 6px solid @ui-element-border-color;
    border-bottom: 0 solid transparent;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-colorpick-popup.fm-arrow-down:after {
    bottom: -5px;
    border-left: 4.5px solid transparent;
    border-right: 4.5px solid transparent;
    border-top: 5px solid @background-base-color;
    border-bottom: 0 solid transparent;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-popup-opened .fm-colorpick-popup {
  display: block;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-color-targ-switch {
  border: @ui-border-light;
  font-size: 0;
  margin-bottom: 20px;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-color-targ-switch .fm-cts-item {
  display: inline-block;
  vertical-align: top;
  width: 50%;
  border: none;
  border-right: @ui-border-light;
  line-height: 38px;
  font-weight: bold;
  color: @ui-btn-toggle-text-color;
  background: @background-ui-element-base-color;
  text-transform: uppercase;
  text-align: center;
  font-size: 14px;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-color-targ-switch .fm-cts-item.fm-current {
  color: @ui-btn-toggle-selected-text-color;
  background: @ui-background-light;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-color-targ-switch .fm-cts-item:hover {
  color: @ui-btn-toggle-selected-text-color;
  background: @ui-btn-color-hover;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-color-targ-switch .fm-cts-item:last-child {
  border-right: none;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-cp-sett-row {
  margin-bottom: 20px;
  font-size: 0;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-cp-sett-row .fm-cp-curr-color {
  border: @ui-element-border;
  height: 38px;
  cursor: pointer;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-cp-2-colors-width.fm-cp-2-colors-width {
    width: ~"calc(50% - 5px)";
    width: ~"-webkit-calc(50% - 5px)";
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-cp-sett-row .fm-cp-2-colors {
  border: @ui-border-light;
  font-size: 0;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-cp-sett-row .fm-cp-2-colors .fm-cp2c-item {
  height: 36px;
  cursor: pointer;
  border-right: @ui-border-light;
  display: inline-block;
  vertical-align: top;
  width: 50%;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-cp-sett-row .fm-cp-2-colors .fm-cp2c-item:last-child {
  border-right: none;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-cp-sett-row .fm-inp, .fm-cp-sett-row .fm-cp-curr-color, .fm-cp-sett-row .fm-cp-2-colors {
  display: inline-block;
  vertical-align: top;
  margin-right: 10px;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-cp-sett-row .fm-inp:last-child, .fm-cp-sett-row .fm-cp-curr-color:last-child, .fm-cp-sett-row .fm-cp-2-colors:last-child {
  margin-right: 0;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-cp-btns-row {
    margin-top: 20px;

    .fm-ui-btn {
        width: ~"calc(50% - 5px)";
        width: ~"-webkit-calc(50% - 5px)";
        margin-right: 10px;

        &:last-child {
            margin-right: 0;
        }
    }
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-cp-currentmark {
  border-radius: 50%;
  width: 20px;
  height: 20px;
  background: #555;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-cp-currentmark:before {
  color: #fff;
  font-size: 20px;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-row-10colors {
  font-size: 0;
  margin-bottom: 20px;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-row-10colors .fm-r10c-item {
  content: "";
  display: inline-block;
  vertical-align: top;
  position: relative;
  cursor: pointer;
  height: 36px;
  width: ~"-webkit-calc(10% - 1px)";
  width: ~"calc(10% - 1px)";
  margin-right: 1px;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-row-10colors .fm-r10c-item:before,
#fm-toolbar-wrapper .fm-toolbar-ui .fm-row-10colors .fm-r10c-item:after {
    content: '';
    display: block;
    position: absolute;
    left: 50%;
    -ms-transform: translateX(-50%);
    transform: translateX(-50%);
    -moz-transform: translateX(-50%);
    -webkit-transform: translateX(-50%);
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-row-10colors .fm-r10c-item.fm-r10c-white-arrow {
    border-top: 1px solid @ui-border-color-superlight;
    border-bottom: 1px solid @ui-border-color-superlight;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-row-10colors .fm-r10c-item.fm-r10c-white-arrow.fm-current:before {
    bottom: -11px;
    border-left: 17px solid transparent;
    border-right: 17px solid transparent;
    border-top: 11px solid @ui-border-color-superlight;
    border-bottom: 0 solid transparent;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-row-10colors .fm-r10c-item.fm-r10c-white-arrow.fm-current:after {
    bottom: -10px;
    border-left: 16px solid transparent;
    border-right: 16px solid transparent;
    border-top: 10px solid #fff;
    border-bottom: 0 solid transparent;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-row-10colors .fm-r10c-item .fm-r10c-arrow {
  position: absolute;
  top: 100%;
  border-style: solid;
  border-top-width: 10px;
  border-left: 16px solid transparent;
  border-right: 16px solid transparent;
  border-bottom: none;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-row-10colors .fm-r10c-item .fm-cp-currentmark {
  margin-top: 2px;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-row-10colors .fm-r10c-item .fm-r10c-arrow, 
#fm-toolbar-wrapper .fm-toolbar-ui .fm-row-10colors .fm-r10c-item .fm-cp-currentmark {
  opacity: 0;
  visibility: hidden;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-row-10colors .fm-r10c-item:nth-child(10n+10) {
  margin-right: 0;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-row-10colors .fm-r10c-item.fm-current .fm-r10c-arrow,
#fm-toolbar-wrapper .fm-toolbar-ui .fm-row-10colors .fm-r10c-item.fm-current .fm-cp-currentmark {
  opacity: 1;
  visibility: visible;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-row-4colors {
  font-size: 0;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-row-4colors .fm-r4c-item {
  display: inline-block;
  vertical-align: top;
  margin-right: 1px;
  margin-bottom: 1px;
  position: relative;
  cursor: pointer;
  height: 36px;
  width: ~"-webkit-calc(25% - 0.75px)";
  width: ~"calc(25% - 0.75px)";

  &.fm-white-shade {
      border-top: 1px solid @ui-border-color-superlight;
      border-left: 1px solid @ui-border-color-superlight;
  }
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-row-4colors .fm-r4c-item:nth-child(4n+4) {
  margin-right: 0;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-row-4colors .fm-r4c-item .fm-cp-currentmark {
  opacity: 0;
  visibility: hidden;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-row-4colors .fm-r4c-item.fm-current .fm-cp-currentmark {
  opacity: 1;
  visibility: visible;
}

#fm-toolbar-wrapper .fm-list-wrapper.fm-mobile {
    overflow-x: auto;
}

#fm-toolbar-wrapper .fm-list-wrapper.fm-one-arrow-scroll {
    width: ~"calc(100% - 25px) !important";
}

#fm-toolbar-wrapper .fm-list-wrapper.fm-two-arrow-scroll {
    width: ~"calc(100% - 50px) !important";
}

#fm-toolbar-wrapper .fm-list-wrapper,
#fm-toolbar-wrapper .fm-left-scroll-button,
#fm-toolbar-wrapper .fm-right-scroll-button {
    float: left;
    position: relative;
}

#fm-toolbar-wrapper .fm-left-scroll-button.fm-scroll-arrow {
    margin-top: 15px;
    margin-right: 5px;
    width: 0;
    height: 0;
    border-top: 25px solid transparent;
    border-bottom: 25px solid transparent;
    border-right: 20px solid @ui-icon-color-dark;
}
#fm-toolbar-wrapper .fm-right-scroll-button.fm-scroll-arrow {
    margin-top: 15px;
    margin-left: 5px;
    width: 0;
    height: 0;
    border-top: 25px solid transparent;
    border-bottom: 25px solid transparent;
    border-left: 20px solid @ui-icon-color-dark;
}
#fm-toolbar-wrapper .fm-right-scroll-button.fm-mobile-scroll-not-active,
#fm-toolbar-wrapper .fm-left-scroll-button.fm-mobile-scroll-not-active {
    opacity: 0.2;
}

/* new ui */
#fm-toolbar-wrapper .fm-radio-wrap label:before,
#fm-toolbar-wrapper .fm-radio-wrap label:after {
    content: '';
    display: block;
    position: absolute;
    top: 50%;
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);
    -moz-transform: translateY(-50%);
    -webkit-transform: translateY(-50%);
}

#fm-toolbar-wrapper .fm-toolbar-ui div.fm-title-2 {
  color: @ui-subtitle-color;
  font-size: @ui-subtitle-font-size;
  text-transform: uppercase;
  margin-bottom: 25px;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-radiobtn-list {
  margin-bottom: 52px;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-radiobtn-list:last-child {
  margin-bottom: 0;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-radiobtn-list li {
  margin-bottom: 12px;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-radio-wrap label {
  display: inline-block;
  cursor: pointer;
  color: @ui-element-text-color;
  font-size: @ui-element-font-size;
  padding: 4px 0;
  padding-left: 35px;
  position: relative;
  line-height: 1.2;
}

    #fm-toolbar-wrapper .fm-toolbar-ui .fm-radio-wrap label:before {
        width: 22px;
        height: 22px;
        border: @ui-element-border;
        background: @background-ui-element-base-color;
        left: 0;
        border-radius: 50%;
    }

#fm-toolbar-wrapper .fm-toolbar-ui .fm-radio-wrap label:after {
  border: 7px solid @ui-background-dark;
  background-color: @ui-background-dark;
  border-radius: 50%;
  opacity: 0;
  width: 0;
  height: 0;
  left: 5px;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-radio-wrap label:hover:before {
  border-color: @ui-border-color;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-radio-wrap input {
  display: none;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-radio-wrap input:checked + label {
  font-weight: bold;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-radio-wrap input:checked + label:after {
  opacity: 1;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-inp-group {
  margin-bottom: 30px;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-inp-group:last-child {
  margin-bottom: 0;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-inp-row {
  margin-bottom: 10px;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-inp-row label {
  color: @ui-label-color-light;
  font-size: @ui-label-font-size;
  margin-bottom: 8px;
  display: block;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-inp-row .fm-ui-dropdown, 
#fm-toolbar-wrapper .fm-toolbar-ui .fm-inp-row .fm-inp {
  width: 100%;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-inp-row:last-child {
  margin-bottom: 0;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-ir-horizontal {
  font-size: 0;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-ir-horizontal label {
  margin-bottom: 0;
  width: 140px;
  margin-right: 20px;
  display: inline-block;
  vertical-align: middle;
  text-align: right;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-ir-horizontal .fm-ui-dropdown, 
#fm-toolbar-wrapper .fm-toolbar-ui .fm-ir-horizontal .fm-inp {
  width: ~"-webkit-calc(100% - 160px)";
  width: ~"calc(100% - 160px)";
  display: inline-block;
  vertical-align: middle;
  background-color: @background-ui-element-base-color;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-uc {
    text-transform: uppercase;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-button-add {
  padding-right: 30px;
  min-width: auto;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-button-add-large {
    padding-left: 36px;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-button-add .fm-icon {
  color: @ui-icon-color;
  position: absolute;
  right: 0;
  width: 40px;
  height: 100%;
  top: 0;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-button-add-large .fm-icon {
    color: @ui-icon-color;
    position: absolute;
    left: 0;
    width: 40px;
    height: 100%;
    top: 0;
  }

#fm-toolbar-wrapper .fm-toolbar-ui .fm-button-add:hover .fm-icon,
#fm-toolbar-wrapper .fm-toolbar-ui .fm-button-add-large:hover .fm-icon {
  color: @ui-icon-color-dark;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-popup-content .fm-popup-placeholder {
    text-align: center;
    margin: 40px 0;

    .fm-popup-placeholder-text {
        text-align: center;
        margin-bottom: 9px;
        font-size: 16px;
        color: @ui-label-color-light;
    }
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-icon-act_add:before {
  content: "\ea0a";
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-icon-act_check:before {
  content: "\e902";
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-width20.fm-width20 {
  width: 20px;
}


#fm-toolbar-wrapper .fm-toolbar-ui .fm-width40.fm-width40 {
  width: 40px;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-width45.fm-width45 {
  width: 45px;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-width50.fm-width50 {
  width: 50px;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-width85.fm-width85 {
  width: 85px;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-width120.fm-width120 {
  width: 120px;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-width140.fm-width140 {
  width: 140px;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-width180.fm-width180 {
  width: 180px;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-width200.fm-width200 {
  width: 200px;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-width210.fm-width210 {
  width: 210px;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-width220.fm-width220 {
  width: 220px;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-width230.fm-width230 {
  width: 230px;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-width240.fm-width240 {
  width: 240px;
}

#fm-toolbar-wrapper .fm-toolbar-ui .fm-width250.fm-width250 {
  width: 250px;
}

/* Connect to OLAP */
#fm-toolbar-wrapper .fm-popup-olap {
    .fm-ir-horizontal label {
        width: 110px;
    }

    .fm-ir-horizontal .fm-ui-dropdown {
        width: ~"-webkit-calc(100% - 130px)";
        width: ~"calc(100% - 130px)";
        vertical-align: middle;
    }

    input.fm-inp.fm-inp-proxy-url {
        width: ~"-webkit-calc(100% - 230px)";
        width: ~"calc(100% - 230px)";
    }

    .fm-btn-connect {
        width: 100px;
        height: 38px;
        padding-left: 0;
        padding-right: 0;
        border-top-left-radius: 0;
        border-bottom-left-radius: 0;
    }

    &.fm-layout-mobile-small {
        .fm-ir-horizontal {
            label {
                text-align: left;
                width: 100%;
            }

            .fm-ui-dropdown {
                width: 100%;
            }
        }

        input.fm-inp.fm-inp-proxy-url {
            width: ~"-webkit-calc(100% - 100px)";
            width: ~"calc(100% - 100px)";
        }
    }
}

/* Format cells */
#fm-toolbar-wrapper .fm-popup-format-cells {
    width: 480px;

    &.fm-layout-mobile-small {
        .fm-ir-horizontal {
            label {
                text-align: left;
                width: 100%;
            }

            .fm-ui-dropdown, .fm-inp {
                width: 100%;
            }
        }
    }
}

#fm-toolbar-wrapper .fm-hide {
    display: none;
}

/* Options */
#fm-toolbar-wrapper .fm-popup-options {
    width: 570px;
    min-width: 320px;
}

/* layouts */
#fm-toolbar-wrapper {
    &.fm-layout-700 #fm-toolbar {
        .fm-divider {
            display: none;
        }
    }
    #fm-toolbar.fm-scroll-toolbar {
        -ms-overflow-style: none;  /* Internet Explorer 10+ */
        scrollbar-width: none;  /* Firefox */
        overflow-x: hidden;
        overflow-y: auto;
    }
    #fm-toolbar.fm-scroll-toolbar::-webkit-scrollbar {
        display: none;  /* Safari and Chrome */
    }
}

.fm-resize-triggers {
    visibility: hidden;
    opacity: 0;
}

.fm-resize-triggers, 
.fm-resize-triggers > div, 
.fm-contract-trigger:before {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.fm-resize-triggers > div {
    background: #eee;
    overflow: auto;
}

.fm-contract-trigger:before {
    width: 200%;
    height: 200%;
}

#fm-pivot-view {
    .fm-resizable-handle {
        position: absolute;
        

        &.fm-left {
            left: 0;
            top: 0;
            bottom: 0;
            width: 5px;
            cursor: w-resize;
        }

        &.fm-right {
            right: 0;
            top: 0;
            bottom: 0;
            width: 5px;
            cursor: e-resize;
        }

        &.fm-top {
            top: 0;
            left: 0;
            right: 0;
            height: 5px;
            cursor: n-resize;
        }

        &.fm-bottom {
            bottom: 0;
            left: 0;
            right: 0;
            height: 5px;
            cursor: s-resize;
        }
    } 
}

// custom scrollbars for macOS
#fm-pivot-view {
    .fm-scrollbars::-webkit-scrollbar {
        -webkit-appearance: none;
        width: 7px;
        height: 7px;
        background-color: rgba(0, 0, 0, 0);
    }
    .fm-scrollbars::-webkit-scrollbar-thumb {
        background: rgba(0, 0, 0, 0.5);
        border-radius: 5px;
    }
    .fm-scrollbars::-webkit-scrollbar-track {
        background: transparent;
        background-color: rgba(0, 0, 0, .05);
    }
    .fm-scrollbars::-webkit-scrollbar-corner {
        background-color: rgba(0, 0, 0, .05);
    }
}

#fm-pivot-view.fm-accessibility,
#fm-toolbar-wrapper.fm-accessibility {
    :focus,
    a.fm-ui-btn:focus {
        outline: dashed @theme-color 2px ;
        outline-offset: -2px;
    }

    a.fm-ui-btn:focus,
    .fm-grid-view:focus {
        outline-offset: 0;
    }

    .fm-grid-layout:focus .fm-sheet-selection-canvas {
        border: 2px dashed @theme-color;

        &.fm-sheet-selection-header,
        &.fm-clear-border {
            border: none;
        }
    
        &.fm-clear-border-right {
            border-right: none;
        }
    
        &.fm-clear-border-left {
            border-left: none;
        }
    
        &.fm-clear-border-top {
            border-top: none;
        }
    
        &.fm-clear-border-bottom {
            border-bottom: none;
        }
    }
}

.fm-keyboard-mode {
    #fm-pivot-view,
    #fm-toolbar-wrapper {
    
        :focus,
        a.fm-ui-btn:focus,
        button.fm-ui-btn:focus,
        select:focus,
        input.fm-ui:focus,
        .fm-ui-dropdown-btn:focus,
        .fm-ui-dropdown-list li.fm-current,
        .fm-ui-dropdown-list li.fm-ui-active,
        .fm-dropdown-content li.fm-current,
        .fm-ui-list:focus li.fm-ui-active,
        .fm-ui-vlist:focus li.fm-ui-active,
        .fm-calculated-view .fm-popup-content .fm-func-btn-group button.fm-calc-action:focus {
            outline: dashed @theme-text-color 2px;
            outline-offset: -2px;
        }
    
        a.fm-ui-btn:focus,
        button.fm-ui-btn:focus,
        .fm-grid-view:focus,
        select:focus,
        .fm-calculated-view .fm-popup-content .fm-func-btn-group .fm-calc-action:focus,
        .fm-colorpick-btn,
        .fm-r10c-item,
        .fm-r4c-item,
        .fm-calculated-view .fm-popup-content .fm-func-btn-group button.fm-calc-action:focus {
            outline-offset: 0;
    
            &.fm-btn-add-measure-2 {
                outline-offset: -2px;
            }
        }
    
        .fm-grid-layout:focus .fm-sheet-selection-canvas {
            border: 2px dashed @theme-text-color;
    
            &.fm-sheet-selection-header,
            &.fm-clear-border {
                border: none;
            }
    
            &.fm-clear-border-right {
                border-right: none;
            }
    
            &.fm-clear-border-left {
                border-left: none;
            }
    
            &.fm-clear-border-top {
                border-top: none;
            }
    
            &.fm-clear-border-bottom {
                border-bottom: none;
            }
        }
    
        .fm-ui-list:not(.fm-ui-empty):focus,
        .fm-ui-vlist:not(.fm-ui-empty):focus {
            outline: none;
            outline-offset: 0;
        }
    }
}
