@import '../lib/3L/3L';
@import 'rules.less';

@primary: #3276b1;
@red: #de5b5b;
@orange: #debd5b;
@lgreen: #9dde5b;
@rgreen: #5bde7c;
@lblue: #5bdede;
@rblue: #5b7cde;
@purple: #9d5bde;
@pink: #de5bbd;
@anthrazit: #222222;
@grey-gradient: #dad9dc;

@list-width: 320px; //must reflect the width of the left frame
@toc-width: 200px; // defines the TOC's width


/*
 * General
 */
body {
    font-family: "Open Sans", "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif;
    font-size: 13px;
}

h1 {
    margin-bottom: .8em;
    font-size: 2.3em;

    a { color: #000 }
}

h2 {
    //border-bottom: 1px solid #999;

    margin-top: 2.1em;
    font-size: 1.4em;

    @left-bar-width: 2em;

    html:not(.list) & {
        text-transform: uppercase;
        padding-bottom: 0.3em;
        position: relative;
        overflow: hidden;
        text-align: left;
        padding-left: @left-bar-width + 1em;

        &:before, &:after {
            position: absolute;
            bottom: .44em;
            overflow: hidden;
            width: 100%;
            height: .75em;
            content: '\a0';
            margin-left: 1em;
            // diagonal stripes background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAEElEQVQIHWNgQAX/kblEcgCBwgP9UmTMJwAAAABJRU5ErkJggg==); // generated on http://www.patternify.com
            background-color: #999;
        }
        &:before {
            margin-left: -(@left-bar-width+1em);
            width: @left-bar-width;
            text-align: right;
        }
        &:after {

        }
    }

    html.list & {
        border-bottom: none;
    }
}

h3 {
    font-size: 1.1em;
    line-height: 1.2em;
    font-weight: 700;
    border-bottom: @dotted;

    [data-lang-entity] > :first-child { display: none; }

    &.signature {
        text-decoration: none;

        &[data-lang-entity] {
            > a:first-child { font-weight: 500; margin: 0 0 -1px 0; display: none; }
            > pre { border-top-left-radius: 0; margin-top: -1px; }
        }

        code {
            box-shadow: none;
            white-space: pre;
            -ms-word-break: break-all;
            word-break: break-all;
            word-break: break-word;
            padding-left: 0;
        }
    }
}

h4 {
    font-size: 1em;
    margin-bottom: .3em;
}

a[name]:not([href]) {
    color: inherit;
    text-decoration: none;

    &:hover, &:active {
        background-color: transparent !important;
    }

    &[title] {
        display: inline-block;
        border-bottom: @dotted;
    }

    &.error {
        background-color: #f00 !important;
        color: #fff !important;

        &:before {
            content: "invalid link: ";
        }
    }
}

a:link,
a:visited {
    [data-lang-entity] > &:first-child,
    #results & {
        text-decoration: none;
    }
}

a:hover,
a:active {
    [data-lang-entity] > &:first-child,
    #results & {
        text-decoration: none;
    }
}

a[target=_top][href],
a[target=_parent][href],
a[target=_blank][href] {
    &:after {
        display: inline-block;
        margin-left: 0.4em;
        font-size: .9em;
        .fontAwesome('\f08e');
    }
}

acronym {
    display: inline-block;
    border-bottom: @dotted;
    font-style: italic;
}

ul {
    list-style: none;
    padding: 0;
    margin-left: 2em;

    li {
        .bullet-icon();

        + li {
            margin-top: .5em;
        }
    }
}

ol {
   margin-left: 2.3em;
   padding-left: 0;

   li + li { margin-top: .5em }
}

