Fix #3778 "Make Liferay CSS rules only apply for Liferay"

// Copyright (C) 2012 Orbeon, Inc.
//
// This program is free software; you can redistribute it and/or modify it under the terms of the
// GNU Lesser General Public License as published by the Free Software Foundation; either version
// 2.1 of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU Lesser General Public License for more details.
//
// The full text of the license is available at http://www.gnu.org/copyleft/lesser.html

@import (reference) "../../../../../../../bootstrap-src/less/variables";
@import (reference) "../../../../../../../bootstrap-src/less/mixins";
@import (reference) "form-runner-common";

body.orbeon { background-color: @frBackground }

// Reset Liferay styles which impact ours
// See https://github.com/orbeon/orbeon-forms/issues/2728
// 2017-06-09: We had `.aui .orbeon` but it seems like with Liferay 7/DXP at least, the `.aui` class is not present.
// 2018-10-31: We use more classes so that this only applies to Liferay and not to other embedded use cases.
// See https://github.com/orbeon/orbeon-forms/issues/3778
.portlet .portlet-content .portlet-body .orbeon-portlet-div {

    color: @textColor;
    font-size: @frFontSize;
    line-height: @baseLineHeight;

    // Remove icons as content
    [class |= icon]:before {
        content: "";
    }

    .nav > li > span {
        padding: 0;
    }

    .checkbox input[type="checkbox"],
        .checkbox-inline input[type="checkbox"],
        .radio input[type="radio"],
        .radio-inline input[type="radio"] {
        transform: none;
    }

    #xforms-form { // id because Liferay uses an id too

        .row {
            margin-left: -20px;
            margin-right: -20px;

            [class *= span] {
                min-height: 1px;   // don't allow tall empty rows
                margin-left: 20px; // restore for Liferay 6.2
            }

            // See https://github.com/orbeon/orbeon-forms/issues/3251
            @media(max-width: 980px) {
                margin-left: 0;
                margin-right: 0;

                .span12 {
                    margin-left: 0;
                    margin-right: 0;
                }
            }
        }

        .container,
            .input-append .add-on,
            .input-prepend .add-on {
            box-sizing: content-box; // Bootstrap 2 default (Liferay uses Bootstrap 3 which changes that)
        }
    }

    .radio, .checkbox {
        margin-top: 0;
        display: inline;
    }

    .checkbox input[type = checkbox], .radio input[type = radio] {
        position: static;
    }

    label, .xforms-label {
        color: @textColor;
    }

    .table {
        &> thead, &> tbody, &> tfoot {
            &> tr {
                &> td:first-child {
                    padding-left: 5px;
                }
            }
        }
    }

    .table-bordered {
        &> thead, &> tbody, &> tfoot {
            &> tr {
                &> th, &> td {
                    border-bottom: none;
                    border-right: none;
                }
            }
        }
    }

    @media(min-width: 980px) {
        // Not sure we need this rule anymore, seems fine with Liferay 7/DXP
        // 2017-06-15: Seems needed for Liferay 6.2.
        .row .span12 {
            width: 940px;
        }
    }

    .navbar-inverse {
        border: none;
        background-color: transparent;
    }
}

// For Liferay only
// See https://github.com/orbeon/orbeon-forms/issues/3251
@media (max-width: 980px) {
    #content .portlet .portlet-content .portlet-body .orbeon-portlet-div {
        .row {
            margin-left: 0;
            margin-right: 0;
        }
        .span12 {
            margin-left: 0;
            margin-right: 0;
        }
    }
}

.orbeon {

    // ***** Controls***************************************************************************************************

    // Copied over Bootstrap styles as we can't reuse them simply as mixins
    // Ideally this would be in box-select.less
    .fr-view .xbl-fr-box-select .xforms-select-appearance-full .xforms-items {
        .border-radius(@inputBorderRadius);
        background-color: @inputBackground;
        border: 1px solid @inputBorder;
        .box-shadow(inset 0 1px 1px rgba(0,0,0,.075));
        padding: 4px 6px;
        &:focus {
            border-color: rgba(82, 168, 236, .8);
            outline: 0;
            outline: thin dotted  \9; // IE6-9
            .box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6)");
        }
    }

    // ***** Other *****************************************************************************************************

    .fr-lease {
        .fa-lock {
            font-size: 3em;
            float: left;
            padding-right: 20px;
            padding-left: 10px;
            padding-bottom: 10px;
         }
         .fr-lease-buttons {
            padding-top: 10px;
            .xforms-trigger {
                padding-right: 10px;
            }
         }
    }

    .fr-orbeon-version {
        text-align: center;
        font-size: smaller;
        padding: 10px;
        color: #6E6E6E;
    }

    .fr-explanation .xforms-output {
        display: block;
        font-style: italic;
        padding: 1em;
        background-color: #f8f8f8
    }

    .xforms-alert.xforms-active {
        font-family: sans-serif;
        font-size: 13px;
        color: white;
        position: relative;
        padding: 2px 8px;
        .border-radius(5px);
        margin-top: 10px;

        &:before {
            content: "";
            position: absolute;
            left: 10px;
            top: -10px;
            border-style: solid;
            border-width: 0 10px 10px 10px;
            display: block;
            width: 0;
        }

    }

    .fr-alert-color(@color) {
        background: @color;
        border: @color solid 1px;
        &:before {
            border-color: @color transparent;
        }
    }
    .xforms-invalid > .xforms-alert.xforms-active { .fr-alert-color(@error  ) }
    .xforms-warning > .xforms-alert.xforms-active { .fr-alert-color(@warning) }
    .xforms-info    > .xforms-alert.xforms-active { .fr-alert-color(@info   ) }

    .xforms-invalid.xforms-visited {
        &> input, &> textarea, &> select {
            border-color: @error;
        }
    }

    .xforms-warning.xforms-visited {
        &> input, &> textarea, &> select {
            border-color: @warning;
        }
    }

    .xforms-info.xforms-visited {
        &> input, &> textarea, &> select {
            border-color: @info;
        }
    }

    .xforms-hint {
        font-size: smaller;
        color: #6E6E6E;
        margin-top: .2em;
        margin-left: 0;// used to have margin here but with new colors no margin seems better
    }

    // Navbar
    .navbar {
        .fr-language-choice .fr-link-select1, .fr-goto-content {
            color: @navbarLinkColorActive;
            font-size: 85%;
            a, button.btn-link { color: @navbarLinkColor }
        }

        &.navbar-inverse {
            .fr-language-choice .fr-link-select1, .fr-goto-content {
                color: @frNavBarTextColor;
                a, button.btn-link { color: @navbarInverseLinkColor }
            }
        }

        .fr-language-choice .dropdown-menu {
            min-width: 0;
        }
    }

    // Add a star before the label of required fields, but only in new/edit modes
    // NOTE: Also cover Form Builder classes here instead of form-builder.css, so we don't miss changes done here
    .fr-mode-new, .fr-mode-edit, .fr-mode-test, .xforms-dialog {
        .xforms-required {
            &.xforms-label, .xforms-label {
                &:before {
                    content: '* ';
                    vertical-align: middle;                   // So the star doesn't show too high relative to the text of the label
                    font-size: 150%;                          // Default size isn't visible enough
                }
            }
        }

        .xforms-required.xforms-empty {
            .xforms-label:before {
                color: @error;                            // Error-red when empty
            }
        }
    }

    // Upload control information
    .xforms-upload-info { background-color: transparent }

    // Table of contents
    .fr-toc a { text-decoration: none }

    // Add background to static read-only fields and special output fields
    .xforms-static, .fr-static { min-height: 1em }

    .fr-mode-view, .fr-mode-pdf, .fr-mode-email {

        .xforms-static > label {
            cursor: default;
        }

        .xforms-select-appearance-full, .xforms-select1-appearance-full, .xforms-input.xforms-type-boolean {
            &.xforms-static {
                .xforms-selected, .xforms-deselected {
                    min-height: @baseLineHeight;
                    background-size: 14px;
                    background-repeat: no-repeat;
                    background-position: 0 3px;
                    cursor: not-allowed;

                    label {
                        cursor: not-allowed;
                    }
                }
                .xforms-selected {
                    background-image: url("images/glyphicons/checkbox-selected.png");
                }
                .xforms-deselected {
                    background-image: url("images/glyphicons/checkbox-deselected.png");
                }
            }
        }

        .xbl-fr-box-select .xforms-static.xforms-select-appearance-full .xforms-items {
            border: none;
            height: auto; // https://github.com/orbeon/orbeon-forms/issues/1597
            overflow-y: visible; // shouldn't overflow with above height: auto
            .box-shadow(none);
            padding: 0;
        }
    }
}

// ***** Retina displays ***********************************************************************************************

@media only screen and (-webkit-min-device-pixel-ratio: 2),
       only screen and (min--moz-device-pixel-ratio: 2),
       only screen and (min-resolution: 2dppx),
       only screen and (min-resolution: 192dpi) {
    .orbeon {
        .fr-mode-view, .fr-mode-pdf, .fr-mode-email {
            .xforms-select-appearance-full, .xforms-select1-appearance-full, .xforms-input.xforms-type-boolean {
                &.xforms-static {
                    .xforms-selected {
                        background-image: url("images/glyphicons/checkbox-selected-2x.png");
                    }
                    .xforms-deselected {
                        background-image: url("images/glyphicons/checkbox-deselected-2x.png");
                    }
                }
            }
        }
    }
}

// ***** Print and PDF *************************************************************************************************

