@import "../vendor/bootstrap/less/variables.less";
@import "bootstrap/variables.less";

html {
    min-height: 100%;
}

body {
    min-height: 100%;
    cursor: default;
    overflow-y: scroll;
}


.nowrap {
    white-space: nowrap;
}

.ellipsis {
    .nowrap();
    text-overflow: ellipsis;
    overflow: hidden;
}

.subtle {
    opacity: .5;
}

.hidden {
    display: none;
}


.navbar-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: @zindex-navbar-fixed;

    .extra-toolbar {
        background: #ccc;
        height: 40px;
        box-shadow: @object-shadow-large;
        z-index: @zindex-navbar-fixed - 1;
    }
}

.navbar {
    box-shadow: @object-shadow-large;
    border: none;

    .navbar-brand {
        .subtitle {
            opacity: .5;
        }

        img {
            max-height: 40px;
            margin-top: -13px;
        }
    }

    .profile-button {
        margin: 10px 5px;
        border-radius: 50%;
        height: 40px;
        width: 40px;
        line-height: 28px;
        text-align: center;
        font-size: 20px;
        border: 1px solid @brand-info;
        color: @brand-info;
        background: transparent;
        position: relative;

        &.superuser {
            color: @brand-warning;
            border: 1px solid @brand-warning;
        }

        .rank {
            position: absolute;
            top: 0;
            right: 0;
            width: 15px;
            height: 15px;
            font-size: 13px;
            line-height: 13px;

            text-align: center;
            border: 1px solid #555;
            color: #555;
            background: white;
            border-radius: 50%;
        }
    }
}


body.widescreen-mode-on .container {
    width: auto;
}


body > .container > .row > .sidebar,
body > .container > .sidebar {
    background: #eee;
    min-height: 100vh;
    box-shadow: @object-shadow;
    z-index: @zindex-sidebar;
    padding: @navbar-height 0 0;

    .sidebar-item.isRoot {
        padding: 15px 25px 0;
    }

    .sidebar-item.isTopLevel {
        padding: 0 0 10px;
    }

    .sidebar-item {
        @accent: @brand-primary;
        @item-height: 35px;

        h5 {
            color: @accent;
            text-transform: uppercase;
            font-weight: bold;
            font-size: 13px;
        }

        & > div {
            overflow: hidden;

            .colors () {
                color: @text-color;
                text-decoration: none;

                &:hover {
                    background: #ddd;
                }

                &:active {
                    background: #ccc;
                }
            }

            & > .expander {
                float: left;
                display: block;
                .colors();
                line-height: @item-height;
                padding: 0;
            }

            & > .link {
                display: block;
                .colors();
                line-height: @item-height;
                padding-left: 20px;
                padding-right: 20px;

                i {
                    padding-right: 15px;
                }
            }
        }

        &.hasChildren > div > .link {
            //padding-left: 20px;
        }

        &.active > div {
            & > .expander, & > .link {
                color: white;
                background: @accent;
            }
        }

        & > .children {
            padding-left: 20px;
        }

        &.isRoot > .children {
            padding-left: 0;
        }

        &.isTopLevel > .children {
            padding-left: 0;
        }
    }

    &.overlay-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 100%;
        width: 33%;
        padding-top: @navbar-height;
        overflow-y: auto;
        box-shadow: 0 0 50px #000 !important;
    }

    .task-status {
        overflow: hidden;
        background: white;
        box-shadow: 0 1px 0 rgba(0,0,0,.125);

        &>div {
            padding: 10px 20px;
        }

        h5 {
            margin: 3px 0;
        }

        progress-spinner {
            margin: 5px 10px 0 0;
        }
    }
}

body > .container > .row > .content {
    background: #fff;
    box-shadow: @object-shadow;
    overflow: hidden;
    min-height: 100vh;
    padding: @navbar-height 15px 0; // simlute col padding
}

.floating-toolbar-padder {
    height: 52px;
}

floating-toolbar {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: @zindex-floating-toolbar;

    .bar {
        padding: 10px 20px 10px 20px;
        line-height: 30px;
        background: white;
        box-shadow: 0 -1px 0px rgba(0, 0, 0, 0.125);
    }

    &.accented .bar {
        background: @brand-primary;
        color: white;

        .btn-flat {
            color: white !important;
        }
    }
}

.padded-container {
    padding: 0 10px;
}

progress-spinner {
    display: block;

    @size: 30px;
    @fg: @brand-primary;
    @bg: white;
    @inner: 2px;
    @outer: 5px;

    width: @size;
    height: @size;
    position: relative;
    margin: 20px auto;

    .one, .two {
        position: absolute;
        border-radius: 50%;
    }

    .one {
        width: @size - 2px;
        height: @size - 2px;
        left: 1px;
        top: 1px;

        border: @inner solid transparent;
        border-left: @inner solid @fg;
        border-top: @inner solid @fg;
        z-index: 1;
        -webkit-animation: progress-spin 2.7s infinite linear;
                animation: progress-spin 2.7s infinite linear;
    }

    .two {
        width: @size;
        height: @size;
        left: 0;
        top: 0;

        border: @outer solid transparent;
        border-right: @outer solid @bg;
        border-bottom: @outer solid @bg;
        z-index: 2;
        -webkit-animation: progress-spin 1.3s infinite linear;
                animation: progress-spin 1.3s infinite linear;
    }
}



#login-form {
    margin: 50px 0;

    h1 {
        font-size: 48px;
        color: #888;
        margin: 20px 0;
    }

    div {
        margin: 10px 0;
    }
}


.navbox-overlay {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 9000;
    background: rgba(0, 0, 0, .5);

    .navbox-box {
        width: 400px;
        margin: 50px auto;
    }
}

*[root-access=small] .root-access-blocker {
    * {
        display: inline-block;
        font-size: 14px;
        margin: 5px 0;
    }
}


.global-overlay {
    background: rgba(255,255,255,.75);
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;

    &.global-bootstrap-error {
        padding-top: 50px;

        .header {
            font-size: 100px;
            color: #ddd;
            text-shadow: 0 0 1px #fff;
        }
    }

    &.global-loading-overlay {
        padding-top: 200px;
    }
}

.sv-helper {
    position: fixed;
}