table {
    margin: 0;
    padding: 0;

    &:not(.overview) {
        th {
            font-size: 1.1em;
            font-weight: bold;
            margin: .5em 0 0 0;
            padding: 3px 5px;
            border-radius: 4px;

            &:after {
                content: ':';
            }
        }

        td {
            margin: 0 0 0 1em;
            padding: .5em;
            position: relative;

            &:before {
                position: absolute;
                top: 0.3em;
                left: -1em;
                .glyphicon("\e080");
                display: block;
                margin: 5px auto 10px;
                font-size: .8em;
            }
        }
    }

    &.overview {
        max-width: 100%;

        th, td {
            padding: 0.25em 0 0.25em 0;
            vertical-align: top;
        }

        th {
            text-align: right;
            font-weight: bold;

            position: relative;

            code {
                @iconSpacing: 0.3em;
                @iconWidth: .7em;
                @inColor: #d43f3a;
                @outColor: #4cae4c;

                &[data-param-type=in],
                &[data-param-type=out] {
                    padding-left: @iconWidth + @iconSpacing;
                }

                &[data-param-type=in_out] {
                    padding-left: 2*@iconWidth + @iconSpacing;
                }

                &[data-param-type]:before,
                &[data-param-type]:after {
                    position: absolute;
                    top: .3em;
                    left: 0;
                    font-size: 0.7em;
                }

                &[data-param-type=in]:before {
                    .glyphicon("\e161");
                    color: @inColor;
                }

                &[data-param-type=out]:before {
                    .glyphicon("\e163");
                    color: @outColor;
                }

                &[data-param-type=in_out]:before,
                &[data-param-type=in_out]:after {
                    left: 0;
                }

                &[data-param-type=in_out]:before {
                    .glyphicon("\e161");
                    color: @inColor;
                }

                &[data-param-type=in_out]:after {
                    .glyphicon("\e163");
                    color: @outColor;
                    left: @iconWidth + @iconSpacing;
                }
            }
        }

        td {
            padding-left: 0.45em;

            [data-lang-entity] > :first-child {
                display: none;
            }
        }

        code {
            position: relative;
            top: .15em;
            line-height: 1.428571429em; // constant copied from bootstrap
            white-space: pre;
            padding-left: 0;
            padding-right: 0;
        /* makes long lines unnecessarily wrap (problem occurred when switch von definition lists to tables
        -ms-word-break: break-all;
            word-break: break-all;
            word-break: break-word;
            */
        }

        .glyphicon {
            font-size: .7em;
        }
    }
}

