@import "reset.i.less";
@import "mixins.i.less";
@import "vars.i.less";
@import "icons.i.less";
@import "lib.i.less";


#content-root {
    display: block !important;
    height: 100%;
}

#content-root-no-css {
    display: none;
}


@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 400;
    src: local('Open Sans'), local('OpenSans'), url(main/OpenSans.woff) format('woff');
}

@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 700;
    src: local('Open Sans Bold'), local('OpenSans-Bold'), url(main/OpenSans-Bold.woff) format('woff');
}

@font-face {
  font-family: 'PT Sans';
  font-style: normal;
  font-weight: 700;
  src: local('PT Sans Bold'), local('PTSans-Bold'), url(main/PS-Bold.woff) format('woff');
}

@font-face {
    font-family: 'FontAwesome';
    src: url(main/fontawesome.woff) format('woff');
    font-weight: normal;
    font-style: normal;
}

html {
    height: 100%;
    padding: 0;
}

a, a * {
    .transition(all 0.125s);
    cursor: default;
}

body {
    font-family: @fontFamily;
    font-size: @fontSize;
    overflow-x: hidden;
    overflow-y: scroll;
    position: relative;
	height: 100%;


    padding: 0;
    margin: 0;

    > .page {
	    height: 100%;
	}

    &.loading * {
        cursor: wait;
    }
}

.control.main-page .content-wr, 
.control.main-page .content-wr .sidebar, 
body {
    html.ui-dark & {
        background: #555;
    }

    html.ui-light & {
        background: #fafafa; // fa-fa-fa
    }
}

body.auth {
    background: #333;
}

.page.auth {
    padding: 50px 0;

    .content {
        text-align: center;
        border: none;

        img.logo {
            margin: 20px 0 20px;
        }

        .control {
            margin: 0;
        }

        .border-radius(3px);
        overflow: hidden;
        margin: auto;
		width: 285px;

        .form-upper {
            padding: 10px 20px;

            .row {
                >* {
                    float: left;
                }

                padding: 5px 0;
                overflow: hidden;
            }
        }

        .form-lower {
            padding: 10px 20px;
            overflow: hidden;
        }

        .licensebar {
            background: #9c0;
            color: white;
            padding: 5px 0;
            font-weight: bold;
        }

		.textbox {
			width: 153px;
		}

		.button {
			float: right;

            i {
                top: 0;
            }
		}

		.l {
			width: 80px;
            float: left;
		}

        #persona-login {
            float: left;
            cursor: pointer;

            &:hover {
                opacity: .75;
            }
        }
	}
}

.content-gradient {
    // TODO
    border: 1px solid #eee;
    background: white;
}



.clear {
    display: block;
    clear: both;
}

#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: @headerHeight;
    z-index: 3;

    background: #333;
    height: 30px;
    border-bottom: 3px solid rgba(0,0,0,.25);

    .container {
        width: 960px;
        margin: auto;

        &>.logo {
            .text {
                float: left;
                padding: 1px 20px 0 15px;

                a, div {
                    font-family: 'PT Sans', sans-serif;
                    font-size: 20px;
                    font-weight: bold;
                    color: @orange;
                    text-decoration: none;
                }

                a:hover {
                    cursor: pointer;
                }

                .release {
                    color: #c30;
                    display: inline-block;
                }
            }
        }

        .logout, #tab-headers a {
            display: inline-block;
            float: left;
            padding: 9px 10px 6px;
            font-weight: bold;
            border-bottom: 3px solid rgba(0,0,0,.25);

            &:hover {
                background: rgba(255,255,255,0.125);
            }

            &:active {
                background: rgba(0,0,0,0.125);
            }

            color: #888;
            i:before { color: #888; }

            text-decoration: none;

            &.active {
                background: lighten(@orange, 5%);
                color: darken(@orange, 20%);
                i:before { color: darken(@orange, 20%); }
            }

            .close {
                display: inline-block;
                padding: 0 0 0 5px;
            }
        }

        .logout {
            float: right;

            i:before {
                color: #eee;
                position: relative;
                top: 1px;
            }
        }
    }
}

#tabs {
    height: 100%;

    &> div {
        height: 100%;

        &> iframe {
            background: black;
            width: 100%;
            height: 100%;
            border: none;
        }
    }
}


#notifications {
    position: fixed;
    top: 50px;
    right: 20px;
    width: 220px;
    z-index: 100;

    .notification {
        border: 1px solid rgba(0,0,0,.125);

        &.info {
            border-left: 5px solid #0d0;
        }

        &.warn {
            border-left: 5px solid @orange;
        }

        &.error {
            border-left: 5px solid #d00;
        }

        font-size: 12px;
        background: #f8f8f8;
        opacity: .75;
        border-radius: 3px;

        width: 200px !important;
        max-height: auto !important;
        height: auto !important;
        text-transform: none !important;
        text-align: left !important;
        position: absolute !important;
        padding: 10px !important;
    }
}