@media print {

    html {
        &, body.orbeon { background-color: white; background-image: none }
        font-family: @baseFontFamily;
        body.orbeon { padding-top: 0 } // no need for padding because navbar is position: static
    }

    .orbeon {

        .fr-mode-view, .fr-mode-pdf, .fr-mode-email {
            .xforms-select-appearance-full, .xforms-select1-appearance-full, .xforms-input.xforms-type-boolean {
                &.xforms-static {
                    // NOTE: The !important seems needed with Flying Saucer, who knows why.
                    .xforms-selected, .xforms-deselected {
                        background-size: 14px;
                        background-repeat: no-repeat !important;
                        background-position: 0 3px !important;
                    }

                    .xforms-selected {
                        background-image: url("images/glyphicons/checkbox-selected-hd.png") !important;
                    }
                    .xforms-deselected {
                        background-image: url("images/glyphicons/checkbox-deselected-hd.png") !important;
                    }
                }
            }
        }

        // All regular links with href
        a[href] {
            text-decoration: underline;
            &:link, &:visited {
                color: @linkColor !important;
            }
        }

        // In particular section titles have hyperlinks like this
        a[href="#"] {
            text-decoration: none;
            &:link, &:visited {
                color: @textColor !important;
            }
        }

        a, button.btn-link { color: black; text-decoration: none }

        .container {
            width: 100%;
        }

        .fr-body {
            border: none;
            .box-shadow(0 1px 3px rgba(0,0,0,.055));
        }

        // Navbar
        .navbar {
            position: static; // override Bootstrap otherwise navbar appears on all pages

            .navbar-inner {
                background-color: white;
                border-bottom: 1px solid darken(@wellBackground, 7%);
                padding-left: 0;

                .container h1 {
                    font-size: 24px;
                    color: black;
                }

                .fr-language-choice {
                    display: none;
                }

                .brand {
                    color: @frHeaderColor;
                    font-size: 25px;
                }
            }
        }

        .fr-form-description {
            display: none;
        }
    }
}

// Copyright (C) 2012 Orbeon, Inc.
//
// This program is free software; you can redistribute it and/or modify it under the terms of the
// GNU Lesser General Public License as published by the Free Software Foundation; either version
// 2.1 of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU Lesser General Public License for more details.
//
// The full text of the license is available at http://www.gnu.org/copyleft/lesser.html

@import (reference) "../../../../../../../bootstrap-src/less/variables";
@import (reference) "../../../../../../../bootstrap-src/less/mixins";
@import (reference) "form-runner-common";

body.orbeon { background-color: @frBackground }

// Reset Liferay styles which impact ours
// See https://github.com/orbeon/orbeon-forms/issues/2728
// 2017-06-09: We had `.aui .orbeon` but it seems like with Liferay 7/DXP at least, the `.aui` class is not present.
.orbeon-portlet-div {

    color: @textColor;
    font-size: @frFontSize;
    line-height: @baseLineHeight;

    // Remove icons as content
    [class |= icon]:before {
        content: "";
    }

    .nav > li > span {
        padding: 0;
    }

    .checkbox input[type="checkbox"],
        .checkbox-inline input[type="checkbox"],
        .radio input[type="radio"],
        .radio-inline input[type="radio"] {
        transform: none;
    }

    #xforms-form { // id because Liferay uses an id too

        .row {
            margin-left: -20px;
            margin-right: -20px;

            [class *= span] {
                min-height: 1px;   // don't allow tall empty rows
                margin-left: 20px; // restore for Liferay 6.2
            }

            // See https://github.com/orbeon/orbeon-forms/issues/3251
            @media(max-width: 980px) {
                margin-left: 0;
                margin-right: 0;

                .span12 {
                    margin-left: 0;
                    margin-right: 0;
                }
            }
        }

        .container,
            .input-append .add-on,
            .input-prepend .add-on {
            box-sizing: content-box; // Bootstrap 2 default (Liferay uses Bootstrap 3 which changes that)
        }
    }

    .radio, .checkbox {
        margin-top: 0;
        display: inline;
    }

    .checkbox input[type = checkbox], .radio input[type = radio] {
        position: static;
    }

    label, .xforms-label {
        color: @textColor;
    }

    .table {
        &> thead, &> tbody, &> tfoot {
            &> tr {
                &> td:first-child {
                    padding-left: 5px;
                }
            }
        }
    }

    .table-bordered {
        &> thead, &> tbody, &> tfoot {
            &> tr {
                &> th, &> td {
                    border-bottom: none;
                    border-right: none;
                }
            }
        }
    }

    @media(min-width: 980px) {
        // Not sure we need this rule anymore, seems fine with Liferay 7/DXP
        // 2017-06-15: Seems needed for Liferay 6.2.
        .row .span12 {
            width: 940px;
        }
    }

    .navbar-inverse {
        border: none;
        background-color: transparent;
    }
}

// See https://github.com/orbeon/orbeon-forms/issues/3251
@media (max-width: 980px) {
    #content {
        .orbeon-portlet-div {
            .row {
                margin-left: 0;
                margin-right: 0;
            }
            .span12 {
                margin-left: 0;
                margin-right: 0;
            }
        }
    }
}

.orbeon {

    // ***** Controls***************************************************************************************************

    // Copied over Bootstrap styles as we can't reuse them simply as mixins
    // Ideally this would be in box-select.less
    .fr-view .xbl-fr-box-select .xforms-select-appearance-full .xforms-items {
        .border-radius(@inputBorderRadius);
        background-color: @inputBackground;
        border: 1px solid @inputBorder;
        .box-shadow(inset 0 1px 1px rgba(0,0,0,.075));
        padding: 4px 6px;
        &:focus {
            border-color: rgba(82, 168, 236, .8);
            outline: 0;
            outline: thin dotted  \9; // IE6-9
            .box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6)");
        }
    }

    // ***** Other *****************************************************************************************************

    .fr-lease {
        .fa-lock {
            font-size: 3em;
            float: left;
            padding-right: 20px;
            padding-left: 10px;
            padding-bottom: 10px;
         }
         .fr-lease-buttons {
            padding-top: 10px;
            .xforms-trigger {
                padding-right: 10px;
            }
         }
    }

    .fr-orbeon-version {
        text-align: center;
        font-size: smaller;
        padding: 10px;
        color: #6E6E6E;
    }

    .fr-explanation .xforms-output {
        display: block;
        font-style: italic;
        padding: 1em;
        background-color: #f8f8f8
    }

    .xforms-alert.xforms-active {
        font-family: sans-serif;
        font-size: 13px;
        color: white;
        position: relative;
        padding: 2px 8px;
        .border-radius(5px);
        margin-top: 10px;

        &:before {
            content: "";
            position: absolute;
            left: 10px;
            top: -10px;
            border-style: solid;
            border-width: 0 10px 10px 10px;
            display: block;
            width: 0;
        }

    }

    .fr-alert-color(@color) {
        background: @color;
        border: @color solid 1px;
        &:before {
            border-color: @color transparent;
        }
    }
    .xforms-invalid > .xforms-alert.xforms-active { .fr-alert-color(@error  ) }
    .xforms-warning > .xforms-alert.xforms-active { .fr-alert-color(@warning) }
    .xforms-info    > .xforms-alert.xforms-active { .fr-alert-color(@info   ) }

    .xforms-invalid.xforms-visited {
        &> input, &> textarea, &> select {
            border-color: @error;
        }
    }

    .xforms-warning.xforms-visited {
        &> input, &> textarea, &> select {
            border-color: @warning;
        }
    }

    .xforms-info.xforms-visited {
        &> input, &> textarea, &> select {
            border-color: @info;
        }
    }

    .xforms-hint {
        font-size: smaller;
        color: #6E6E6E;
        margin-top: .2em;
        margin-left: 0;// used to have margin here but with new colors no margin seems better
    }

    // Navbar
    .navbar {
        .fr-language-choice .fr-link-select1, .fr-goto-content {
            color: @navbarLinkColorActive;
            font-size: 85%;
            a, button.btn-link { color: @navbarLinkColor }
        }

        &.navbar-inverse {
            .fr-language-choice .fr-link-select1, .fr-goto-content {
                color: @frNavBarTextColor;
                a, button.btn-link { color: @navbarInverseLinkColor }
            }
        }

        .fr-language-choice .dropdown-menu {
            min-width: 0;
        }
    }

    // Add a star before the label of required fields, but only in new/edit modes
    // NOTE: Also cover Form Builder classes here instead of form-builder.css, so we don't miss changes done here
    .fr-mode-new, .fr-mode-edit, .fr-mode-test, .xforms-dialog {
        .xforms-required {
            &.xforms-label, .xforms-label {
                &:before {
                    content: '* ';
                    vertical-align: middle;                   // So the star doesn't show too high relative to the text of the label
                    font-size: 150%;                          // Default size isn't visible enough
                }
            }
        }

        .xforms-required.xforms-empty {
            .xforms-label:before {
                color: @error;                            // Error-red when empty
            }
        }
    }

    // Upload control information
    .xforms-upload-info { background-color: transparent }

    // Table of contents
    .fr-toc a { text-decoration: none }

    // Add background to static read-only fields and special output fields
    .xforms-static, .fr-static { min-height: 1em }

    .fr-mode-view, .fr-mode-pdf, .fr-mode-email {

        .xforms-static > label {
            cursor: default;
        }

        .xforms-select-appearance-full, .xforms-select1-appearance-full, .xforms-input.xforms-type-boolean {
            &.xforms-static {
                .xforms-selected, .xforms-deselected {
                    min-height: @baseLineHeight;
                    background-size: 14px;
                    background-repeat: no-repeat;
                    background-position: 0 3px;
                    cursor: not-allowed;

                    label {
                        cursor: not-allowed;
                    }
                }
                .xforms-selected {
                    background-image: url("images/glyphicons/checkbox-selected.png");
                }
                .xforms-deselected {
                    background-image: url("images/glyphicons/checkbox-deselected.png");
                }
            }
        }

        .xbl-fr-box-select .xforms-static.xforms-select-appearance-full .xforms-items {
            border: none;
            height: auto; // https://github.com/orbeon/orbeon-forms/issues/1597
            overflow-y: visible; // shouldn't overflow with above height: auto
            .box-shadow(none);
            padding: 0;
        }
    }
}

// ***** Retina displays ***********************************************************************************************

@media only screen and (-webkit-min-device-pixel-ratio: 2),
       only screen and (min--moz-device-pixel-ratio: 2),
       only screen and (min-resolution: 2dppx),
       only screen and (min-resolution: 192dpi) {
    .orbeon {
        .fr-mode-view, .fr-mode-pdf, .fr-mode-email {
            .xforms-select-appearance-full, .xforms-select1-appearance-full, .xforms-input.xforms-type-boolean {
                &.xforms-static {
                    .xforms-selected {
                        background-image: url("images/glyphicons/checkbox-selected-2x.png");
                    }
                    .xforms-deselected {
                        background-image: url("images/glyphicons/checkbox-deselected-2x.png");
                    }
                }
            }
        }
    }
}