pre {
    .bg-gradient(#f5f5f5, 0%);
    .border-radius(4px);
    .box-shadow(inset 0 1px 2px rgba(0, 0, 0, .1));
    border: 1px solid rgba(0,0,0,.2);

    font-size: .92em;
    line-height: 1.5em;

    &.console {
        .bg-gradient(#000, 7%);
        color: #fff;
    }

    margin: 0;

    // bootstrap reset
    .overview > dl &,
    .summary_signature &,
    h3 &,
    h3 &.highlight {
        padding: 0;
        color: inherit;
        background-color: transparent;
        background-image: none;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }

    .overview > dl &,
    .summary_signature &,
    & code {
        box-shadow: none;
    }
}

pre + :not(.more):not(.less) {
    margin-top: 1.5em;
}

pre + .more,
pre + .less {
    position: relative;
    display: block;
    margin: -1.33em 1px 1px 1px;
    border-bottom-left-radius: 3px;
    border-bottom-right-radius: 3px;
    background-color: rgba(255,255,255,.7);
    cursor: pointer;

    &:hover { background-color: fadeout(#3276b1, 40%); color: #fff; }
}

pre + .more {
    .more-link();
    .box-shadow(inset 0 1px 2px rgba(0, 0, 0, .1));
}

pre + .less {
    .less-link();
    background-color: transparent;
}



html code,
html tt {
    color: #333;
    background: transparent;
    border: none;
    font-size: 1em;
}

html .summary_signature code,
html .overview code {
    box-shadow: none;
    font-size: 1em;
    white-space: pre-wrap;
    padding-left: 0;
}

html .highlight {
    margin-bottom: 1em;
    background-color: transparent;
}

.path_label {
    text-align: right;
    display: block;
    margin-right: .7em;

    font-size: .7em;

    .label { font-size: 1em; color: #000; }

    .highlight + & {
        margin-top: -1.5em;
        margin-bottom: 1.5em;
    }
}

html.list {
    body {
        padding: 5px 15px;
        background-color: transparent;
    }

    &:after {
        content: "";
        background-image: url(../img/list.png);
        background-position: right bottom;
        background-repeat: no-repeat;
        background-size: 362px;
        background-color: @grey-gradient;
        opacity: 1;
        top: 0;
        left: 0;
        bottom: 0;
        right: 0;
        position: fixed;
        z-index: -1;
        .transition(all .4s);
    }


    @media @tablet, @small-list {
        &.shows-results {
            &:after {
                background-image: url(../img/list-small.png);
                background-color: #fff;
            }
        }

        body {
            padding: 0;
        }

        form#search {
            .pre-action {
                margin: 10px;

                h1 {
                    a {
                        padding: 58px 0 0 0;
                        background-position: center top;
                    }

                    font-size: 1.2em;
                    text-align: center;
                }
            }

            margin: 0;
            button, input {
                border-radius: 0;
                box-shadow: none;
            }
            button {
                border-right: none;
            }
            input {
                border: none;
            }
        }

        #results > ol {
            margin: 0;

            li[data-lang-entity-container] > span[data-lang-entity] {
                float: none;
                right: 0;

                > :first-child {
                    border-radius: 0;
                    width: 100%;
                    margin: 0 !important;
                }
            }

            > li {
                margin-top: 0em !important;
            }

            ol {
                background-color: transparent;
                border: 0;
                margin: 0;
            }
        }
    }
}

.nav {
    .box();

    ul&, ul,
    ol&, ol {
        margin-left: 0;
        list-style-type: none;
    }

    ul&,
    ol& {
        ul, ol {
            li a {
                padding-left: 2.9em;
                &:before {
                    left: 2.0em;
                }
            }
        }

        li {
            &:before {
                // we want the arrows to appear in the link itself
                display: none;
            }

            + li { margin-top: 0 }

            a {
                padding: .4em 1.7em;
                display: block;
                font-size: 0.9em;

                &:hover,
                &:active {
                    text-decoration: none;
                    color: #000;
                    background-color: rgba(0, 0, 0, .05);
                }

                color: lighten(@primary, 5%);
                .bullet-icon("\e080", before, .7em, auto, auto, .7em);
            }
        }

        li.active a:not(.home) {
            color: #000;
            font-weight: 700 !important;
            text-shadow: none;
        }

        li.active a.top i.fa-chevron-circle-up {
            &:before { content: "\f192"; }
        }

        li.meta {
            a {
                width: 50%;
                display: inline-block;
                text-align: center;
                padding-left: 0;
                padding-right: 0;
                &:before { display: none }

                border-left: 1px solid lighten(@primary, 45%);
            }

            a:first-child {
                border-left: none;
            }

            border-bottom: 1px solid lighten(@primary, 45%);
        }

        li.home {
            color: #000;background-color: #d9edf7;
            //&:hover { background-color: #3a87ad; color: #fff; }

            a {
                text-align: center;
                padding-left: .5em;
                &:before { display: none }
                border-bottom: 1px solid lighten(@primary, 45%);
            }
        }

        li:last-child a {
            border-bottom: none; // if only top link
        }
    }
}

html:not(.list) {
    .box();
    border: none;

    body {
        background-color: transparent;
    }

    #content {
        h1 {margin-top: -5px;}
        padding: 20px 15px 20px 20px;
        margin-right: @toc-width+30px;
        background-color: #fff;
        border-right: 1px solid @grey-gradient;
        border-bottom: 1px solid @grey-gradient;
    }

    #toc {
        position: fixed;
        top: 15px;
        right: @toc-width+35px;
        max-height: 93%;
        width: @toc-width;
        margin-right: -(@toc-width+20px);
        overflow-y: auto;

        .nav {
            background-color: #fff;
            background-image: none;
        }

        .title {
            display: none;
            text-transform: uppercase;
            color: lighten(@primary, 42%);
            text-shadow: 0 -1px 1px rgba(102, 102, 102, 0.5), 0 1px 1px rgba(255,255,255,0.5);
            font-size: 2.1em;
            text-align: center;
            margin: -.39em 0 0 -.9em;

             -webkit-mask-image: -webkit-linear-gradient(-45deg, rgba(0,0,0,0.5), black);
             mask-image: linear-gradient(-45deg, rgba(0,0,0,0.5), black);
        }

        a {
            text-transform: uppercase;
        }
    }

    @media @tablet, @small-window {
        #content {
            margin-right: 0;
        }

        #toc {
            position: relative;
            top: auto;
            right: auto;
            float: right;
            padding: 15px; // swapping padding and margin makes the headline bars respect the space to the TOC
            margin: -20px -15px 0 0;

            .nav {
                .box();
            }
        }
    }
}

.description {
    margin: 1em 0;
}

:not(h2) + .method_details {
    margin-top: 3em;
}

