@mixin glyphicon {
    font-family: 'Glyphicons Halflings';
    font-weight: normal;
    display: inline-block;
}

body {
    position: relative;
    overflow-x: hidden;
}

body,
html {
    width: 100%;
    height: 100%;
    margin: 0;
}

.btn-accept {
    &:before {
        @include glyphicon;
        content: "\e013";
        padding-right: 10px;
    }
}

.boilerplate {
    display: none;
}

.loader {
    height: 4px;
    width: 100%;
    position: absolute;
    left: 0;
    top: 0;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.3)
}

.loader:before {
    display: block;
    position: absolute;
    content: "";
    left: -200px;
    width: 200px;
    height: 4px;
    background-color: #6ec4ff;
    animation: loading 2s linear infinite;
}

@keyframes loading {
    from {
        left: -200px;
        width: 0%;
    }
    50% {
        width: 30%;
    }
    70% {
        width: 70%;
    }
    80% {
        left: 50%;
    }
    95% {
        left: 120%;
    }
    to {
        left: 100%;
    }
}

#wrapper {
    height: 100%;
}

.template-main {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.menu-top {
    width: 100%;
    padding: 10px;
    .version {
        position: absolute;
        right: 10px;
        font-size: 80%;
        background-color: rgba(0, 0, 0, 0.2);
        border-radius: 3px;
        padding: 10px;
    }
}

.gl.note {
    padding: 10px;
    background: #ebff00;
}

.logs {
    padding: 10px;
    height: 200px;
    overflow-x: auto;
    font-size: 80%;
    .log {
        padding: 3px;
        .param {
            background-color: rgba(0, 0, 0, 0.2);
            display: inline-block;
            padding: 3px;
            border-radius: 3px;
            color: white;
            font-size: 90%;
            line-height: 1;
            padding-left: 6px;
            padding-right: 6px;
        }
        .time, .server {
            display: inline-block;
            background-color: rgba(0, 0, 0, 0.2);
            color: white;
            border-radius: 3px;
            margin-right: 10px;
            padding: 3px;
            line-height: 1;
            font-size: 90%;
        }
        .message {
            display: inline-block;
            white-space: pre-line;
        }
        .time {
            &:before {
                @include glyphicon;
                content: "\e023";
                padding-right: 5px;
                position: relative;
                top: 1px;
            }
        }
        .server {
            background: #8ea5a4;
            &:before {
                @include glyphicon;
                content: "\e121";
                padding-right: 5px;
                position: relative;
                top: 1px;
            }
        }
        &.type-error {
            color: red;
        }
    }
}

.splitbox {
    height: 100%;
    display: flex;
    > .template {
        padding: 10px;
        width: 100%;
        height: 100%;
        flex-direction: row;
        display: flex;
        align-items: stretch;
        .center {
            position: relative;
            width: 5px;
            background: #e5e5e5;
            cursor: w-resize;
            z-index: 1;
        }
        .left, .right {
            overflow-x: hidden;
            overflow-y: auto;
            padding: 10px;
        }
        .right {
            flex-grow: 1;
        }
    }
}

.form-field {
    margin-bottom: 10px;
}

.form-label small {
    padding-left: 10px;
}

.template-login {
    display: flex;
    width: 100%;
    height: 100%;
    justify-content: center;

    .box {
        width: 50%;
        max-width: 500px;
        align-self: center;
        .logo {
            text-align: center;
        }
    }
}

.form-input {
    position: relative;
}

input:invalid + span,
select:invalid + span,
textarea:invalid + span {
    height: 0;
    display: block;
    width: 100%;
}

input:invalid + span:after,
select:invalid + span:after,
textarea:invalid + span:after {
    @include glyphicon;
    content: "\e014";
    font-size: 20px;
    position: absolute;
    right: -30px;
    top: 10px;
    color: #ffaeb3;
}

.template-servermanager .left,
.template-usermanager .left {
    flex-direction: column;
    display: flex;
    height: 100%;
    .tree {
        height: 100%;
    }
    .buttons {

    }
}

.flex-row {
    display: flex;
    .flex-row-item {
        width: 100%;
        &.padding {
            padding: 5px;
        }
    }
}

.tree {
    .entry {
        position: relative;
        padding: 5px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.2);
        cursor: pointer;
        border-radius: 3px;
        &:hover, &.active {
            background: rgba(0, 0, 0, 0.1);
        }
        .glyphicon-remove {
            position: absolute;
            right: 10px;
            top: 5px;
        }
    }
}

.table-files {
    user-select: none;
    :focus {
        outline: 0;
    }
    table {
        width: 100%;
        .directory-parent th {
            padding: 2px;
            padding-top: 10px;
        }
        th, td {
            cursor: pointer;
        }
        .header th {
            text-align: left;
            border-bottom: 1px solid #e5e5e5;
            padding: 10px;
        }
        td {
            padding: 2px;
            vertical-align: middle;
        }
        .entry {
            &:hover {
                background: rgba(0, 0, 0, 0.1);
            }
            &.active {
                background: #0095ff;
                color: white;
            }
            &:nth-child(n+1000) {
                display: none;
            }
        }
    }
    .icon {
        border-radius: 3px;
        display: inline-block;
        width: 16px;
        height: 16px;
        text-align: center;
        margin-right: 10px;
        margin-left: 5px;
        position: relative;
        top: 3px;
        background-position: center center;
        background-repeat: no-repeat;
        background-size: 80% 80%;
        &.icon-file {
            background-color: rgba(0, 0, 0, 0.3);
            background-image: url(../../images/icons/ic_description_white_24px.svg);
        }
        &.icon-directory {
            background-color: #d6b144;
            background-image: url(../../images/icons/ic_folder_white_24px.svg);
        }
    }
    &[data-id='local'] .permissions {
        display: none;
    }
}