// ***** Print and PDF *************************************************************************************************

@media print {

    html {
        &, body.orbeon { background-color: white; background-image: none }
        font-family: @baseFontFamily;
        body.orbeon { padding-top: 0 } // no need for padding because navbar is position: static
    }

    .orbeon {

        .fr-mode-view, .fr-mode-pdf, .fr-mode-email {
            .xforms-select-appearance-full, .xforms-select1-appearance-full, .xforms-input.xforms-type-boolean {
                &.xforms-static {
                    // NOTE: The !important seems needed with Flying Saucer, who knows why.
                    .xforms-selected, .xforms-deselected {
                        background-size: 14px;
                        background-repeat: no-repeat !important;
                        background-position: 0 3px !important;
                    }

                    .xforms-selected {
                        background-image: url("images/glyphicons/checkbox-selected-hd.png") !important;
                    }
                    .xforms-deselected {
                        background-image: url("images/glyphicons/checkbox-deselected-hd.png") !important;
                    }
                }
            }
        }

        // All regular links with href
        a[href] {
            text-decoration: underline;
            &:link, &:visited {
                color: @linkColor !important;
            }
        }

        // In particular section titles have hyperlinks like this
        a[href="#"] {
            text-decoration: none;
            &:link, &:visited {
                color: @textColor !important;
            }
        }

        a, button.btn-link { color: black; text-decoration: none }

        .container {
            width: 100%;
        }

        .fr-body {
            border: none;
            .box-shadow(0 1px 3px rgba(0,0,0,.055));
        }

        // Navbar
        .navbar {
            position: static; // override Bootstrap otherwise navbar appears on all pages

            .navbar-inner {
                background-color: white;
                border-bottom: 1px solid darken(@wellBackground, 7%);
                padding-left: 0;

                .container h1 {
                    font-size: 24px;
                    color: black;
                }

                .fr-language-choice {
                    display: none;
                }

                .brand {
                    color: @frHeaderColor;
                    font-size: 25px;
                }
            }
        }

        .fr-form-description {
            display: none;
        }
    }
}


Avoid UI "jumping" when sorting nested content items

.umb-nested-content {
    position: relative;
}

.umb-nested-content-property-container {
    position: relative;
    &:not(:last-child){
        margin-bottom: 12px;
    }
}

.umb-nested-content--not-supported {
    opacity: 0.3;
    pointer-events: none;
}

.umb-nested-content--mandatory {
    /*
        yeah so this is a pain, but we must be super specific in targeting the mandatory property labels,
        otherwise all properties within a reqired, nested, nested content property will all appear mandatory
    */
    > ng-form > .control-group > .umb-el-wrap > .control-header label:after {
        content: '*';
        color: @red;
    }
}

.umb-nested-content-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.umb-nested-content__item {
    position: relative;
    text-align: left;
    background: @white;
}

.umb-nested-content__item.ui-sortable-placeholder {
    margin-top: 1px;
    visibility: visible !important;
}

.umb-nested-content__item--single > .umb-nested-content__content {
    border: 0;
}

.umb-nested-content__item--single > .umb-nested-content__content > .umb-pane {
    margin: 0;
}

.umb-nested-content__header-bar {
    border-bottom: 1px solid @gray-9;
    cursor: pointer;
    background-color: @white;

    -moz-user-select: none;
    -khtml-user-select: none;
    -webkit-user-select: none;
    -o-user-select: none;
    user-select: none;

    &:hover {
        .umb-nested-content__heading .umb-nested-content__item-name {
            padding-right: 60px;
        }
    }

}

.umb-nested-content__heading {
    line-height: 20px;
    position: relative;
    margin-top:1px;
    padding: 15px 5px;
    color:@ui-option-type;
    border-radius: 3px 3px 0 0;

    &:hover {
        color:@ui-option-type-hover;
    }

    i {
        position: absolute;
        margin-top: -1px;
    }

    .umb-nested-content__item-name {
        display: block;
        max-height: 20px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding-left: 5px;

        &.--has-icon {
            padding-left: 30px;
        }
    }

}

.umb-nested-content__icons {
    opacity: 0;
    transition: opacity 120ms ease-in-out;
    position: absolute;
    right: 0;
    top: 3px;
    padding: 5px;
    background-color: @white;
}

.umb-nested-content__item--active > .umb-nested-content__header-bar {
    .umb-nested-content__heading {
        background-color: @ui-active;
        &:hover {
            color:@ui-option-type;
        }
        .umb-nested-content__item-name {
            padding-right: 60px;
        }
    }
    .umb-nested-content__icons {
        background-color: @ui-active;
        &:before {
            background: linear-gradient(90deg, rgba(255,255,255,0), @ui-active);
        }
    }
}

.umb-nested-content__header-bar:hover .umb-nested-content__icons,
.umb-nested-content__item--active > .umb-nested-content__header-bar .umb-nested-content__icons {
    opacity: 1;
}

.umb-nested-content__icon {
    background: transparent;
    border: 0 none;
    display: inline-block;
    padding: 4px;
    margin: 2px;
    cursor: pointer;
    color: @ui-option-type;
}

.umb-nested-content__icon:hover {
    color: @ui-option-type-hover;
    text-decoration: none;
}

.umb-nested-content__icon .icon {
    display: block;
    font-size: 16px !important;
}

.umb-nested-content__icon--disabled {
    opacity: 0.3;
    cursor: default !important;

    &:hover {
        color: @ui-option-type;
    }
}

.umb-nested-content__footer-bar {
    margin-top: 20px;
}

.umb-nested-content__add-content {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    border: 1px dashed @ui-action-discreet-border;
    color: @ui-action-discreet-type;
    font-weight: bold;
    padding: 5px 15px;
    box-sizing: border-box;
}

.umb-nested-content__add-content:hover {
    color: @ui-action-discreet-type-hover;
    border-color: @ui-action-discreet-border-hover;
    text-decoration: none;
}

.umb-nested-content__add-content.--disabled,
.umb-nested-content__add-content.--disabled:hover {
    color: @gray-7;
    border-color: @gray-7;
    cursor: default;
}

.umb-nested-content__content {
    border-top: 1px solid transparent;
    border-bottom: 1px solid @gray-9;
    border-left: 1px solid @gray-9;
    border-right: 1px solid @gray-9;
    border-radius: 0 0 3px 3px;
}

.umb-nested-content__item--active:not(.umb-nested-content__item--single) .umb-nested-content__content {
    background: @brownGrayExtraLight;
}

.umb-nested-content__content .umb-control-group {
    padding-bottom: 0;
}

.umb-nested-content__item.ui-sortable-helper .umb-nested-content__content {
    display: none !important;
}

.umb-nested-content__doctypepicker table input,
.umb-nested-content__doctypepicker table select {
    width: 100%;
    padding-right: 0;
}

.umb-nested-content__doctypepicker table td.icon-navigation,
.umb-nested-content__doctypepicker i.umb-nested-content__help-icon {
    vertical-align: middle;
    color: @gray-7;
}

.umb-nested-content__doctypepicker table td.icon-navigation:hover,
.umb-nested-content__doctypepicker i.umb-nested-content__help-icon:hover {
    color: @gray-2;
}

.umb-nested-content__doctypepicker i.umb-nested-content__help-icon {
    margin-left: 10px;
}

.umb-nested-content__placeholder {
    padding: 4px 6px;
    border: 1px dashed @gray-8;
    background: 0 0;
    cursor: pointer;
    color: @blueExtraDark;
    -webkit-animation: fadeIn .5s;
    animation: fadeIn .5s;
    text-align: center;

    &--selected {
        border: none;
        text-align: left;
        padding: 0;
    }
}

.umb-nested-content__placeholder:hover {
    color: @blueMid;
    border-color: @blueMid;
    text-decoration: none;
}

.form-horizontal .umb-nested-content--narrow .controls-row {
    margin-left: 40% !important;
}

.form-horizontal .umb-nested-content--narrow .controls-row .umb-textstring,
.form-horizontal .umb-nested-content--narrow .controls-row .umb-textarea
{
    width: 95%;
}

.form-horizontal .umb-nested-content--narrow .controls-row .umb-dropdown {
    width: 99%;
}

// this resolves the layout issue introduced in nested content in 7.12 with the addition of the input for link anchors
// the attribute selector ensures the change only applies to the linkpicker overlay
.form-horizontal .umb-nested-content--narrow [ng-controller*="Umbraco.Overlays.LinkPickerController"] .controls-row {
    margin-left:0!important;

    .umb-textarea, .umb-textstring {
        width:100%;
    }
}

.umb-nested-content {
    position: relative;
}

.umb-nested-content-property-container {
    position: relative;
    &:not(:last-child){
        margin-bottom: 12px;
    }
}

.umb-nested-content--not-supported {
    opacity: 0.3;
    pointer-events: none;
}

.umb-nested-content--mandatory {
    /*
        yeah so this is a pain, but we must be super specific in targeting the mandatory property labels,
        otherwise all properties within a reqired, nested, nested content property will all appear mandatory
    */
    > ng-form > .control-group > .umb-el-wrap > .control-header label:after {
        content: '*';
        color: @red;
    }
}

.umb-nested-content-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.umb-nested-content__item {
    position: relative;
    text-align: left;
    background: @white;
}

.umb-nested-content__item.ui-sortable-placeholder {
    background: @gray-10;
    border: 1px solid @gray-9;
    visibility: visible !important;
    height: 55px;
    margin-top: -1px;
}

.umb-nested-content__item--single > .umb-nested-content__content {
    border: 0;
}

.umb-nested-content__item--single > .umb-nested-content__content > .umb-pane {
    margin: 0;
}

.umb-nested-content__header-bar {
    border-bottom: 1px solid @gray-9;
    cursor: pointer;
    background-color: @white;

    -moz-user-select: none;
    -khtml-user-select: none;
    -webkit-user-select: none;
    -o-user-select: none;
    user-select: none;

    &:hover {
        .umb-nested-content__heading .umb-nested-content__item-name {
            padding-right: 60px;
        }
    }

}