.signature {
    font-size: 1.2em;
    font-weight: normal;
    font-family: Monaco,Menlo,Consolas,"Courier New",monospace;

    padding: 0;
    margin: 1em 0;

    tt { font-family: Monaco,Menlo,Consolas,"Courier New",monospace; }
    .overload { display: block; }
    .extras { font-weight: normal; font-family: sans-serif; color: #444; font-size: 1em; }
    .aliases { display: block; font-weight: normal; font-size: 0.9em; font-family: sans-serif; margin-top: 0px; color: #555; }
    .aliases .names { font-family: Monaco, Consolas, Courier, monospace; font-weight: bold; color: #000; font-size: 1.2em; }
}

ul.summary {
    margin-left: 0;

    li {
        .summary_signature,
        .summary_signature * {
            padding: 1px 0;
        }

        .summary_desc {
            margin-left: 32px;
            display: block;

            tt { font-size: 0.9em; }
        }

        &:before { display: none }
    }

    &.compact li {
        display: inline-block;

        margin-right: 2em;
        margin-bottom: .3em;
    }

    li.deprecated .summary_signature {
        a:link,
        a:visited {
            text-decoration: line-through; font-style: italic;
        }
    }
}

.tags {
    li:before {
        display: none;
    }

    .examples .tag_title { margin-bottom: 10px; font-weight: bold; }
    .examples .inline p { padding: 0; margin: 0; margin-left: 15px; font-weight: bold; font-size: 0.9em; }

    .overload .overload_item { list-style: none; margin-bottom: 25px; }
    .overload .overload_item .signature {
        padding: 2px 8px;
        background: #e5e8ff; border: 1px solid #d8d8e5; -moz-border-radius: 3px; -webkit-border-radius: 3px;
    }
    .overload .signature { margin-left: -15px; font-family: monospace; display: block; font-size: 1.1em; }
    .overload .docstring { margin-top: 15px; }
}

ul.params {
    list-style-type: none;

    li {

    }
}


/*
 * Developer Mode Window
 */
#devModeWindow {
    position: fixed;
    bottom: 0;
    right: 0;
    border-top-left-radius: 4px;
    padding: 0.5em 0.5em 0.5em .8em;
    background-color: #ccc;
    opacity: 0.8;
}



/*
 * Tooltip
 */
.tooltip {
    .tooltip-inner {
        font-weight: 500;
        padding-bottom: 6px;
    }
}


/*
 * Popover
 */
.popover {
    .box-shadow(0 3px 10px rgba(0, 0, 0, 0.5));
    //border-top-left-radius: 0;

    .popover-title {
        display: none;

        padding: 1px 5px;

        position: absolute;
        left: -1px;
        top: -17px;
        text-decoration: none;
        font-weight: 700;
        font-size: 11px;
        line-height: 13px;
        background-color: #f00;
        border: 1px solid #999;
        color: #fff;
    }

    .popover-content {
        padding: 0;

        .description {
            margin: .5em .7em;
        }

        .more {
            border-top: @dotted;
            margin: 0;
            padding: .5em .7em;
            font-size: .8em;
            font-weight: 700;
            font-style: italic;
        }
    }
}

/*
 * Permalinks
 */
.permalink {
    cursor: pointer;
    .border-radius(4px);
    @color: fadeout(#428bca, 0%);
    .box-shadow(0 1px 2px @color);

    @color1: lighten(@color, 30%);
    @color2: lighten(@color1, 5%);

    background-color: @color1;
    background-image: linear-gradient(45deg, @color2 25%, transparent 25%, transparent 75%, @color2 75%, @color2),
    linear-gradient(45deg, @color2 25%, transparent 25%, transparent 75%, @color2 75%, @color2);
    background-size: 6px 6px;
    background-position:0 0, 3px 3px;

    position: relative;
}

#permalinkModal {
    th, td {
        vertical-align: top;
        padding-bottom: .5em;
    }

    td {
        padding-left: .5em;
        white-space: normal;
        -ms-word-break: break-all;
        word-break: break-all;
        word-break: break-word;
    }
}

/*
 * Search
 */
#search {
    margin: 10px 10px 20px 10px;

    .pre-action {
        margin-top: -10px;
        margin-bottom: 5px;

        h1 {
            position: relative;
            padding: 0;
            margin: 0;
            font-size: 22px;

            a {
                display: block;
                padding: 35px 0px 29px 94px;
                background-image: url(../img/seqan_logo.png);
                background-size: 80px 53px;
                background-repeat: no-repeat;
                background-position: center left;

                @media @highres {
                    background-image: url(../img/seqan_logo.highres.png);
                }
            }
        }
    }

    [type=search] {
        width: 100%;

        background-image: url('data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIGJhc2VQcm9maWxlPSJmdWxsIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWxuczpldj0iaHR0cDovL3d3dy53My5vcmcvMjAwMS94bWwtZXZlbnRzIj4KPGc%2BCgk8cG9seWdvbiBmaWxsPSIjNjY2IiBwb2ludHM9IjkuMjA3LDYuMTI2IDcuNzkzLDcuNTQxIDExLjc5MywxMS41NDEgMTMuMjA3LDEwLjEyNiIgLz4KCTxwYXRoIGZpbGw9IiM2NjYiIGQ9Ik01LjkxNywyYzEuNjA4LDAsMi45MTcsMS4zMDgsMi45MTcsMi45MTdTNy41MjUsNy44MzMsNS45MTcsNy44MzNTMyw2LjUyNSwzLDQuOTE3UzQuMzA4LDIsNS45MTcsMgoJCSBNNS45MTcsMEMzLjIwMSwwLDEsMi4yMDEsMSw0LjkxN3MyLjIwMSw0LjkxNyw0LjkxNyw0LjkxN3M0LjkxNy0yLjIwMSw0LjkxNy00LjkxN0MxMC44MzMsMi4yMDEsOC42MzIsMCw1LjkxNywwTDUuOTE3LDB6IiAvPgo8L2c%2BCjwvc3ZnPgo%3D');
        background-position: -24px 10px;

        &.not-empty:focus {
            background-image: none;
        }
    }

    .btn {
        font-weight: 700;
        color: #fff;
    }

    .btn:hover {
        -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.225);
        box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.225);
        color: #fff;
    }

    .btn:active,
    .btn.active {
        -webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.45);
        box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.45);
        color: #eee;
    }

    button.multiselect {
        position: relative;
        text-align: left;
        .transition(all .3s ease-out);
        min-width: 40px;

        i {
            top: 0;
            line-height: inherit;
        }

        small {
            font-size: 70%;
            position: absolute;
            top: 11px;

            .transition(all .3s ease-out);
            opacity: 0;
            right: 6.8em;
        }
    }

    button.multiselect:hover,
    .open > button.multiselect {
        min-width: 6.5em;

        small {
            right: 8px;
            opacity: 1;
        }
    }
}