.tablesorter-headerDesc {
    padding-left: 35px !important;
    position: relative;
    &:before {
        position: absolute;
        content: "Z-A";
        background: rgba(0, 0, 0, 0.2);
        font-size: 70%;
        padding: 5px;
        border-radius: 3px;
        color: white;
        left: 5px;
    }
}

.tablesorter-headerAsc {
    padding-left: 35px !important;
    position: relative;
    &:before {
        position: absolute;
        content: "A-Z";
        background: rgba(0, 0, 0, 0.2);
        font-size: 70%;
        padding: 5px;
        border-radius: 3px;
        color: white;
        left: 5px;
    }
}

.contextmenu {
    font-size: 12px;
    position: absolute;
    padding: 10px;
    box-shadow: rgba(0, 0, 0, 0.3) 0 0 10px;
    border-top: 3px solid rgba(0, 0, 0, 0.3);
    z-index: 2;
    background: white;
    display: none;
    min-width: 250px;
    transition: 0.1s;
    .entry {
        padding: 3px;
        cursor: pointer;
        background: rgba(0, 0, 0, 0.1);
        margin-bottom: 1px;
        border-radius: 3px;
        &:hover {
            background: rgba(0, 0, 0, 0.2);
        }
    }
    &.stick-right {
        left: auto !important;
        right: 10px !important;
    }
    &.stick-bottom {
        top: auto !important;
        bottom: 10px !important;
    }
}

.contextmenu.show {
    display: block;

}

.tabs {
    border-bottom: 1px solid rgba(0, 0, 0, 0.3);
    .tab {
        display: inline-block;
        padding: 5px;
        padding-left: 15px;
        padding-right: 15px;
        position: relative;
        background: rgba(0, 0, 0, 0.1);
        border-bottom: 3px solid rgba(0, 0, 0, 0.2);
        cursor: pointer;
        margin-right: 2px;
        .glyphicon {
            position: relative;
            top: 3px;
        }
        &.active {
            background: white;
            top: 1px;
            border: 1px solid rgba(0, 0, 0, 0.2);
            padding-bottom: 8px;
            border-bottom: 0;
            color: black;
        }
    }
}

.tab-container {
    display: none;
    padding: 10px;
    &.active {
        display: block;
    }
}

.progress {
    margin: 0;
    .progress-bar-info {
        transition: none;
    }
}

.modal-own-outer {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 10;
    background: rgba(0, 0, 0, 0.5);
    width: 100%;
    height: 100%;
}

.modal-own {
    left: 0;
    top: 0;
    position: absolute;
    display: flex;
    justify-content: center;
    height: 100%;
    width: 100%;
    z-index: 11;
    .modal-own-content {
        flex: 1;
        align-self: center;
        width: 100%;
        margin-left: 5%;
        margin-right: 5%;
        max-height: 90%;
        max-width: 800px;
        padding: 10px;
        border-top: 3px solid rgba(0, 0, 0, 0.3);
        background: white;
        display: flex;
        flex-direction: column;
        box-shadow: rgba(0, 0, 0, 0.7) 0 0 10px;
        position: relative;
        .modal-own-header {
            flex: 1;
            border-bottom: 1px solid rgba(0, 0, 0, 0.3);
            padding: 10px;
            font-weight: bold;
        }
        .modal-own-body {
            padding: 10px;
            max-height: 80%;
            overflow: auto;
        }
        .modal-own-footer {
            border-top: 1px solid rgba(0, 0, 0, 0.3);
            padding: 10px;
            flex: 1;
            .btn {
                margin-right: 10px;
            }
        }
        .modal-own-close {
            cursor: pointer;
            position: absolute;
            right: 10px;
            top: 10px;
        }
    }
}

.transfer {
    height: 200px;
    font-size: 90%;
    .template-transfer {
        display: flex;
        flex-direction: column;
        height: 100%;
        .transfered {
            display: none;
        }
        .tab-container.status-transfering .transfered {
            display: table-cell;
        }
        > .header {

        }
        > .main {
            height: 100%;
            overflow-y: auto;
        }
        > .footer {
            background: rgba(0, 0, 0, 0.1);
            padding: 6px;
            text-align: right;
            padding-right: 20px;
        }
    }
}

.tooltip {
    line-height: 1.3;
    text-transform: none;
}

.template-menu-top {
    border-bottom: 1px solid rgba(0, 0, 0, 0.3);
    padding-bottom: 8px;
    .inline-block {
        &.logo {
            margin-right: 20px;
        }
        display: inline-block;
    }
}

.spacer {
    padding-bottom: 10px;
}

.changelog {
    h1, h2, h3 {
        padding-bottom: 10px;
        font-size: 16px;
        font-weight: bold;
        border-bottom: 1px solid rgba(0, 0, 0, 0.2);
    }
}