.umb-nested-content__heading {
    line-height: 20px;
    position: relative;
    margin-top:1px;
    padding: 15px 5px;
    color:@ui-option-type;
    border-radius: 3px 3px 0 0;

    &:hover {
        color:@ui-option-type-hover;
    }

    i {
        position: absolute;
        margin-top: -1px;
    }

    .umb-nested-content__item-name {
        display: block;
        max-height: 20px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        padding-left: 5px;

        &.--has-icon {
            padding-left: 30px;
        }
    }

}

.umb-nested-content__icons {
    opacity: 0;
    transition: opacity 120ms ease-in-out;
    position: absolute;
    right: 0;
    top: 3px;
    padding: 5px;
    background-color: @white;
}

.umb-nested-content__item--active > .umb-nested-content__header-bar {
    .umb-nested-content__heading {
        background-color: @ui-active;
        &:hover {
            color:@ui-option-type;
        }
        .umb-nested-content__item-name {
            padding-right: 60px;
        }
    }
    .umb-nested-content__icons {
        background-color: @ui-active;
        &:before {
            background: linear-gradient(90deg, rgba(255,255,255,0), @ui-active);
        }
    }
}

.umb-nested-content__header-bar:hover .umb-nested-content__icons,
.umb-nested-content__item--active > .umb-nested-content__header-bar .umb-nested-content__icons {
    opacity: 1;
}

.umb-nested-content__icon {
    background: transparent;
    border: 0 none;
    display: inline-block;
    padding: 4px;
    margin: 2px;
    cursor: pointer;
    color: @ui-option-type;
}

.umb-nested-content__icon:hover {
    color: @ui-option-type-hover;
    text-decoration: none;
}

.umb-nested-content__icon .icon {
    display: block;
    font-size: 16px !important;
}

.umb-nested-content__icon--disabled {
    opacity: 0.3;
    cursor: default !important;

    &:hover {
        color: @ui-option-type;
    }
}

.umb-nested-content__footer-bar {
    margin-top: 20px;
}

.umb-nested-content__add-content {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    border: 1px dashed @ui-action-discreet-border;
    color: @ui-action-discreet-type;
    font-weight: bold;
    padding: 5px 15px;
    box-sizing: border-box;
}

.umb-nested-content__add-content:hover {
    color: @ui-action-discreet-type-hover;
    border-color: @ui-action-discreet-border-hover;
    text-decoration: none;
}

.umb-nested-content__add-content.--disabled,
.umb-nested-content__add-content.--disabled:hover {
    color: @gray-7;
    border-color: @gray-7;
    cursor: default;
}

.umb-nested-content__content {
    border-top: 1px solid transparent;
    border-bottom: 1px solid @gray-9;
    border-left: 1px solid @gray-9;
    border-right: 1px solid @gray-9;
    border-radius: 0 0 3px 3px;
}

.umb-nested-content__item--active:not(.umb-nested-content__item--single) .umb-nested-content__content {
    background: @brownGrayExtraLight;
}

.umb-nested-content__content .umb-control-group {
    padding-bottom: 0;
}

.umb-nested-content__item.ui-sortable-helper .umb-nested-content__content {
    display: none !important;
}

.umb-nested-content__doctypepicker table input,
.umb-nested-content__doctypepicker table select {
    width: 100%;
    padding-right: 0;
}

.umb-nested-content__doctypepicker table td.icon-navigation,
.umb-nested-content__doctypepicker i.umb-nested-content__help-icon {
    vertical-align: middle;
    color: @gray-7;
}

.umb-nested-content__doctypepicker table td.icon-navigation:hover,
.umb-nested-content__doctypepicker i.umb-nested-content__help-icon:hover {
    color: @gray-2;
}

.umb-nested-content__doctypepicker i.umb-nested-content__help-icon {
    margin-left: 10px;
}

.umb-nested-content__placeholder {
    padding: 4px 6px;
    border: 1px dashed @gray-8;
    background: 0 0;
    cursor: pointer;
    color: @blueExtraDark;
    -webkit-animation: fadeIn .5s;
    animation: fadeIn .5s;
    text-align: center;

    &--selected {
        border: none;
        text-align: left;
        padding: 0;
    }
}

.umb-nested-content__placeholder:hover {
    color: @blueMid;
    border-color: @blueMid;
    text-decoration: none;
}

.form-horizontal .umb-nested-content--narrow .controls-row {
    margin-left: 40% !important;
}

.form-horizontal .umb-nested-content--narrow .controls-row .umb-textstring,
.form-horizontal .umb-nested-content--narrow .controls-row .umb-textarea
{
    width: 95%;
}

.form-horizontal .umb-nested-content--narrow .controls-row .umb-dropdown {
    width: 99%;
}

// this resolves the layout issue introduced in nested content in 7.12 with the addition of the input for link anchors
// the attribute selector ensures the change only applies to the linkpicker overlay
.form-horizontal .umb-nested-content--narrow [ng-controller*="Umbraco.Overlays.LinkPickerController"] .controls-row {
    margin-left:0!important;

    .umb-textarea, .umb-textstring {
        width:100%;
    }
}


uncomment bootstrap overrides

uncomment bootstrap overrides

/* Import Bootstrap Resources
 **************************************************/
@import "twitter/bootstrap/variables";
@import "twitter/bootstrap/mixins";

/* Import Application LESS
 **************************************************/
@import "color_genes.css.less";
@import "color_sources.css.less";
@import "sticky_footer.css.less";

/* BOOTSTRAP OVERRIDES
 **************************************************/
// Navbar
// -------------------------
@navbarCollapseWidth:             979px;
@navbarCollapseDesktopWidth:      @navbarCollapseWidth + 1;

@navbarHeight:                    64px;
@navbarBackgroundHighlight:       #ffffff;
@navbarBackground:                darken(@navbarBackgroundHighlight, 5%);
@navbarBorder:                    darken(@navbarBackground, 12%);

@navbarText:                      #777;
@navbarLinkColor:                 #777;
@navbarLinkColorHover:            @grayDark;
@navbarLinkColorActive:           @gray;
@navbarLinkBackgroundHover:       transparent;
@navbarLinkBackgroundActive:      darken(@navbarBackground, 5%);

@navbarBrandColor:                @navbarLinkColor;

// Inverted navbar
@navbarInverseBackground:                #111111;
@navbarInverseBackgroundHighlight:       #222222;
@navbarInverseBorder:                    #252525;

@navbarInverseText:                      @grayLight;
@navbarInverseLinkColor:                 @grayLight;
@navbarInverseLinkColorHover:            @white;
@navbarInverseLinkColorActive:           @navbarInverseLinkColorHover;
@navbarInverseLinkBackgroundHover:       transparent;
@navbarInverseLinkBackgroundActive:      @navbarInverseBackground;

@navbarInverseSearchBackground:          lighten(@navbarInverseBackground, 25%);
@navbarInverseSearchBackgroundFocus:     @white;
@navbarInverseSearchBorder:              @navbarInverseBackground;
@navbarInverseSearchPlaceholderColor:    #ccc;

@navbarInverseBrandColor:                @navbarInverseLinkColor;

/* BASE COLORS
 **************************************************/
@dgidb-green:  #69b53e;
@dgidb-brown:  #5f604b;
@dgidb-purple: #502066;
@dgidb-red:    #a40014;
@dgidb-blue:   #4ea1b9;
@dgidb-yellow: #f3b128;
@dgidb-orange: #c54b16;

// entity colors
@entity-category:     @dgidb-orange;
@entity-gene:         @dgidb-green;
@entity-drug:         @dgidb-red;
@entity-interaction:  @dgidb-blue;

/* LAYOUT
 **************************************************/
body {
  padding-top: 58px;
}

.anchor:before {
    display:block;
    content:"";
    height: 60px;
    margin:-60px 0 0;
}

.bubble-links a {
  font-weight: bold;
  color: #ffffff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
  background-color: #999999;
  padding: 1px 9px 2px;
  .border-radius(9px);
  background-color: #444;
  opacity:0.6;
}

.item {
  width: 550px;
  margin: 5px;
}

.search-container {
  float: left;
  margin-left: 2em;
  .clearfix();
}

/* NAVIGATION
 **************************************************/
.navbar {
  border-bottom: 4px solid #9993a9;
}

.navbar-inner {
  position: relative;
  background-image: url('dgidb-header-bg.png') !important;
  background-repeat: no-repeat;
  .brand {
    margin: 0;
    padding: 0;
  }
}

.navbar .nav.main-menu {
  position: absolute;
  bottom: 0;
  left: 310px;
  .active {
    a {
      background-color: #47444e;
      .border-radius(5px 5px 0 0);
    }
  }
}

/* GENE/DRUG/INTERACTION DETAILED RESULT LISTS
 **************************************************/
#list-filter-tabs {
  .icon-chevron-right {
    float: right;
  }

  li {
    border-left-width: 4px;
    border-left-style: solid;
    .border-radius(4px 0 0 4px);
  }
  .nav-tabs.nav-stacked > li:first-child > a {
    .border-radius (0 4px 0 0);
  }

  .nav-tabs.nav-stacked > li:last-child > a {
    .border-radius (0 0 4px 0);
  }

  li a {
    border-left-width: 0;
  }

  li.drug { border-left-color: @entity-drug; }
  li.gene { border-left-color: @entity-gene; }
  li.interaction { border-left-color: @entity-interaction; }
  li.potentially_druggable { border-left-color: @entity-category; }

  li.active a {
    background-color: #08C;
    color: #FFF;
  }
}