#results {
    ol {
      list-style-type: none;
        margin-left: 10px;
        margin-right: 10px;

        ol { margin: 0 0 1em 0 }

        li:before { display: none; }

        // more link
        li.more:not(.result) {
            padding-left: 0;
            a {
                .more-link();
                padding-bottom: 0.75em;
            }
        }

        li.result {
            background: transparent;
            list-style: none;

            b {
                font-weight: bold;
            }

            h2, div { font-weight: 300; }

            h2 {
                font-size: 1.1em;
                margin: 0;
                padding: 0;

                a {
                    white-space: normal;
                    -ms-word-break: break-all;
                    word-break: break-all;
                    word-break: break-word;

                    &:before { top: .5em } // corrects the arrow pos

                    .aka { color: #333333; } // bootstrap: @text-color

                    &:not(:only-child) { // = followed by .subentries
                        padding-bottom: 0;
                    }
                }

                .aka {
                    font-size: 0.9em;
                    &:before {
                        content: "synonyms: ";
                        font-style: italic;
                    }
                }

                .subentries {
                    font-size: 0.9em;
                    &:before {
                        content: 'matches:';
                        font-style: italic;
                        display: block;
                        margin-left: 1.65em;
                    }
                }
            }
        }

        li.result.more {
            display: none;
        }

        // search result box annotation
        li[data-lang-entity-container] {
            > span[data-lang-entity] {
                float: right;
                z-index: 2;
                display: block;
                position: relative;
                top: 1px;
                right: -2px;
                margin-right: 0;
                font-size: 1em;

                > :nth-child(1) { border-top-left-radius: 0; border-bottom-right-radius: 0; }
                > :nth-child(2) { display: none; }
            }
        }
    }
}

/*
 * Language Entities
 */