#loading {
    position: fixed;
    .square(100%);
    left: 0;
    top: 0;
    overflow: hidden;
    display: none;
    z-index: 9000;

    > .wrapper {
        position: absolute;
        left: 50%;
        top: 50%;
        opacity: .5;
    }

    .spinner {
        width: 16px;
        height: 16px;
        @interpolator: cubic-bezier(0.3, 0.5, 0.7, 0.5);
        -webkit-animation: spinner 3s @interpolator infinite;
        -moz-animation: spinner 3s @interpolator infinite;
        animation: spinner 3s @interpolator infinite;

        position: absolute;
        margin: -8px 0 0 -8px;

        background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH3gIGCCgk1AbAgAAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAAFwSURBVDjLjdPPi41hFMDxz3vnYljZ2IitVzay8AewUKTD1GQnKyywmK2NUhrKLGSjrKSpSZp0ZmNmY2mBlM14lZXUlIUkNaPuHZt38vbMlXtWp3PO8z0/n0ohEXEQ13AKx3A8M9+2vj0YZOZGRMhM1QjAZmG6jbsYYAHfcCsz1yJCr/NwS31RAG7gJVYwhSt4EhH7tlUQEbvwEzv8X+7jZj8iDuALnmJ6zMewhmEfV1vDxRFBX/ELhwr7QmbOQQ9n/pHhOc7jLGYL3/6ImIBqxNS35FxmZme1Szja+ob4hMc9nMBD/CgAuzv6zmI2PRzGXNVm6GMZJztBb3CvBV/A5RFVvq46K1xq+y1lHZPYZNvhzVQRMYlHuDTm+lYxgzs43cdvvB8TsJqZR1p9GXqZOWwreNAJfIZ5NAXge3H2JtpfNajr+hU+4kNmXm+aZrGu63VEB7C3aZrZpvnL7WemFrKB+XYj3Y81hc9IvCt7+gMegXcEvXEnrQAAAABJRU5ErkJggg==');

        &.one {
            margin-left: -13px;
            margin-top: 0px;
        }

        &.two {
            margin-left: -1px;
            animation-direction: reverse;
            -moz-animation-direction: reverse;
            -webkit-animation-direction: reverse;
        }

    }

    .message {
        width: 300px;
        position: absolute;
        left: 20px;
        top: 3px;
        color: #555;
        font-size: 12px;
        font-weight: bold;
    }
}


.full-overlay {
    position: fixed;
    .square(100%);
    left: 0;
    top: 0;
    overflow: hidden;
    display: none;
    z-index: 9000;

    background: rgba(0,0,0,.75);

    >.content {
        margin: 60px auto;
        width: 800px;
        padding: 20px;

        >.inner {
            padding: 20px;
            overflow: hidden;

            h1  {
                color: @controlText;
                font-size: 18px;
                margin: 0;
            }

            pre, textarea {
                max-height: 300px;
                color: @controlText;
                font-size: 11px;
                overflow: auto;
            }

            textarea {
                width: 550px;
                height: 200px;
            }
        }
    }
}

#ui-theme-toggle {
    background: rgba(128,128,128,.5);
    position: fixed;
    right: 30px;
    bottom: 7px;
    display: block;
    text-align: center;
    width: 20px;
    height: 20px;
    line-height: 18px;
    border-radius: 3px;

    i::after {
        font-size: 48px;
    }

    &:hover {
        background: rgba(128,128,128,.75);
    }
}

#ssl-alert {
    display: none;
    position: fixed;
    margin: 0 0 0 -100px;
    top: 0;
    left: 50%;
    width: 200px;
    z-index: 4;
    text-align: center;
    border-radius: 0 0 5px 5px;

    padding: 6px 10px;
    background: #d11;
    border-bottom: 3px solid rgba(0, 0, 0, 0.25);

    b, span, i:before {
        color: white;
        opacity: 1;
    }
}

#connection-error {
    .content {
        margin: 200px auto;

        .inner {
            text-align: center;

            .icon {
                opacity: .5;
            }
        }
    }
}

#userecho-link {
    -webkit-transform: rotate(-90deg);
    -moz-transform: rotate(-90deg);
    -ms-transform: rotate(-90deg);
    -o-transform: rotate(-90deg);
    transform: rotate(-90deg);
    position: fixed;
    left: -70px;
    font-size: 16px;
    color: #777;
    text-decoration: none;
    border-radius: 5px;
    border: 1px solid #777;
    background: #ddd;
    display: inline-block;
    padding: 10px 20px;
    top: 50%;
    cursor: pointer;
    opacity: .5;
    z-index: 5;

    &:hover {
        opacity: 1;
        left: -65px;
        background: #fff;
    }
}


@-webkit-keyframes spinner {
    0% {
        -webkit-transform: rotate(0);
    }

    100% {
        -webkit-transform: rotate(720deg);
    }
}

@-moz-keyframes spinner {
    from {
       -moz-transform: rotate(0);
    }

    to {
       -moz-transform: rotate(720deg);
    }
}

@keyframes spinner {
    from {
        transform: rotate(0);
    }

    to {
        transform: rotate(720deg);
    }
}

@import "controls.index.i.less";
@import "controls.dialogs.i.less";
@import "controls.select2.i.less";

@import "jquery.ui.i.less";