.result-list {
  // background-color: #FAA;
  margin: 0;
  padding: 0;
  list-style: none;

  > li {
    margin: 0;
    padding: 8px;
    list-style: none;
    background-color: #EFEFEF;
    margin-bottom: 1em;
    border-left-width: 5px;
    border-left-style: solid;
    .border-radius(5px);

    .item-title {
      display: table;
      width: 100%;
      margin: 3px 5px;

      .item-name {
        display: table-cell;
        h3 {
          margin: 0;
          padding: 0;
          line-height: 32px;
          background-position: left center;
          background-repeat: no-repeat;
          padding-left: 40px;

          a {
            color: @textColor !important;
            border-bottom: 2px solid #CCC !important;
          }

          a:hover {
            text-decoration: none;
            border-bottom: 2px solid @textColor !important;
          }
        }
      }

      .item-corner {
        display: table-cell;
        padding: 0;
        float: right;

        ul.attribute-list {
          margin: 0;

          li {
            list-style: none;
            display: inline-block;
            margin: 0;
            passing: 0;
            margin-right: .5em;
            list-style: none;
            color: #999;
          }
        }
      }
    }
    .item-content {
      display: table;
      width: 100%;
      margin-top: 1em;
      margin-bottom: 5px;

      .cell {
        width: 33.3%;

        .item-panel {
          .border-radius(5px);
          background-color: #FFF;
          padding: 3px 8px;
          margin: 0 5px;
        }

      }
      .category {
        display: table-cell;
      }
      .middle {
        margin: 0 5px;
      }
    }

  }

  li.gene {
    border-left-color: @entity-gene;
    .icon { background-image: url('icons/icon-gene_32.png'); background-color: @dgidb-green; }
    .item-name h3 { background-image: url('icons/icon-gene_32.png'); }
  }
  li.drug {
    border-left-color: @entity-drug;
    .icon { background-image: url('icons/icon-drug_32.png'); background-color: @dgidb-red; }
    .item-name h3 { background-image: url('icons/icon-drug_32.png'); }
  }
  li.interaction {
    border-left-color: @entity-interaction;
    .icon { background-image: url('icons/icon-interaction_32.png'); background-color: @dgidb-blue; }
    .item-name h3 { background-image: url('icons/icon-interaction_32.png'); }
  }
  li.potentially_druggable {
    border-left-color: @entity-category;
    .icon { background-image: url('icons/icon-potentially_druggable_32.png'); background-color: @dgidb-orange; }
    .item-name h3 { background-image: url('icons/icon-gene-potentially_druggable_32.png'); }
  }

}

/* Data Tables
 **************************************************/
.dataTables_length {
  margin-left: 20px;
}

.dataTables_info {
  margin-left: 20px;
}

div.dataTables_length label {
  float: left;
  text-align: left;
}

div.dataTables_length select {
  width: 75px;
}

div.dataTables_filter label {
  float: right;
}

div.dataTables_info {
  padding-top: 8px;
}

div.dataTables_paginate {
  float: right;
  margin: 0;
}

table.table {
  clear: both;
  margin-bottom: 6px !important;
}

table.table thead .sorting,
table.table thead .sorting_asc,
table.table thead .sorting_desc,
table.table thead .sorting_asc_disabled,
table.table thead .sorting_desc_disabled {
  cursor: pointer;
  *cursor: hand;
}

table.table thead .sorting { background: url('sort_both.png') no-repeat center right; }
table.table thead .sorting_asc { background: url('sort_asc.png') no-repeat center right; }
table.table thead .sorting_desc { background: url('sort_desc.png') no-repeat center right; }

table.table thead .sorting_asc_disabled { background: url('sort_asc_disabled.png') no-repeat center right; }
table.table thead .sorting_desc_disabled { background: url('sort_desc_disabled.png') no-repeat center right; }

table.dataTable th:active {
  outline: none;
}

/* Tours
 **************************************************/
.popover {
  z-index: 1030;
}

/* CURRENT SOURCES TABLE
 **************************************************/
.current-sources {
  th, td { font-size: 75% }

  .db-version {
    text-align: right;
    white-space: nowrap;
  }

  .db-name {
    text-align: left;
  }

  .db-name {

  }
}

.affix{
    position: static;
}

@media (min-width: 992px) {
  #api-sidebar.affix {
    position: static;
  }
}

/* Import Bootstrap Resources
 **************************************************/
@import "twitter/bootstrap/variables";
@import "twitter/bootstrap/mixins";

/* Import Application LESS
 **************************************************/
@import "color_genes.css.less";
@import "color_sources.css.less";
@import "sticky_footer.css.less";

/* BOOTSTRAP OVERRIDES
 **************************************************/
// Navbar
// -------------------------
//@navbarCollapseWidth:             979px;
//@navbarCollapseDesktopWidth:      @navbarCollapseWidth + 1;
//
//@navbarHeight:                    64px;
//@navbarBackgroundHighlight:       #ffffff;
//@navbarBackground:                darken(@navbarBackgroundHighlight, 5%);
//@navbarBorder:                    darken(@navbarBackground, 12%);
//
//@navbarText:                      #777;
//@navbarLinkColor:                 #777;
//@navbarLinkColorHover:            @grayDark;
//@navbarLinkColorActive:           @gray;
//@navbarLinkBackgroundHover:       transparent;
//@navbarLinkBackgroundActive:      darken(@navbarBackground, 5%);
//
//@navbarBrandColor:                @navbarLinkColor;

// Inverted navbar
//@navbarInverseBackground:                #111111;
//@navbarInverseBackgroundHighlight:       #222222;
//@navbarInverseBorder:                    #252525;
//
//@navbarInverseText:                      @grayLight;
//@navbarInverseLinkColor:                 @grayLight;
//@navbarInverseLinkColorHover:            @white;
//@navbarInverseLinkColorActive:           @navbarInverseLinkColorHover;
//@navbarInverseLinkBackgroundHover:       transparent;
//@navbarInverseLinkBackgroundActive:      @navbarInverseBackground;
//
//@navbarInverseSearchBackground:          lighten(@navbarInverseBackground, 25%);
//@navbarInverseSearchBackgroundFocus:     @white;
//@navbarInverseSearchBorder:              @navbarInverseBackground;
//@navbarInverseSearchPlaceholderColor:    #ccc;
//
//@navbarInverseBrandColor:                @navbarInverseLinkColor;

/* BASE COLORS
 **************************************************/
@dgidb-green:  #69b53e;
@dgidb-brown:  #5f604b;
@dgidb-purple: #502066;
@dgidb-red:    #a40014;
@dgidb-blue:   #4ea1b9;
@dgidb-yellow: #f3b128;
@dgidb-orange: #c54b16;

// entity colors
@entity-category:     @dgidb-orange;
@entity-gene:         @dgidb-green;
@entity-drug:         @dgidb-red;
@entity-interaction:  @dgidb-blue;

/* LAYOUT
 **************************************************/
body {
  padding-top: 58px;
}

.anchor:before {
    display:block;
    content:"";
    height: 60px;
    margin:-60px 0 0;
}

.bubble-links a {
  font-weight: bold;
  color: #ffffff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
  background-color: #999999;
  padding: 1px 9px 2px;
  .border-radius(9px);
  background-color: #444;
  opacity:0.6;
}

.item {
  width: 550px;
  margin: 5px;
}

.search-container {
  float: left;
  margin-left: 2em;
  .clearfix();
}

/* NAVIGATION
 **************************************************/
.navbar {
  border-bottom: 4px solid #9993a9;
}

.navbar-inner {
  position: relative;
  background-image: url('dgidb-header-bg.png') !important;
  background-repeat: no-repeat;
  .brand {
    margin: 0;
    padding: 0;
  }
}

.navbar .nav.main-menu {
  position: absolute;
  bottom: 0;
  left: 310px;
  .active {
    a {
      background-color: #47444e;
      .border-radius(5px 5px 0 0);
    }
  }
}

/* GENE/DRUG/INTERACTION DETAILED RESULT LISTS
 **************************************************/
#list-filter-tabs {
  .icon-chevron-right {
    float: right;
  }

  li {
    border-left-width: 4px;
    border-left-style: solid;
    .border-radius(4px 0 0 4px);
  }
  .nav-tabs.nav-stacked > li:first-child > a {
    .border-radius (0 4px 0 0);
  }

  .nav-tabs.nav-stacked > li:last-child > a {
    .border-radius (0 0 4px 0);
  }

  li a {
    border-left-width: 0;
  }

  li.drug { border-left-color: @entity-drug; }
  li.gene { border-left-color: @entity-gene; }
  li.interaction { border-left-color: @entity-interaction; }
  li.potentially_druggable { border-left-color: @entity-category; }

  li.active a {
    background-color: #08C;
    color: #FFF;
  }
}

.result-list {
  // background-color: #FAA;
  margin: 0;
  padding: 0;
  list-style: none;

  > li {
    margin: 0;
    padding: 8px;
    list-style: none;
    background-color: #EFEFEF;
    margin-bottom: 1em;
    border-left-width: 5px;
    border-left-style: solid;
    .border-radius(5px);

    .item-title {
      display: table;
      width: 100%;
      margin: 3px 5px;

      .item-name {
        display: table-cell;
        h3 {
          margin: 0;
          padding: 0;
          line-height: 32px;
          background-position: left center;
          background-repeat: no-repeat;
          padding-left: 40px;

          a {
            color: @textColor !important;
            border-bottom: 2px solid #CCC !important;
          }

          a:hover {
            text-decoration: none;
            border-bottom: 2px solid @textColor !important;
          }
        }
      }

      .item-corner {
        display: table-cell;
        padding: 0;
        float: right;

        ul.attribute-list {
          margin: 0;

          li {
            list-style: none;
            display: inline-block;
            margin: 0;
            passing: 0;
            margin-right: .5em;
            list-style: none;
            color: #999;
          }
        }
      }
    }
    .item-content {
      display: table;
      width: 100%;
      margin-top: 1em;
      margin-bottom: 5px;

      .cell {
        width: 33.3%;

        .item-panel {
          .border-radius(5px);
          background-color: #FFF;
          padding: 3px 8px;
          margin: 0 5px;
        }

      }
      .category {
        display: table-cell;
      }
      .middle {
        margin: 0 5px;
      }
    }

  }

  li.gene {
    border-left-color: @entity-gene;
    .icon { background-image: url('icons/icon-gene_32.png'); background-color: @dgidb-green; }
    .item-name h3 { background-image: url('icons/icon-gene_32.png'); }
  }
  li.drug {
    border-left-color: @entity-drug;
    .icon { background-image: url('icons/icon-drug_32.png'); background-color: @dgidb-red; }
    .item-name h3 { background-image: url('icons/icon-drug_32.png'); }
  }
  li.interaction {
    border-left-color: @entity-interaction;
    .icon { background-image: url('icons/icon-interaction_32.png'); background-color: @dgidb-blue; }
    .item-name h3 { background-image: url('icons/icon-interaction_32.png'); }
  }
  li.potentially_druggable {
    border-left-color: @entity-category;
    .icon { background-image: url('icons/icon-potentially_druggable_32.png'); background-color: @dgidb-orange; }
    .item-name h3 { background-image: url('icons/icon-gene-potentially_druggable_32.png'); }
  }

}