form .multiselect-container {
    li:first-child { // all
      background-color: #fff !important;
      label { color: #000 !important; }
      font-size: 1em !important;
      text-transform: none !important;
    }

    li:before {
      display: none;
    }

    li:not([class]) {
      margin: 0;
      background-color: #000;
      color: #fff;
      font-size: 0.8em;
      text-transform: uppercase;

      label {
        font-weight: 700;
      }

      &:hover {
        background-color: #000;
        color: #fff;
      }
    }

    li {
        margin-top: 0;
    }

    li.active a {
        background-color: #fff;
    }

    label {
        color: #fff;
        padding: 0.1em 0.5em 0.1em 0.45em;
        margin: .2em .2em .2em 1em !important;
        border-radius: .25em !important;
        display: inline-block;

        input {
            margin-left: -30px !important;
        }

        & .multiselect-group {
            padding-left: 0.5em;
        }
    }
}

[data-lang-entity],
.data-lang-entity-example {
    position: relative;
    white-space: nowrap;

    > :first-child {
        display: inline-block;
        position: relative;
        bottom: 0.15em;

        padding: .1em .5em .2em !important;
        margin: 0 0.3em 0 0.2em;
        font-family: "Open Sans", "Lucida Sans", "Lucida Grande", Verdana, Arial, sans-serif;
        font-size: .75em;
        font-weight: bold;
        text-transform: none;
        line-height: 1;
        color: #ffffff;
        text-align: center;
        white-space: nowrap;
        vertical-align: baseline;
        border-radius: .25em;
        border: 1px solid #f00;

        background-color: #f00000;
    }

    > :first-child {
        cursor: help;
        .transition(color .2s, background-color .2s);

        &:hover {
            //.animation(animation1 1.5s linear 0s infinite alternate);
        }
    }

    > :nth-child(2) {
        white-space: normal;
    }

    // Typed headings
    h1& {
        display: table;

        > * {
            display: table-cell;
        }

        :nth-child(2) {
            // allow breaks, otherwise the headline would easily interfere with the TOC
            white-space: normal;
            -ms-word-break: break-all;
            word-break: break-all;
            word-break: break-word;

            > div {
                margin-top: .3em;
                font-size: .5em;
                white-space: normal;

                [data-lang-entity] > :first-child {
                    //display: none;
                    font-size: .65em;
                    top: -.30em;
                }

                > [data-lang-entity]:first-child > :first-child {
                    margin-left: 0;
                }
            }
        }
    }
}

.data-lang-entity-example > :first-child { background: @rblue; border-color: darken(@rblue, 20%); }


html.page_languageentities {
    div[data-lang-entity-container] + div[data-lang-entity-container] {
        margin-top: 2em;
    }
}

.langEntityRules(@langEntity, @color, hide) {
    .langEntityRules(@langEntity, @color);

    html:not(.list) [data-lang-entity=@{langEntity}] {
      > *:first-child {
           display: none;
       }
    }
}

/*
 * Creates rules for each given lang entity
 */
.langEntityRules(@langEntity, @color) {
    @border-darken: 5%;

    [data-lang-entity=@{langEntity}] {
        > :first-child {
            background-color: transparent;
            color: @color;
            border-color: darken(@color, @border-darken);

            &:hover {
                color: #fff;
                background-color: @color;
            }

            // elements in a typed container with the same type are not annotated
            html:not(.list) [data-lang-entity-container=@{langEntity}] & {
                display: none;
            }

            // exceptions are the direct headings
            html:not(.list) [data-lang-entity-container=@{langEntity}] > h2& {
                display: inline-block;
            }
        }
    }

    /*
    // annotates h3
    h3[data-lang-entity=@{langEntity}] {
        display: table;
        font-size: 1.1em;
        padding-bottom: .3em;
        width: 100%;
        font-weight: 700;

        > * { display: table-cell !important; }

        > :first-child {
            font-size: 1rem;
            font-weight: 700 !important;
            width: 3.6rem;
            vertical-align: middle;
            text-align: center;
            background-color: @color;
            border-color: darken(@color, 10%);
            color: #fff;

            &:hover {
                background-color: darken(@color, 10%);
            }
        }

        > :nth-child(2) {
            padding-left: 1.9rem;
        }
    }
    /**/


    // Language Entity Type - Variants on the Language Entities page
    html.page_languageentities [data-lang-entity-container=@{langEntity}] {
        dt {
            padding: 0;
            background-color: transparent;
            background-image: none;
            font-size: 1.0em;
        }
    }
    html.page_languageentities dt {
        &[data-lang-entity=@{langEntity}] {
            padding-left: 0;

            &:before { display: none }

            > :first-child {
                background-color: @color;
                color: #fff;
                &:hover { background-color: color; }
            }

            &:after { content: "" }
        }
    }


    // headings and definitions on the language entity types page are colored and annotated
    html:not(.list) h2 {
        &[data-lang-entity=@{langEntity}] {
            padding-left: 0;

            &:before { display: none }

            &:after {
                background-color: @color;
                background-image: none;
            }

            > :first-child {
                background-color: @color;
                color: #fff;
                &:hover { background-color: color; }

                margin-left: 0;
                margin-right: 1.5em;
                top: -.35em;
                font-size: .54em;
            }
        }
    }

    // Filter dropdown
    [data-lang-entity-container=@{langEntity}] label {
        -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
        -moz-box-sizing: border-box;    /* Firefox, other Gecko */
        box-sizing: border-box;         /* Opera/IE 8+ */
        background-color: @color;
        border: 1px solid darken(@color, @border-darken);
    }

    // Popover
    .popover[data-lang-entity-container=@{langEntity}] .popover-title {
        background-color: @color;
    }

    // Search result groupings
    #results li[data-lang-entity-container=@{langEntity}] {
        > span[data-lang-entity=@{langEntity}] > :first-child {
            background-color: @color;
            color: #fff;

            &:hover {
                background-color: darken(@color, 10%);
            }
        }

        > ol {
            background-color: #fff;
            background-image: none;
            .border-radius(4px);
            border: 1px solid @color;
            .box-shadow(inset 0 1px 2px rgba(0,0,0,.1));

            [data-lang-entity] > :first-child { display: none; }
            li.more:not(.result) {
                border-top: @dotted;
                border-color: @color;

                @media @tablet, @small-list {
                    border-top: none;
                }
            }
        }
    }
}

.langEntityRules(typedef, @rgreen);
.langEntityRules(grouped_typedef, @rgreen);
.langEntityRules(global_typedef, @rgreen);
.langEntityRules(member_typedef, @rgreen);