/* Data Tables
 **************************************************/
.dataTables_length {
  margin-left: 20px;
}

.dataTables_info {
  margin-left: 20px;
}

div.dataTables_length label {
  float: left;
  text-align: left;
}

div.dataTables_length select {
  width: 75px;
}

div.dataTables_filter label {
  float: right;
}

div.dataTables_info {
  padding-top: 8px;
}

div.dataTables_paginate {
  float: right;
  margin: 0;
}

table.table {
  clear: both;
  margin-bottom: 6px !important;
}

table.table thead .sorting,
table.table thead .sorting_asc,
table.table thead .sorting_desc,
table.table thead .sorting_asc_disabled,
table.table thead .sorting_desc_disabled {
  cursor: pointer;
  *cursor: hand;
}

table.table thead .sorting { background: url('sort_both.png') no-repeat center right; }
table.table thead .sorting_asc { background: url('sort_asc.png') no-repeat center right; }
table.table thead .sorting_desc { background: url('sort_desc.png') no-repeat center right; }

table.table thead .sorting_asc_disabled { background: url('sort_asc_disabled.png') no-repeat center right; }
table.table thead .sorting_desc_disabled { background: url('sort_desc_disabled.png') no-repeat center right; }

table.dataTable th:active {
  outline: none;
}

/* Tours
 **************************************************/
.popover {
  z-index: 1030;
}

/* CURRENT SOURCES TABLE
 **************************************************/
.current-sources {
  th, td { font-size: 75% }

  .db-version {
    text-align: right;
    white-space: nowrap;
  }

  .db-name {
    text-align: left;
  }

  .db-name {

  }
}

.affix{
    position: static;
}

@media (min-width: 992px) {
  #api-sidebar.affix {
    position: static;
  }
}


AP-292 - Fixed upload extensions pop up not showing up, also adjusted minor CSS issues.

@import "~dnn-global-styles/index";
@transition: .18s;
.dnn-package-upload {
    float: left;
    width: 100%;
    height: 215px;
    background: @alabaster;
    outline: 1px solid @mountainMist;
    position: relative;
    border: 12px solid @white;
    box-sizing: content-box;
    * {
        box-sizing: content-box;
    }
    &.viewing-log {
        outline: none;
        border: none;
    }
    .dropzone-container {
        position: absolute;
        width: 100%;
        height: 100%;
        z-index: 3;
        background-color: @gallery;
    }
    .no-valid-manifest {
        background-color: @alabaster;
        position: absolute;
        top: -13px;
        left: -13px;
        z-index: 3;
        padding: 45px 25px;
        text-align: center;
        > p {
            margin-bottom: 25px;
        }
        .dnn-radio-buttons {
            margin: 0 auto;
            float: none;
            width: auto;
            display: table;
        }
    }
    &.uploading {
        .dropzone-container {
            background-color: transparent;
            .overlay {
                opacity: 0;
                &.hover {
                    opacity: 1;
                }
                &:hover {
                    opacity: 1;
                    background: rgba(30, 136, 195, 0.9);
                }
            }
        }
    }
    &.already-installed {
        .dropzone-container {
            z-index: 1;
        }
    }
    .overlay {
        position: absolute;
        background: rgba(30, 136, 195, .0);
        top: -12px;
        bottom: -12px;
        left: -12px;
        right: -12px;
        text-align: center;
        transition: @transition;
        z-index: 1;
        &.hover {
            background: rgba(30, 136, 195, .6);
            opacity: 1;
            * {
                pointer-events: none;
            }
            span {
                color: white;
            }
            .buttons {
                .button.upload {
                    color: white;
                }
            }
        }
        &:hover {
            background: rgba(30, 136, 195, .6);
            span {
                color: white;
            }
            .buttons {
                &:hover {
                    .button {
                        color: @alto;
                        &:hover {
                            color: white;
                        }
                    }
                }
                .button {
                    color: white;
                }
            }
        }
        span {
            text-align: center;
            margin-top: 25px;
            float: left;
            width: 100%;
            box-sizing: border-box;
            color: @rollingStone;
            transition: @transition;
            font-size: 14px;
        }
        .buttons {
            margin: auto;
            height: 32px;
            margin-top: 60px;
            width: 201px;
            transition: @transition;
            .button {
                float: left;
                width: 32px;
                height: 32px;
                padding: 0 17.5px;
                box-sizing: content-box;
                color: @alto;
                cursor: pointer;
                position: relative;
                overflow: hidden;
                input[type="file"] {
                    position: absolute;
                    top: -100px;
                    bottom: -100px;
                    left: -100px;
                    right: -100px;
                    opacity: 0;
                    cursor: pointer;
                    min-height: 200px;
                }
                svg {
                    width: 32px;
                    height: 32px;
                }
                &:first-of-type {
                    margin-left: 0px;
                }
            }
        }
    }
    .file-upload-container {
        position: absolute;
        top: -12px;
        bottom: -12px;
        left: -12px;
        right: -12px;
        background: white;
        padding: 14px 22px;
        z-index: 2;
        h4 {
            margin-bottom: 8px;
            color: @bulgarianRose;
        }
        .textarea-container {
            float: left;
            width: 100%;
            height: 90px;
            border: 1px solid @mountainMist;
            position: relative;
            textarea {
                resize: none;
                width: 100%;
                height: 64px;
                border: none;
                outline: none !important;
                padding: 10px;
                box-sizing: border-box;
                color: @bulgarianRose;
            }
        }
        span {
            float: right;
            margin-right: 10px;
            color: @curiousBlue;
        }
        .drop-down {
            width: 100%;
            float: left;
            height: 30px;
            border: 1px solid @mountainMist;
            margin-bottom: 16px;
            position: relative;
            &:after {
                content: "";
                position: absolute;
                right: 8px;
                top: 12px;
                width: 0;
                height: 0;
                pointer-events: none;
                border-left: 6px solid transparent;
                border-right: 6px solid transparent;
                border-top: 6px solid @rollingStone;
            }
        }
    }
}

.install-failure-logs {
    z-index: 10000;
    background-color: white;
    .package-installation-report {
        padding: 25px;
        p {
            word-wrap: break-word;
        }
        p.failure {
            color: @alizarinCrimson;
            font-weight: bold;
        }
        p.startjob, p.endjob {
            color: #000;
            font-weight: bold;
        }
        .logs-unknown-error {
            ul {
                padding-left: 40px;
                display: block;
                margin-top: 10px;
            }
        }
    }
}

.dnn-package-upload .file-upload-container {
    &.dnn-upload-bar {
        padding: 12px;
        transition: opacity .4s .6s;
        .upload-bar-container {
            color: @curiousBlue;
            float: left;
            width: 100%;
            height: 100%;
            border: 1px solid @curiousBlue;
            background: #f4f6f7;
            padding: 5px 20px;
            box-sizing: border-box;
            .upload-file-name {
                margin-bottom: 10px;
            }
            .upload-icon {
                width: 42px;
                height: 42px;
                margin: auto;
                svg {
                    margin-top: 8px;
                    margin-bottom: 3px;
                }
            }
            h4 {
                color: @curiousBlue;
                margin: auto;
                text-align: center;
                font-size: 14px;
                margin: 15px 10px 10px;
            }
            .upload-bar-box {
                position: relative;
                float: left;
                width: 100%;
                height: 4px;
                background: @alto;
                margin-top: 5px;
                .upload-bar {
                    width: 0;
                    float: left;
                    background: @curiousBlue;
                    height: 100%;
                    left: 0px;
                    transition: .1s;
                }
            }
        }
    }
    &.upload-error {
        z-index: 3;
        .upload-bar-container {
            border: 1px solid @alizarinCrimson;
            color: @alizarinCrimson;
            h4 {
                color: @alizarinCrimson;
            }
            .view-log-or-try-again {
                text-align: center;
                span {
                    float: none;
                    color: @curiousBlue;
                    cursor: pointer;
                    margin-left: 10px;
                }
            }
            .upload-bar-box {
                background: @alizarinCrimson;
            }
        }
    }
}

.dnn-package-upload .already-installed {
    position: absolute;
    top: -12px;
    bottom: -12px;
    left: -12px;
    right: -12px;
    background: white;
    padding: 14px 22px;
    z-index: 4;
    .already-installed-container {
        color: @mountainMist;
        float: left;
        width: 100%;
        height: 100%;
        border: 1px solid @mountainMist;
        background: @gallery;
        padding: 5px 20px;
        box-sizing: border-box;
        .upload-file-name {
            margin-bottom: 10px;
        }
        .upload-icon {
            width: 42px;
            margin: auto;
            svg {
                margin-top: 8px;
                margin-bottom: 3px;
                width: 42px;
                height: 42px;
            }
        }
        h4 {
            color: @mountainMist;
            margin: auto;
            text-align: center;
            font-size: 12px;
            margin: 10px 10px 15px;
        }
        .repair-or-install {
            text-align: center;
            span {
                color: @curiousBlue;
                cursor: pointer;
            }
        }
    }
}