.langEntityRules(concept, lighten(@red, -20%));
.langEntityRules(class, @red);
.langEntityRules(specialization, @red);
.langEntityRules(enum, lighten(@red, 20%));

.langEntityRules(metafunction, @rblue);
.langEntityRules(global_metafunction, @rblue);
.langEntityRules(interface_metafunction, @rblue);

.langEntityRules(function, @lblue);
.langEntityRules(global_function, lighten(@lblue, 10%));
.langEntityRules(interface_function, darken(@lblue, 20%));
.langEntityRules(member_function, @lblue);

.langEntityRules(tag, @purple);
.langEntityRules(grouped_tag, @purple);

.langEntityRules(variable, @lgreen);
.langEntityRules(global_variable, @lgreen);
.langEntityRules(local_variable, @lgreen);
.langEntityRules(member_variable, @lgreen);

.langEntityRules(adaption, lighten(@orange, -10%));
.langEntityRules(macro, lighten(@orange, 10%));

.langEntityRules(template_parameter, #999);

.langEntityRules(page, lighten(@pink, -10%), hide);
.langEntityRules(group, lighten(@pink, 10%), hide);
.langEntityRules(tutorial, #000);

.langEntityRules(unknown, #f00);


// Exceptions
// .. Template Parameter
html [data-lang-entity=template_parameter] > *:first-child,
html .popover[data-lang-entity-container=template_parameter] .popover-title,
html.page_languageentities [data-lang-entity-container=template_parameter] [data-lang-entity-ideogram]:before {
/* RAINBOW
    background: -moz-linear-gradient(-45deg, rgba(217,63,63,1) 0%, rgba(217,178,63,1) 14%, rgba(140,217,63,1) 29%, rgba(63,217,102,1) 43%, rgba(63,217,217,1) 57%, rgba(63,102,217,1) 71%, rgba(140,63,217,1) 86%, rgba(217,63,178,1) 100%);
    background: -webkit-linear-gradient(transparent, transparent),-webkit-gradient(linear, left top, right bottom, color-stop(0%,rgba(217,63,63,1)), color-stop(14%,rgba(217,178,63,1)), color-stop(29%,rgba(140,217,63,1)), color-stop(43%,rgba(63,217,102,1)), color-stop(57%,rgba(63,217,217,1)), color-stop(71%,rgba(63,102,217,1)), color-stop(86%,rgba(140,63,217,1)), color-stop(100%,rgba(217,63,178,1)));
    background: -webkit-linear-gradient(transparent, transparent),-webkit-linear-gradient(-45deg, rgba(217,63,63,1) 0%,rgba(217,178,63,1) 14%,rgba(140,217,63,1) 29%,rgba(63,217,102,1) 43%,rgba(63,217,217,1) 57%,rgba(63,102,217,1) 71%,rgba(140,63,217,1) 86%,rgba(217,63,178,1) 100%);
    background: -o-linear-gradient(-45deg, rgba(217,63,63,1) 0%,rgba(217,178,63,1) 14%,rgba(140,217,63,1) 29%,rgba(63,217,102,1) 43%,rgba(63,217,217,1) 57%,rgba(63,102,217,1) 71%,rgba(140,63,217,1) 86%,rgba(217,63,178,1) 100%);
    background: -ms-linear-gradient(-45deg, rgba(217,63,63,1) 0%,rgba(217,178,63,1) 14%,rgba(140,217,63,1) 29%,rgba(63,217,102,1) 43%,rgba(63,217,217,1) 57%,rgba(63,102,217,1) 71%,rgba(140,63,217,1) 86%,rgba(217,63,178,1) 100%);
    background: linear-gradient(135deg, rgba(217,63,63,1) 0%,rgba(217,178,63,1) 14%,rgba(140,217,63,1) 29%,rgba(63,217,102,1) 43%,rgba(63,217,217,1) 57%,rgba(63,102,217,1) 71%,rgba(140,63,217,1) 86%,rgba(217,63,178,1) 100%);
*/
/* RED & BLACK
//  background: mix(@red, @anthrazit); /* Old browsers */
//  background: -moz-linear-gradient(-45deg,  @red 0%, @red 50%, @anthrazit 51%, @anthrazit 100%); /* FF3.6+ */
//  background: -webkit-gradient(linear, left top, right bottom, color-stop(0%,@red), color-stop(50%,@red), color-stop(51%,@anthrazit), color-stop(100%,@anthrazit)); /* Chrome,Safari4+ */
//  background: -webkit-linear-gradient(-45deg,  @red 0%,@red 50%,@anthrazit 51%,@anthrazit 100%); /* Chrome10+,Safari5.1+ */
//  background: -o-linear-gradient(-45deg,  @red 0%,@red 50%,@anthrazit 51%,@anthrazit 100%); /* Opera 11.10+ */
//  background: -ms-linear-gradient(-45deg,  @red 0%,@red 50%,@anthrazit 51%,@anthrazit 100%); /* IE10+ */
//  background: linear-gradient(135deg,  @red 0%,@red 50%,@anthrazit 51%,@anthrazit 100%); /* W3C */
//  filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='@red', endColorstr='@anthrazit',GradientType=1 ); /* IE6-9 fallback on horizontal gradient */
}

// TOC on language entity types page
html.page_languageentities #toc ol {
     /*.bg-gradient(#000, 10%);
     li { font-weight: 700; }
     li.top a { color: #fff; }
     a:hover { background-color: rgba(255,255,255,0.15); }
     li.active a {
         font-size: 1.4em;
         margin-left: -0.4em;
     }*/
     li:nth-child(2) { a:before { color: @lgreen; } }
     li:nth-child(3) { a:before { color: lighten(@red, -20%); } }
     li:nth-child(4) { a:before { color: lighten(@red, 0%); } }
     li:nth-child(5) { a:before { color: lighten(@red, +20%); } }
     li:nth-child(6) { a:before { color: @rblue; } }
     li:nth-child(7) { a:before { color: @lblue; } }
     li:nth-child(8) { a:before { color: @purple; } }
     li:nth-child(9) { a:before { color: @lgreen } }
     li:nth-child(10) { a:before { color: lighten(@orange, -10%); } }
     li:nth-child(11) { a:before { color: lighten(@orange, 10%); } }
     li:nth-child(12) { a:before { color: #999; } }
}
/**/


/*
 * Task Overview (on start/main page)
 */
html.page_mainpage {
    h1 { display: block }

    div > h2:first-child {
        margin-top: 0;
    }

    h3 small {
        white-space: nowrap;
    }

    li b:after { content:"\A"; white-space:pre; }
}

ul.overview {
    position: relative;
    margin-left: 0;
    margin-top: 2rem;

    /*
    -moz-column-count: 2;
    -moz-column-gap: 2em;
    -webkit-column-count: 2;
    -webkit-column-gap: 2em;
    column-count: 2;
    column-gap: 2em;*/

    @padding: 1rem;

    > li {
        &:before { display: none; }
        .box();

        display: block;
        margin: 0 0 2em 0;

        /*
        -moz-column-break-inside: avoid;
        -moz-break-inside: avoid;
        -webkit-column-break-inside: avoid;
        column-break-inside: avoid;
        break-inside: avoid;
        */

        > * {
            margin-left: @padding;
            margin-right: @padding;
        }

        > h3 {
            padding: @padding;
            margin: 0 0 0 0;
            border: none;
        }

        table {
            margin-left: 0;
            margin-right: 0;
            width: 100%;

            tr {
                td {
                    padding-left: @padding;
                    padding-top: @padding/2;
                    padding-bottom: @padding/2;
                    vertical-align: top;

                    &:before { display: none; }

                    &:last-child { padding-right: @padding }

                    border-top: 1px solid #ccc;

                    ul {
                        margin-left: 0;
                        > li {
                            &:before {display: none;}
                            margin: 0;
                        }
                    }
                }
            }
        }

        [data-lang-entity] > :nth-child(2) {
            white-space: nowrap;
        }
    }
}

/*
@media all and (max-width: 799px) {
    html:not(.list) {
        ul.overview {
            -moz-column-count: 1;
            -webkit-column-count: 1;
            column-count: 1;

            > li {
                float: none;
                width: 100%;

                margin-left: 0;
            }
        }
    }
}
*/


/*
 * Fixes
 */
.tooltip {
    p:first-child {
        margin-top: 0.7em;
    }
}

.input-group-btn {
  &.btn-group > .btn-group:nth-child(2) > .multiselect.btn {
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
  }
}

pre {
    -ms-word-break: keep-all;
    word-break: keep-all;
    word-break: normal;
}

// modal dialog's backgrop does erroneously get opacity 1 making the whole background black
.modal-backdrop.in {
  opacity: 0.5 !important;
}

html {
  body.modal-open, .modal-open .navbar-fixed-top, .modal-open .navbar-fixed-bottom {
    margin-right: auto;
} }

.modal h4 {
  font-size: 18px;
}

.animation1() {
  0% {
        opacity: 1;
  }

100% {
  opacity: 0.65;
  }
}

.animation2() {
  0% {
    top: 1em;
  }

  100% {
    top: 1.5em;
  }
}

@import '../lib/3L/assets/animations/animation1';
@import '../lib/3L/assets/animations/animation2';