@import "~dnn-global-styles/index";
@transition: .18s;
.dnn-package-upload {
    float: left;
    width: 100%;
    height: 215px;
    background: @alabaster;
    outline: 1px solid @mountainMist;
    position: relative;
    border: 12px solid @white;
    box-sizing: content-box;
    * {
        box-sizing: content-box;
    }
    &.viewing-log {
        outline: none;
        border: none;
    }
    .dropzone-container {
        position: absolute;
        width: 100%;
        height: 100%;
        z-index: 3;
        background-color: @gallery;
    }
    .no-valid-manifest {
        background-color: @alabaster;
        position: absolute;
        top: -13px;
        left: -13px;
        z-index: 3;
        padding: 45px 25px;
        text-align: center;
        > p {
            margin-bottom: 25px;
        }
        .dnn-radio-buttons {
            margin: 0 auto;
            float: none;
            width: auto;
            display: table;
        }
    }
    &.uploading {
        .dropzone-container {
            background-color: transparent;
            .overlay {
                opacity: 0;
                &.hover {
                    opacity: 1;
                }
                &:hover {
                    opacity: 1;
                    background: rgba(30, 136, 195, 0.9);
                }
            }
        }
    }
    &.already-installed {
        .dropzone-container {
            z-index: 1;
        }
    }
    .overlay {
        position: absolute;
        background: rgba(30, 136, 195, .0);
        top: -12px;
        bottom: -12px;
        left: -12px;
        right: -12px;
        text-align: center;
        transition: @transition;
        z-index: 1;
        &.hover {
            background: rgba(30, 136, 195, .6);
            opacity: 1;
            * {
                pointer-events: none;
            }
            span {
                color: white;
            }
            .buttons {
                .button.upload {
                    color: white;
                }
            }
        }
        &:hover {
            background: rgba(30, 136, 195, .6);
            span {
                color: white;
            }
            .buttons {
                &:hover {
                    .button {
                        color: @alto;
                        &:hover {
                            color: white;
                        }
                    }
                }
                .button {
                    color: white;
                }
            }
        }
        span {
            text-align: center;
            margin-top: 25px;
            float: left;
            width: 100%;
            box-sizing: border-box;
            color: @rollingStone;
            transition: @transition;
            font-size: 14px;
        }
        .buttons {
            margin: auto;
            height: 32px;
            margin-top: 60px;
            width: 201px;
            transition: @transition;
            .button {
                float: left;
                width: 32px;
                height: 32px;
                padding: 0 17.5px;
                box-sizing: content-box;
                color: @alto;
                cursor: pointer;
                position: relative;
                overflow: hidden;
                input[type="file"] {
                    position: absolute;
                    top: -100px;
                    bottom: -100px;
                    left: -100px;
                    right: -100px;
                    opacity: 0;
                    cursor: pointer;
                }
                svg {
                    width: 100%;
                    height: 100%;
                }
                &:first-of-type {
                    margin-left: 0px;
                }
            }
        }
    }
    .file-upload-container {
        position: absolute;
        top: -12px;
        bottom: -12px;
        left: -12px;
        right: -12px;
        background: white;
        padding: 14px 22px;
        z-index: 2;
        h4 {
            margin-bottom: 8px;
            color: @bulgarianRose;
        }
        .textarea-container {
            float: left;
            width: 100%;
            height: 90px;
            border: 1px solid @mountainMist;
            position: relative;
            textarea {
                resize: none;
                width: 100%;
                height: 64px;
                border: none;
                outline: none !important;
                padding: 10px;
                box-sizing: border-box;
                color: @bulgarianRose;
            }
        }
        span {
            float: right;
            margin-right: 10px;
            color: @curiousBlue;
        }
        .drop-down {
            width: 100%;
            float: left;
            height: 30px;
            border: 1px solid @mountainMist;
            margin-bottom: 16px;
            position: relative;
            &:after {
                content: "";
                position: absolute;
                right: 8px;
                top: 12px;
                width: 0;
                height: 0;
                pointer-events: none;
                border-left: 6px solid transparent;
                border-right: 6px solid transparent;
                border-top: 6px solid @rollingStone;
            }
        }
    }
}

.install-failure-logs {
    z-index: 10000;
    background-color: white;
    .package-installation-report {
        padding: 25px;
        p {
            word-wrap: break-word;
        }
        p.failure {
            color: @alizarinCrimson;
            font-weight: bold;
        }
        p.startjob, p.endjob {
            color: #000;
            font-weight: bold;
        }
        .logs-unknown-error {
            ul {
                padding-left: 40px;
                display: block;
                margin-top: 10px;
            }
        }
    }
}

.dnn-package-upload .file-upload-container {
    &.dnn-upload-bar {
        padding: 12px;
        transition: opacity .4s .6s;
        .upload-bar-container {
            color: @curiousBlue;
            float: left;
            width: 100%;
            height: 100%;
            border: 1px solid @curiousBlue;
            background: #f4f6f7;
            padding: 5px 20px;
            box-sizing: border-box;
            .upload-file-name {
                margin-bottom: 10px;
            }
            .upload-icon {
                width: 42px;
                height: 42px;
                margin: auto;
                svg {
                    margin-top: 8px;
                    margin-bottom: 3px;
                }
            }
            h4 {
                color: @curiousBlue;
                margin: auto;
                text-align: center;
                font-size: 14px;
                margin: 15px 10px 10px;
            }
            .upload-bar-box {
                position: relative;
                float: left;
                width: 100%;
                height: 4px;
                background: @alto;
                margin-top: 5px;
                .upload-bar {
                    width: 0;
                    float: left;
                    background: @curiousBlue;
                    height: 100%;
                    left: 0px;
                    transition: .1s;
                }
            }
        }
    }
    &.upload-error {
        z-index: 3;
        .upload-bar-container {
            border: 1px solid @alizarinCrimson;
            color: @alizarinCrimson;
            h4 {
                color: @alizarinCrimson;
            }
            .view-log-or-try-again {
                text-align: center;
                span {
                    float: none;
                    color: @curiousBlue;
                    cursor: pointer;
                    margin-left: 10px;
                }
            }
            .upload-bar-box {
                background: @alizarinCrimson;
            }
        }
    }
}

.dnn-package-upload .already-installed {
    position: absolute;
    top: -12px;
    bottom: -12px;
    left: -12px;
    right: -12px;
    background: white;
    padding: 14px 22px;
    z-index: 4;
    .already-installed-container {
        color: @mountainMist;
        float: left;
        width: 100%;
        height: 100%;
        border: 1px solid @mountainMist;
        background: @gallery;
        padding: 5px 20px;
        box-sizing: border-box;
        .upload-file-name {
            margin-bottom: 10px;
        }
        .upload-icon {
            width: 42px;
            margin: auto;
            svg {
                margin-top: 8px;
                margin-bottom: 3px;
            }
        }
        h4 {
            color: @mountainMist;
            margin: auto;
            text-align: center;
            font-size: 12px;
            margin: 10px 10px 15px;
        }
        .repair-or-install {
            text-align: center;
            span {
                color: @curiousBlue;
                cursor: pointer;
            }
        }
    }
}


fix top padding issue for mobile layout

fix top padding issue for mobile layout

//This sheet contains site-wide used resets & styles

* {
	border-radius: 0 !important;
	outline: none !important;
}

html,body {
	height: 100%;
}

body {
	padding-top: 50px;
}

h1 {
	color: @brand-primary;
}

p {
	-moz-hyphens: auto;
	-o-hyphens: auto;
	-webkit-hyphens: auto;
	-ms-hyphens: auto;
	hyphens: auto;
}

#maincontent {
	padding: 25px 0 50px 0;

	&> *:first-child {
		padding-top: 0;
		margin-top: 0;
	}

	@media @mobile {
		.find {
			margin-top: -20px;
		}
	}
}

.dropdown-menu {
	width: auto;
	min-width: 0;

	li {
		cursor: pointer;
	}
}

a,
button {
	.transition(0.5s) !important;
}

.tooltip {
	font-size: @font-size-base;
	&-inner {
		max-width: none;
	}

}

ul.nav-tabs {
	li {
		a {
			color: #555;
			&:hover {
				color: @body-bg;
				.transition(0.5s);
			}
		}
	}
}

label {
	display: block;
}

span.glyphicon-ok {
	color: #5CB85C;
}

select {
	.form-control-humble;
	color: #333;

	&:hover {
		cursor: pointer;
	}

	&:-moz-focusring {
		// Hack to make ugly outline in Firefox disappear
		color: rgba(0,0,0,0);
		text-shadow: 0 0 0 #333;
	}
}

.editable:focus {
	border: 1px solid @light-red;
	padding: 10px !important;
	background: @body-bg;
}

button.report {
	.btn;
	.btn-warning;
	margin-top: 15px;

	@media @mobile {
		.make-xs-column(12);
		margin-bottom: 15px;
	}
}

//This sheet contains site-wide used resets & styles

* {
	border-radius: 0 !important;
	outline: none !important;
}

html,body {
	height: 100%;
}

body {
	padding-top: 50px;
}

h1 {
	color: @brand-primary;
}

p {
	-moz-hyphens: auto;
	-o-hyphens: auto;
	-webkit-hyphens: auto;
	-ms-hyphens: auto;
	hyphens: auto;
}

#maincontent {
	padding: 25px 0 50px 0;

	&> *:first-child {
		padding-top: 0;
		margin-top: 0;
	}

	@media @mobile {
		padding-top: 0;
	}
}

.dropdown-menu {
	width: auto;
	min-width: 0;

	li {
		cursor: pointer;
	}
}

a,
button {
	.transition(0.5s) !important;
}

.tooltip {
	font-size: @font-size-base;
	&-inner {
		max-width: none;
	}

}

ul.nav-tabs {
	li {
		a {
			color: #555;
			&:hover {
				color: @body-bg;
				.transition(0.5s);
			}
		}
	}
}

label {
	display: block;
}

span.glyphicon-ok {
	color: #5CB85C;
}

select {
	.form-control-humble;
	color: #333;

	&:hover {
		cursor: pointer;
	}

	&:-moz-focusring {
		// Hack to make ugly outline in Firefox disappear
		color: rgba(0,0,0,0);
		text-shadow: 0 0 0 #333;
	}
}

.editable:focus {
	border: 1px solid @light-red;
	padding: 10px !important;
	background: @body-bg;
}

button.report {
	.btn;
	.btn-warning;
	margin-top: 15px;

	@media @mobile {
		.make-xs-column(12);
		margin-bottom: 15px;
	}
}


Fix abnormal width of Cascader in IE/Edge, close #11857

@import "../../style/themes/default";
@import "../../style/mixins/index";
@import "../../input/style/mixin";

@cascader-prefix-cls: ~"@{ant-prefix}-cascader";

.@{cascader-prefix-cls} {
  .reset-component;

  &-input.@{ant-prefix}-input {
    // Add important to fix https://github.com/ant-design/ant-design/issues/5078
    // because input.less will compile after cascader.less
    background-color: transparent !important;
    cursor: pointer;
    width: 100%;
    position: static;
  }

  &-picker-show-search &-input.@{ant-prefix}-input {
    position: relative;
  }

  &-picker {
    .reset-component;
    position: relative;
    display: inline-block;
    cursor: pointer;
    background-color: @component-background;
    border-radius: @border-radius-base;
    outline: 0;
    transition: color .3s;

    &-with-value &-label {
      color: transparent;
    }

    &-disabled {
      cursor: not-allowed;
      background: @input-disabled-bg;
      color: @disabled-color;
      .@{cascader-prefix-cls}-input {
        cursor: not-allowed;
      }
    }

    &:focus .@{cascader-prefix-cls}-input {
      .active;
    }

    &-show-search&-focused {
      color: @disabled-color;
    }

    &-label {
      position: absolute;
      left: 0;
      height: 20px;
      line-height: 20px;
      top: 50%;
      margin-top: -10px;
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
      width: 100%;
      padding: 0 @control-padding-horizontal;
    }

    &-clear {
      opacity: 0;
      position: absolute;
      right: @control-padding-horizontal;
      z-index: 2;
      background: @component-background;
      top: 50%;
      font-size: @font-size-sm;
      color: @disabled-color;
      width: 12px;
      height: 12px;
      margin-top: -6px;
      line-height: 12px;
      cursor: pointer;
      transition: color 0.3s ease, opacity 0.15s ease;
      &:hover {
        color: @text-color-secondary;
      }
    }

    &:hover &-clear {
      opacity: 1;
    }

    // arrow
    &-arrow {
      position: absolute;
      z-index: 1;
      top: 50%;
      right: @control-padding-horizontal;
      width: 12px;
      height: 12px;
      font-size: 12px;
      margin-top: -6px;
      line-height: 12px;
      color: @disabled-color;
      &:before {
        transition: transform .2s;
      }
      &&-expand {
        &:before {
          transform: rotate(180deg);
        }
      }
    }
  }

  &-picker-small &-picker-clear,
  &-picker-small &-picker-arrow {
    right: @control-padding-horizontal-sm;
  }

  &-menus {
    font-size: @font-size-base;
    background: @component-background;
    position: absolute;
    z-index: @zindex-dropdown;
    border-radius: @border-radius-base;
    box-shadow: @box-shadow-base;
    white-space: nowrap;

    ul,
    ol {
      list-style: none;
      margin: 0;
      padding: 0;
    }

    &-empty,
    &-hidden {
      display: none;
    }
    &.slide-up-enter.slide-up-enter-active&-placement-bottomLeft,
    &.slide-up-appear.slide-up-appear-active&-placement-bottomLeft {
      animation-name: antSlideUpIn;
    }

    &.slide-up-enter.slide-up-enter-active&-placement-topLeft,
    &.slide-up-appear.slide-up-appear-active&-placement-topLeft {
      animation-name: antSlideDownIn;
    }

    &.slide-up-leave.slide-up-leave-active&-placement-bottomLeft {
      animation-name: antSlideUpOut;
    }

    &.slide-up-leave.slide-up-leave-active&-placement-topLeft {
      animation-name: antSlideDownOut;
    }
  }
  &-menu {
    display: inline-block;
    vertical-align: top;
    min-width: 111px;
    height: 180px;
    list-style: none;
    margin: 0;
    padding: 0;
    border-right: @border-width-base @border-style-base @border-color-split;
    overflow: auto;
    -ms-overflow-style: -ms-autohiding-scrollbar; // https://github.com/ant-design/ant-design/issues/11857

    &:first-child {
      border-radius: @border-radius-base 0 0 @border-radius-base;
    }
    &:last-child {
      border-right-color: transparent;
      margin-right: -1px;
      border-radius: 0 @border-radius-base @border-radius-base 0;
    }
    &:only-child {
      border-radius: @border-radius-base;
    }
  }
  &-menu-item {
    padding: 5px @control-padding-horizontal;
    line-height: 22px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s;
    &:hover {
      background: @item-hover-bg;
    }
    &-disabled {
      cursor: not-allowed;
      color: @disabled-color;
      &:hover {
        background: transparent;
      }
    }
    &-active:not(&-disabled) {
      &,
      &:hover {
        background: @background-color-base;
        font-weight: 600;
      }
    }
    &-expand {
      position: relative;
      padding-right: 24px;
      &:after {
        .iconfont-font("\e61f");
        .iconfont-size-under-12px(8px);
        color: @text-color-secondary;
        position: absolute;
        right: @control-padding-horizontal;
      }
    }
    &-loading:after {
      .iconfont-font("\e64d");
      animation: loadingCircle 1s infinite linear;
    }

    & &-keyword {
      color: @highlight-color;
    }
  }
}

@import "../../style/themes/default";
@import "../../style/mixins/index";
@import "../../input/style/mixin";

@cascader-prefix-cls: ~"@{ant-prefix}-cascader";

.@{cascader-prefix-cls} {
  .reset-component;

  &-input.@{ant-prefix}-input {
    // Add important to fix https://github.com/ant-design/ant-design/issues/5078
    // because input.less will compile after cascader.less
    background-color: transparent !important;
    cursor: pointer;
    width: 100%;
    position: static;
  }

  &-picker-show-search &-input.@{ant-prefix}-input {
    position: relative;
  }

  &-picker {
    .reset-component;
    position: relative;
    display: inline-block;
    cursor: pointer;
    background-color: @component-background;
    border-radius: @border-radius-base;
    outline: 0;
    transition: color .3s;

    &-with-value &-label {
      color: transparent;
    }

    &-disabled {
      cursor: not-allowed;
      background: @input-disabled-bg;
      color: @disabled-color;
      .@{cascader-prefix-cls}-input {
        cursor: not-allowed;
      }
    }

    &:focus .@{cascader-prefix-cls}-input {
      .active;
    }

    &-show-search&-focused {
      color: @disabled-color;
    }

    &-label {
      position: absolute;
      left: 0;
      height: 20px;
      line-height: 20px;
      top: 50%;
      margin-top: -10px;
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow: hidden;
      width: 100%;
      padding: 0 @control-padding-horizontal;
    }

    &-clear {
      opacity: 0;
      position: absolute;
      right: @control-padding-horizontal;
      z-index: 2;
      background: @component-background;
      top: 50%;
      font-size: @font-size-sm;
      color: @disabled-color;
      width: 12px;
      height: 12px;
      margin-top: -6px;
      line-height: 12px;
      cursor: pointer;
      transition: color 0.3s ease, opacity 0.15s ease;
      &:hover {
        color: @text-color-secondary;
      }
    }

    &:hover &-clear {
      opacity: 1;
    }

    // arrow
    &-arrow {
      position: absolute;
      z-index: 1;
      top: 50%;
      right: @control-padding-horizontal;
      width: 12px;
      height: 12px;
      font-size: 12px;
      margin-top: -6px;
      line-height: 12px;
      color: @disabled-color;
      &:before {
        transition: transform .2s;
      }
      &&-expand {
        &:before {
          transform: rotate(180deg);
        }
      }
    }
  }

  &-picker-small &-picker-clear,
  &-picker-small &-picker-arrow {
    right: @control-padding-horizontal-sm;
  }

  &-menus {
    font-size: @font-size-base;
    background: @component-background;
    position: absolute;
    z-index: @zindex-dropdown;
    border-radius: @border-radius-base;
    box-shadow: @box-shadow-base;
    white-space: nowrap;

    ul,
    ol {
      list-style: none;
      margin: 0;
      padding: 0;
    }

    &-empty,
    &-hidden {
      display: none;
    }
    &.slide-up-enter.slide-up-enter-active&-placement-bottomLeft,
    &.slide-up-appear.slide-up-appear-active&-placement-bottomLeft {
      animation-name: antSlideUpIn;
    }

    &.slide-up-enter.slide-up-enter-active&-placement-topLeft,
    &.slide-up-appear.slide-up-appear-active&-placement-topLeft {
      animation-name: antSlideDownIn;
    }

    &.slide-up-leave.slide-up-leave-active&-placement-bottomLeft {
      animation-name: antSlideUpOut;
    }

    &.slide-up-leave.slide-up-leave-active&-placement-topLeft {
      animation-name: antSlideDownOut;
    }
  }
  &-menu {
    display: inline-block;
    vertical-align: top;
    min-width: 111px;
    height: 180px;
    list-style: none;
    margin: 0;
    padding: 0;
    border-right: @border-width-base @border-style-base @border-color-split;
    overflow: auto;
    &:first-child {
      border-radius: @border-radius-base 0 0 @border-radius-base;
    }
    &:last-child {
      border-right-color: transparent;
      margin-right: -1px;
      border-radius: 0 @border-radius-base @border-radius-base 0;
    }
    &:only-child {
      border-radius: @border-radius-base;
    }
  }
  &-menu-item {
    padding: 5px @control-padding-horizontal;
    line-height: 22px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s;
    &:hover {
      background: @item-hover-bg;
    }
    &-disabled {
      cursor: not-allowed;
      color: @disabled-color;
      &:hover {
        background: transparent;
      }
    }
    &-active:not(&-disabled) {
      &,
      &:hover {
        background: @background-color-base;
        font-weight: 600;
      }
    }
    &-expand {
      position: relative;
      padding-right: 24px;
      &:after {
        .iconfont-font("\e61f");
        .iconfont-size-under-12px(8px);
        color: @text-color-secondary;
        position: absolute;
        right: @control-padding-horizontal;
      }
    }
    &-loading:after {
      .iconfont-font("\e64d");
      animation: loadingCircle 1s infinite linear;
    }

    & &-keyword {
      color: @highlight-color;
    }
  }
}