/*
~   Copyright (c) WSO2 Inc. (http://wso2.com) All Rights Reserved.
~
~   Licensed under the Apache License, Version 2.0 (the "License");
~   you may not use this file except in compliance with the License.
~   You may obtain a copy of the License at
~
~        http://www.apache.org/licenses/LICENSE-2.0
~
~   Unless required by applicable law or agreed to in writing, software
~   distributed under the License is distributed on an "AS IS" BASIS,
~   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~   See the License for the specific language governing permissions and
~   limitations under the License.
*/

/* ========================================================================
 * default values
 * ======================================================================== */

@font-face {.font( 'Roboto'; 300; 'normal'; 'Roboto Light'; 'Roboto-Light-webfont'; '../fonts' )}

@font-default: 'Roboto Light', Arial, Helvetica, sans-serif;
@font-icons: 'font-wso2';
@font-default-weight: 300;
@border-radius-default: 0;
@box-shadow-default: none;

@sides: top, bottom, left, right;
@screen-sizes: xs, sm, md, lg;
@message-status: info, success, warning, danger;
@sizes-length: 5;
@default-gap: 5px;

@base-dark-color: #222;
@base-light-color: #ffffff;
@base-success-color: #5cb85c;
@base-info-color: #526A84;
@base-warning-color: #f0ad4e;
@base-danger-color: #d9534f;

@primary-color: #2c313b;
@secondary-color: #e4e4e4;
@optional-color: #007D85;

@navbar-height: 50px;
@navbar-padding: 0 15px;
@navbar-color1: #4D5461;
@navbar-background-color: @primary-color;
@navbrand-background-color: darken(@navbar-background-color, 5%);

@footer-height: 40px;
@footer-background: @base-dark-color;
@footer-color: #cbcbcb;

@inverse-layout-background: @primary-color;
@inverse-layout-color: @base-light-color;

@loading-background-opacity: 0.9;
@loading-background-color: @base-dark-color;
@loading-color: @base-light-color;
@loading-inverse-background-color: @base-light-color;
@loading-inverse-color: @base-dark-color;

@dropdown-menu-dark-background-color: @base-dark-color;
@dropdown-menu-dark-color: @base-light-color;
@dropdown-menu-dark-tiles-background-color: #444;
@dropdown-menu-dark-tiles-hover-background-color: #555;
@dropdown-menu-dark-tiles-color: @base-light-color;

@button-primary-background-color: @primary-color;
@button-primary-color: @base-light-color;
@button-border: @button-primary-background-color;
@button-primary-hover-background-color: lighten(@button-primary-background-color, 10%);

@form-control-max-width: 750px;

/* ========================================================================
 * methods
 * ======================================================================== */

.clearfix() {
    &:after {
        content: " ";
        display: block;
        font-size: 0;
        height: 0;
        clear: both;
        visibility: hidden;
    }
}

.border-radius(@val: @border-radius-default) {
    -webkit-border-radius: @val;
    -moz-border-radius: @val;
    border-radius: @val;
}

.box-shadow(@val: @box-shadow-default) {
    -webkit-box-shadow: @val;
	-moz-box-shadow: @val;
	box-shadow: @val;
}

.transform(@val) {
    -webkit-transform: @val;
    -moz-transform: @val;
    -ms-transform: @val;
    -o-transform: @val;
    transform: @val;
}

.transition(@val) {
	-webkit-transition: @val;
	-moz-transition: @val;
    -ms-transition: @val;
	-o-transition: @val;
	transition: @val;
}

.gradient (@origin: top, @start: #ffffff, @stop: #e4e4e4) {
	background-color: @start;
	background-image: -webkit-linear-gradient(@origin, @start, @stop);
	background-image: -moz-linear-gradient(@origin, @start, @stop);
	background-image: -o-linear-gradient(@origin, @start, @stop);
	background-image: -ms-linear-gradient(@origin, @start, @stop);
	background-image: linear-gradient(@origin, @start, @stop);
}

.font(@font; @font-weight; @font-style; @font-name; @file-name; @font-path;){
        
    @font-file:'@{font-path}/@{font}/@{file-name}';
        
    font-family: @font-name;
    font-style: @font-style;
    font-weight: @font-weight;
    src: url('@{font-file}.eot');
    src: local(@font-name),
         local(@file-name),
         url('@{font-file}.eot') format('embedded-opentype'),
         url('@{font-file}.woff') format('woff'),
         url('@{font-file}.ttf') format('truetype'),
         url('@{font-file}.svg#@{font-name}') format('svg');
}

.square-ratio(@width, @height) {
    position: relative;

    &:before {
        display: block;
        content: "";
        width: 100%;
        padding-top: (@height / @width) * 100%;
    }
    > .square-element {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }
}

.fade-color(@color: #ffffff) {
    &:after {
        content: "";
        background-image: -webkit-gradient(linear, left top, right top, color-stop(0%, fade(@color, 0%)), color-stop(100%, fade(@color, 100%)));
        background-image: -webkit-linear-gradient(left, fade(@color, 0%), fade(@color, 100%));
        background: linear-gradient(to right, fade(@color, 0%), fade(@color, 100%));
        filter: progid:DXImageTransform.Microsoft.gradient(GradientType=1, StartColorStr='#00@color', EndColorStr='@color');
        bottom: 0;
        max-height: 100%;
        position: absolute;
        right: 0;
        height: 10000px;
        width: 60px;
    }
}

.opacity(@opacity) {
    opacity: @opacity;
    // IE8 filter
    @opacity-ie: (@opacity * 100);
    filter: ~"alpha(opacity=@{opacity-ie})";
}

.placeholder(@color) {
    &::-moz-placeholder { color: @color; } // Firefox
    &:-ms-input-placeholder { color: @color; } // Internet Explorer 10+
    &::-webkit-input-placeholder { color: @color; } // Safari and Chrome
}

.reset-default() {
    padding: 0;
    margin: 0;
    list-style: none;
}

/* ========================================================================
 * icon styles
 * ======================================================================== */

.icon-success { color: @base-success-color }
.icon-info { color: @base-info-color }
.icon-warning { color: @base-warning-color }
.icon-danger { color: @base-danger-color }

[aria-expanded='true'] > .icon.fw-stack > .toggle-icon,
[aria-expanded='true'] > .icon.toggle-icon {
    &-up:before {
        content: '\e684';
    }
    &-down:before {
        content: '\e685';
    }
    &-left:before {
        content: '\e686';
    }
    &-right:before {
        content: '\e687';
    }
    &-up-arrow:before {
        content: '\e688';
    }
    &-down-arrow:before {
        content: '\e689';
    }
    &-left-arrow:before {
        content: '\e68a';
    }
    &-right-arrow:before {
        content: '\e68b';
    }
}

//.icon-grid {
//    &:extend(.fw all);
//    &:extend(.fw-grid all);
//}

/* ========================================================================
 * document styles
 * ======================================================================== */

* {
    outline: none !important;
}

html {
    position: relative;
    min-height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
}

body {
    color: @base-dark-color;
    margin-bottom: @footer-height;
    font-family: @font-default;
    font-weight: @font-default-weight;
}

body > .page-content-wrapper > .container,
body > .page-content-wrapper > .container-fluid {
    padding: 20px 20px 60px;
}

@media only screen and (min-width: 768px) {
    body > .page-content-wrapper > .container,
    body > .page-content-wrapper > .container-fluid {
        margin: 3% 4% 4%;
        padding: 0;
    }
}

body.inverse {
    background: @inverse-layout-background;
    color: @inverse-layout-color;
}

a, a:hover, a:focus, a:active {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.h1, .h2, .h3, .h4, .h5, .h6, h1, h2, h3, h4, h5, h6 {
    font-weight: 300;
}

br.spacer {
    display: block;
    line-height: 30px;
}

.well {
    .border-radius;
    .box-shadow;
    border: none;
}

.badge {
    margin-bottom: 5px;
    padding: 4px 7px;
}

.no-wrap {
    white-space: nowrap;
}

.fade-edge {
    .fade-color;
}

body.inverse .fade-edge {
    .fade-color(@inverse-layout-background);
}

.visible-block {
    display: block !important;
}

.visible-inline {
    display: inline !important;
}

.visible-inline-block {
    display: inline-block !important;
}

/* generating padding and margin classes */
.generate-gaps(@sizes-length);
.generate-gaps(@n, @i: 1) when (@i =< @n) {

    // padding
    .add-padding-@{i}x {
        padding: (@i * @default-gap)!important;
    }
    .add-padding-side(@iterator: 1) when(@iterator <= length(@sides)) {
        @side: extract(extract(@sides, @iterator), 1);
        .add-padding-@{side}-@{i}x {
            padding-@{side}: (@i * @default-gap)!important;
        }
        .add-padding-side((@iterator + 1));
    }
    .add-padding-side();

    // margin
    .add-margin-@{i}x {
        margin: (@i * @default-gap)!important;
    }
    .add-margin-side(@iterator: 1) when(@iterator <= length(@sides)) {
        @side: extract(extract(@sides, @iterator), 1);
        .add-margin-@{side}-@{i}x {
            margin-@{side}: (@i * @default-gap)!important;
        }
        .add-margin-side((@iterator + 1));
    }
    .add-margin-side();

    // generate gaps
    .generate-gaps(@n, (@i + 1));
}

.remove-padding {
    padding: 0 !important;

    &-top {
        padding-top: 0 !important;
    }
    &-bottom {
        padding-bottom: 0 !important;
    }
    &-left {
        padding-left: 0 !important;
    }
    &-right {
        padding-right: 0 !important;
    }
}

.remove-margin {
    margin: 0 !important;

    &-top {
        margin-top: 0 !important;
    }
    &-bottom {
        margin-bottom: 0 !important;
    }
    &-left {
        margin-left: 0 !important;
    }
    &-right {
        margin-right: 0 !important;
    }
}

@media (max-width:767px){
    .remove-max-width-xs {
        max-width: none !important;
    }
    .remove-max-height-xs {
        max-width: none !important;
    }
    .pull-left-xs {
        float: left !important;
    }
    .pull-right-xs {
        float: right !important;
    }
    .float-remove-xs {
        float: none !important;
    }
    .text-center-xs {
        text-align: center !important;
    }
    .position-static-xs {
        position: static !important;
    }
    .remove-padding-xs {
        padding: 0 !important;
    }
    .remove-margin-xs {
        margin: 0 !important;
    }
}
@media (min-width:768px) and (max-width:991px){
    .remove-max-width-sm {
        max-width: none !important;
    }
    .remove-max-height-sm {
        max-width: none !important;
    }
    .pull-left-sm {
        float: left !important;
    }
    .pull-right-sm {
        float: right !important;
    }
    .float-remove-sm {
        float: none !important;
    }
    .text-center-sm {
        text-align: center !important;
    }
    .position-static-sm {
        position: static !important;
    }
    .remove-padding-sm {
        padding: 0 !important;
    }
    .remove-margin-sm {
        margin: 0 !important;
    }
}
@media (min-width:992px) and (max-width:1199px){
    .remove-max-width-md {
        max-width: none !important;
    }
    .remove-max-height-md {
        max-width: none !important;
    }
    .pull-left-md {
        float: left !important;
    }
    .pull-right-md {
        float: right !important;
    }
    .float-remove-md {
        float: none !important;
    }
    .text-center-md {
        text-align: center !important;
    }
    .position-static-md {
        position: static !important;
    }
    .remove-padding-md {
        padding: 0 !important;
    }
    .remove-margin-md {
        margin: 0 !important;
    }
}
@media (min-width:1200px){
    .remove-max-width-lg {
        max-width: none !important;
    }
    .remove-max-height-lg {
        max-width: none !important;
    }
    .pull-left-lg {
        float: left !important;
    }
    .pull-right-lg {
        float: right !important;
    }
    .float-remove-lg {
        float:none !important;
    }
    .text-center-lg {
        text-align: center !important;
    }
    .position-static-lg {
        position: static !important;
    }
    .remove-padding-lg {
        padding: 0 !important;
    }
    .remove-margin-lg {
        margin: 0 !important;
    }
}

/* ========================================================================
 * row/col styles
 * ======================================================================== */

.row.no-gutter {
    margin-right: 0;
    margin-left: 0;
}

.row.no-gutter [class*='col-']:not(:first-child),
.row.no-gutter [class*='col-']:not(:last-child) {
    padding-right:0;
    padding-left:0;
}

.col-fixed-fill {
    overflow: hidden;
}

.col-fixed-left {
    float: left;
}

.col-fixed-right {
    float: right;
}

.col-fixed {
    &-1x {
        width: 50px;
    }
    &-2x {
        width: 100px;
    }
    &-3x {
        width: 200px;
    }
    &-4x {
        width: 300px;
    }
}

@media only screen and (max-width: 768px) {
    .col-fixed {
        &-1x {
            width: 25px;
        }
        &-2x {
            width: 50px;
        }
        &-3x {
            width: 100px
        }
        &-4x {
            width: 150px;
        }
    }
}

@media only screen and (max-width: 480px) {
    .col-fixed {
        &-1x {
            width: 12px;
        }
        &-2x {
            width: 25px;
        }
        &-3x {
            width: 50px;
        }
        &-4x {
            width: 75px;
        }
    }
}

/* ========================================================================
 * header styles
 * ======================================================================== */

header {
    background: @base-dark-color;
    min-height: 50px;
    position: relative;
}

header .brand {
    padding: 10px 0;

    & img.logo {
        height: 24px;
    }
    & a {
        min-height: 24px;
    }
    & h1 {
        display: inline-block;
        line-height: 1;
        font-weight: 500;
        font-size: 17px;
        margin: 0 0 0 5px;
        color: @base-light-color;
        padding: 6px 0 0 0;
        font-style: normal;
        text-transform: uppercase;
    }
}

header .dropdown {
    display: inline-block;
    color: @base-light-color;
    padding: 6px 0;
}

header .dropdown[aria-expanded=true], header .dropdown:hover {
    background: darken(@base-dark-color, 25%);
}

@media only screen and (max-width: 768px) {
    header .brand img.logo {
        margin-top: 15px;
    }

    header .brand h1 {
        display: block;
        line-height: 0.6;
    }
}

/* ========================================================================
 * navbar styles
 * ======================================================================== */

.navbar-wrapper {
    min-height: 50px;
}

.navbar.affix, .navbar.affix-bottom {
    top: 0 !important;
    width: 100%;
    z-index: 100000000;
}

.loading .navbar.affix {
    z-index: 1000000;
}

.navbar {
    background: @navbar-background-color;
    border: none;
    margin-bottom: 0;
    .border-radius;
}

.navbar .container-fluid {
    padding: 0;
}

.navbar .container-fluid > .navbar-collapse,
.navbar .container-fluid > .navbar-header,
.navbar .container > .navbar-collapse,
.navbar .container > .navbar-header {
    padding: 0;
    margin: 0;

    & .icon {
        margin-bottom: 4px;
    }
}

.navbar-nav {
    margin: 7.5px 0;
}

@media only screen and (min-width: 768px) {
    .navbar-nav {
        margin: 0 0;
    }
}

.navbar-menu-toggle {
    float: left;
    height: @navbar-height;
    padding: 0 8px;
    line-height: @navbar-height;
    font-size: 18px;
    background: @optional-color;
    color: @base-light-color;

    &:hover, &:focus, &:active {
        color: @base-light-color;
        background: darken(@optional-color, 10%);
    }
    &[aria-expanded=true] {
        background: darken(@optional-color, 8%);
    }
}

.navbar-toggle {
    border: none;
    .border-radius;
}

.navbar-default .navbar-nav > li > a {
    color: @base-light-color;
    text-transform: uppercase;
    padding: 0 15px;
    line-height: @navbar-height;
}

.navbar > .container .navbar-brand,
.navbar > .container-fluid .navbar-brand {
    color: @base-light-color;
    margin-left: 0;
    padding: 0 15px;
    line-height: @navbar-height;
    text-transform: uppercase;
    background: @navbrand-background-color;
}

.navbar > .container .navbar-brand a,
.navbar > .container-fluid .navbar-brand a {
    color: @base-light-color;
    font-size: 16px;
}

.navbar-default .navbar-collapse, .navbar-default .navbar-form {
    border-top: none;
    .box-shadow;
}

.navbar-default .navbar-nav > li > a {
    &:hover, &:focus, &:active {
        color: @base-light-color;
    }
}

.navbar-default .navbar-nav > .active > a {
    &, &:hover, &:focus, &:active {
        background: @navbar-color1;
        color: @base-light-color;
    }
}

.navbar-collapse.dropdown {
    background: @dropdown-menu-dark-background-color;
    margin-right: -10px;
    margin-left: -10px;
    padding-bottom: 0;
    display: none !important;
    overflow: hidden !important;
}

.navbar-collapse.dropdown.collapsing {
    display: block !important;
}

.navbar-collapse.dropdown.in {
    display: block !important;
    overflow: visible !important;
}

.navbar-collapse.tiles ul.nav li {
    display: inline-block;
    text-align: center;
    margin: 10px 5px;
}

.navbar-collapse.tiles ul.nav li a {
    text-decoration: none;
    width: 120px;
    height: 120px;
    padding: 15px 2px;
    background: @dropdown-menu-dark-tiles-background-color;
    display: block;
    overflow: hidden;
    line-height: 1.4em;
}

.navbar-collapse.tiles ul.nav li a:hover {
    background: @dropdown-menu-dark-tiles-hover-background-color;
}

.navbar-collapse.tiles ul.nav li a i {
    font-size: 46px;
    display: block;
    margin-bottom: 10px;
}

/* ========================================================================
 * sidebar styles
 * ======================================================================== */

@default-sidebar-width: 350px;

.page-content-wrapper, .page-content-wrapper[data-container-behaviour=static] {
    .transition(all 0.5s ease);
    position: relative;
    left: 0;
    margin-left: 0;
}

.page-content-wrapper[data-container-push=true] {
    left: @default-sidebar-width;
}

.page-content-wrapper[data-push-side=right][data-container-push=true] {
    left: auto;
    right: @default-sidebar-width;
}

.page-content-wrapper[data-container-divide=true] {
    margin-left: @default-sidebar-width;
}

.page-content-wrapper[data-divide-side=right][data-container-divide=true] {
    margin-left: auto;
    margin-right: @default-sidebar-width;
}

.sidebar-wrapper {
    z-index: 1000;
    position: fixed;
    left: -@default-sidebar-width;
    width: @default-sidebar-width;
    height: 100%;
    overflow-y: auto;
    background: @base-dark-color;
    color: @base-light-color;
    .transition(all 0.5s ease);
}

.sidebar-wrapper.inverse {
    background: @base-light-color;
    color: @base-dark-color;
}

.sidebar-wrapper[data-side=right] {
    left: auto;
    right: -@default-sidebar-width;
}

.sidebar-wrapper.toggled {
    left: 0;
    right: auto;
}

.sidebar-wrapper[data-side=right].toggled {
    left: auto;
    right: 0;
}

ul.sidebar-messages {
    .reset-default;
    padding: 10px;
}

ul.sidebar-messages > li {
    margin: 15px 0;
}

.sidebar-messages .message {
    background: none;
    padding: 5px 10px;
}

.sidebar-nav {
    position: absolute;
    top: 0;
    width: @default-sidebar-width;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sidebar-nav li {
    text-indent: 20px;
    line-height: 40px;
}

.sidebar-nav li a {
    display: block;
    text-decoration: none;
    color: #999999;
}

.sidebar-nav li a:hover {
    text-decoration: none;
    color: @base-light-color;
    background: rgba(255,255,255,0.2);
}

.sidebar-nav li a:active,
.sidebar-nav li a:focus {
    text-decoration: none;
}

.sidebar-nav > .sidebar-brand {
    height: 65px;
    font-size: 18px;
    line-height: 60px;
}

.sidebar-nav > .sidebar-brand a {
    color: #999999;
}

.sidebar-nav > .sidebar-brand a:hover {
    color: @base-light-color;
    background: none;
}

@media(min-width:768px) {
    #wrapper {
        padding-left: 250px;
    }

    #wrapper.toggled {
        padding-left: 0;
    }

    #sidebar-wrapper {
        width: @default-sidebar-width;
    }

    #wrapper.toggled #sidebar-wrapper {
        width: 0;
    }

    #page-content-wrapper {
        position: relative;
    }

    #wrapper.toggled #page-content-wrapper {
        position: relative;
        margin-right: 0;
    }
}

/* ========================================================================
 * breadcrumb styles
 * ======================================================================== */

.breadcrumb {
    margin: 0;
    overflow: hidden;
    .border-radius;
}

.breadcrumb > li + li:before {
    padding: 0 1px;
}

.breadcrumb > li > a > .icon {
    padding-bottom: 3px;
}

/* ========================================================================
 * footer styles
 * ======================================================================== */

footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    min-height: @footer-height;
    overflow: hidden;
    color: @footer-color;
    background: @footer-background;
    z-index: 1000;
}

footer > .container,
footer > .container-fluid {
    padding-right: 15px;
    padding-left: 15px;
}

footer > .container p,
footer > .container-fluid p {
    line-height: @footer-height;
    margin-bottom: 0;
}

footer .icon {
    font-size: 21px;
    vertical-align: middle;
    color: @footer-color;
}

footer a {
    &, &:hover {
        color: @footer-color;
    }
}

/* ========================================================================
 * body styles
 * ======================================================================== */

.body-wrapper a:hover {
  text-decoration: underline;
}

.page-header {
    margin: 0 0 20px;
}

.page-header > h1 {
    margin-top: 0;
}

.lead {
    margin-bottom: 0;
}

/* ========================================================================
 * alert styles
 * ======================================================================== */

.alert {
    .border-radius;
    border: none;
    position: relative;
    padding: 15px 50px 15px 15px;
}
.alert .icon {
    padding-bottom: 3px;
    margin-right: 6px;
}

.alert {
    & .close {
        position: absolute;
        top: 0;
        right: 0;
        height: 50px;
        width: 50px;
        line-height: 1;
        padding: 0 10px;
        font-size: 12px;
        background: @base-dark-color;
        color: @base-light-color;
    }
    &.alert-success {
        color: @base-light-color;
        background: @base-success-color;
        & .close {
          background: darken(@base-success-color, 50%);
        }
    }
    &.alert-info {
        color: @base-light-color;
        background: @base-info-color;
        & .close {
            background: darken(@base-info-color, 50%);
        }
    }
    &.alert-warning {
        color: @base-light-color;
        background: @base-warning-color;
        & .close {
            background: darken(@base-warning-color, 50%);
        }
    }
    &.alert-danger {
        color: @base-light-color;
        background: @base-danger-color;
        & .close {
            background: darken(@base-danger-color, 50%);
        }
    }
}

/* ========================================================================
 * message styles
 * ======================================================================== */

.message {
    padding: 20px;
    margin: 20px 0;
    border-left: 5px solid transparent;
    background: #f9f9f9;
    .border-radius;
}
.message h4 {
    margin-top: 0;
    margin-bottom: 5px
}
.message h4 .icon {
    padding-bottom: 3px;
    margin-right: 5px;
}
.message p:last-child {
    margin-bottom: 0
}
.message code {
    border-radius: 3px
}
.message + .message {
    margin-top: -5px
}

.message {
    &-success {
        border-left-color: @base-success-color;
        & h4 {
            color: @base-success-color;
        }
    }
    &-info {
        border-left-color: @base-info-color;
        & h4 {
            color: @base-info-color;
        }
    }
    &-warning {
        border-left-color: @base-warning-color;
        & h4 {
            color: @base-warning-color;
        }
    }
    &-danger {
        border-left-color: @base-danger-color;
        & h4 {
            color: @base-danger-color;
        }
    }
}

/* ========================================================================
 * dropdown menu styles
 * ======================================================================== */

.dropdown-menu {
    border: none;
    background: #e4e4e4;
    .border-radius;
    .box-shadow;
    .clearfix;
}

.dropdown-menu.arrow:before, .dropdown-menu.arrow.arrow-top-left:before {
    position: absolute;
    top: -6px;
    left: 15px;
    right: auto;
    display: inline-block;
    border-right: 6px solid transparent;
    border-bottom: 6px solid #e4e4e4;
    border-left: 6px solid transparent;
    content: '';
}

.dropdown-menu.arrow.arrow-top-right:before {
    left: auto;
    right: 15px;
}

.dropdown-menu.dark {
    background: @dropdown-menu-dark-background-color;
    color: @dropdown-menu-dark-color;
    .border-radius;
    .box-shadow;
}

.dropdown-menu.dark a {
    color: @dropdown-menu-dark-color;
}


.dropdown-menu.dark.arrow:before {
    border-bottom-color: @dropdown-menu-dark-background-color;
}

.dropdown-menu.tiles {
    padding: 4px;
    max-width: 385px;
}

.dropdown-menu.tiles > li {
    padding: 0;
    list-style: none;
    display: inline-block;
    float: left;
}

.dropdown-menu.tiles li a {
    display: block;
    margin: 4px;
    padding: 5px;
    list-style: none;
    width: 85px;
    height: 85px;
    text-align: center;
    vertical-align: text-bottom;
    color: @dropdown-menu-dark-tiles-color;
    text-decoration: none;
    background: @dropdown-menu-dark-tiles-background-color;

    &:hover {
        background: @dropdown-menu-dark-tiles-hover-background-color;
    }
}

.dropdown-menu.tiles li a .icon {
    display: block;
    font-size: 35px;
    margin: 3px 0 7px;
    height: 35px;
}

.dropdown-menu.tiles li a .name {
    display: block;
    line-height: 14px;
    font-size: 12px;
    height: 28px;
    overflow: hidden;
}

.dropdown-submenu {
    position:relative;
}

.dropdown-submenu > .dropdown-menu {
    top:0;
    left:100%;
    margin-top:-6px;
    margin-left:-1px;
}

.dropdown-submenu:hover > .dropdown-menu {
    display:block;
}

.dropdown-submenu > a:after {
    display:block;
    content:" ";
    float:right;
    width:0;
    height:0;
    border-color:transparent;
    border-style:solid;
    border-width:5px 0 5px 5px;
    border-left-color:#cccccc;
    margin-top:5px;
    margin-right:-10px;
}

.dropdown-submenu:hover > a:after {
    border-left-color:#ffffff;
}

.dropdown-submenu.pull-left {
    float:none;
}

.dropdown-submenu.pull-left > .dropdown-menu {
    left:-100%;
    margin-left:10px;
}

/* ========================================================================
 * loading styles
 * ======================================================================== */

.loading {
    position: relative;
}

.loading[data-loading-style=overlay] .loading-bg {
    background: @loading-background-color;
    position: absolute;
    height: 100%;
    width: 100%;
    z-index: 10000000;
    .opacity(@loading-background-opacity);
}

.loading[data-loading-style=icon-only] .loading-bg {
    display: none;
}

.loading[data-loading-inverse=true] .loading-bg {
    background: @loading-inverse-background-color;
}

.loading .loading-animation {
    position: absolute;
    z-index: 10000001;
    top: 50%;
    left: 50%;
    width: 100px;
    height: 75px;
    text-align: center;
    .transform(translate(-50%, -50%));
}

.loading .loading-animation .logo:before {
    //content: url("../images/loading.svg");
}

.loading .loading-animation .logo {
    position: relative;
    width: 50px;
    margin: 0 auto;
}

.loading .loading-animation .logo .pulse-line,
.loading .loading-animation .logo .circle {
    fill: none;
    stroke: @loading-color;
}

.loading[data-loading-inverse=true] .loading-animation .logo .pulse-line,
.loading[data-loading-inverse=true] .loading-animation .logo .circle {
    stroke: @loading-inverse-color;
}

.loading .loading-animation .logo .circle {
    stroke-dasharray: 100;
    .opacity(0.5);
}

.loading .loading-animation .logo .pulse-line {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: dash 4s linear  infinite;
    .opacity(0);
}

@keyframes dash {
    0% {
        .opacity(0.9);
    }
    10% {
        stroke-dashoffset: 200;
        .opacity(0.9);
    }
    70% {
        stroke-dashoffset: 500;
        .opacity(0.9);
    }
    80% {
        .opacity(0);
    }
    100% {
        .opacity(0);
    }
}

.loading .loading-animation .logo .signal {
    border: 5px solid @loading-color;
    border-radius: 50px;
    height: 50px;
    width: 50px;
    .opacity(0);
    position: absolute;
    top: 0;
    animation: pulsate 4s ease-out infinite;
    animation-delay: 1.5s;
    .transform(translate(-50%, -50%));
}

@keyframes pulsate {
    0%, 30%  {
        .opacity(0);
        .transform(scale(0.9));
    }
    40% {
        .opacity(1);
    }
    60% {
        .opacity(0);
        .transform(scale(1.2));
    }
}

.loading .loading-animation p {
    color: @loading-color;
    text-align: center;
    font-size: 11px;
    margin-top: 4px;
    text-transform: uppercase;
}

.loading[data-loading-inverse=true] .loading-animation p {
    color: @loading-inverse-color;
}

/* ui fixes */
#dp_swf_engine {
    display: none;
}

/* ========================================================================
 * form styles
 * ======================================================================== */

.control-label {
    font-weight: 400;
}

.input-group-btn .control-label {
    font-size: 14px;
    padding-top: 0;
    margin: 0 5px;
}

.form-control, .btn {
    .border-radius;
    .box-shadow;
}

a.btn, .btn {
    text-decoration: none;

    & .icon-caret {
        padding: 0 0 0 8px;
        margin-left: 5px;
        border-left: 1px solid #e4e4e4;
    }
    &.active, &:active {
        .box-shadow;
    }
    &:hover, &:focus {
        text-decoration: none;
        background: #eee;
    }
}

.btn-primary {
    color: @button-primary-color;
    background-color: @button-primary-background-color;
    border-color: @button-border;

    &:hover {
        background-color: @button-primary-hover-background-color;
    }
}

.remove-icon-ring-on-hover:hover .fw-ring {
    display: none;
}

.form-control {
    width: 100%;

    &-xs {
        min-width: calc(@form-control-max-width/12);
    }
    &-sm {
        min-width: calc(@form-control-max-width/9);
    }
    &-md {
        min-width: calc(@form-control-max-width/6);
    }
    &-lg {
        min-width: calc(@form-control-max-width/2);
    }
}

input[type=number].form-control {
    padding: 0 0 0 12px;
}

.form-control, .input-wrap {
    max-width: @form-control-max-width;
}

.form-control:focus {
    .box-shadow
}

.input-wrap .btn.wrap-input-right {
    border-left: none;
}

.input-group-addon {
    .border-radius;
}

.file-upload-control input[type=file] {
    display: none;
}

.file-upload-control input[readonly] {
    background-color: white !important;
    cursor: text !important;
}

@media only screen and (max-width: 768px) {
    .input-group.res-wrap {
        &, & .form-control, & .control-label, & .input-group-btn  {
            min-width: 100%;
            display: block;
            float: none;
        }
    }

    .input-group.res-wrap .control-label {
        line-height: 34px;
        margin: 5px 0 0 0;
    }

    .form-control {
        &-xs {
          min-width: calc(@form-control-max-width/24);
        }
        &-sm {
          min-width: calc(@form-control-max-width/18);
        }
        &-md {
          min-width: calc(@form-control-max-width/12);
        }
        &-lg {
          min-width: calc(@form-control-max-width/4);
        }
    }
}

/* ========================================================================
 * table styles
 * ======================================================================== */

.table thead th {
    font-weight: 500;
}

.table .form-control {
    min-width: 100%;
}

@media only screen and (max-width: 767px) {
    .table-responsive table,
    .table-responsive thead,
    .table-responsive tbody,
    .table-responsive th,
    .table-responsive td,
    .table-responsive tr {
        display: block;
    }

    .table-responsive thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }

    .table-responsive tr {
        border: 1px solid #ccc;
    }

    .table-responsive.table-striped {
        border: none;
    }

    .table-responsive tbody > tr > td {
        border: none;
        border-bottom: 1px solid #eee;
        position: relative;
        padding-left: 50%;
        white-space: normal;
        text-align:left;
    }

    .table-responsive tr > td:before {
        position: absolute;
        top: 6px;
        left: 6px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align:left;
        font-weight: bold;
    }

    .table-responsive tbody > tr > td:before {
        content: attr(data-title);
    }
}


/* ========================================================================
 * list table styles
 * ======================================================================== */

.table.list-table {
    min-width: 100%;
    display: block;
}

.table.list-table thead,
.table.list-table tbody {
    vertical-align: top;
}

.table.list-table {
    & > tbody > tr > td,
    & > tbody > tr > th,
    & > tfoot > tr > td,
    & > tfoot > tr > th,
    & > thead > tr > td,
    & > thead > tr > th {
        border: none;
        padding: 8px;
        vertical-align: middle;
        overflow: hidden;
        position: relative;
    }
    .h1, .h2, .h3, .h4, .h5, .h6, h1, h2, h3, h4, h5, h6 {
        margin: 0;
    }
}

.table.list-table tr {
    border-bottom: 5px solid transparent;
}

.table.list-table > thead > tr.sort-row {
    display: none;
}

.table.list-table > tbody > tr:nth-of-type(odd),
.table.list-table > tbody > tr:nth-of-type(even) {
    background-color: transparent;
}

.table.list-table > tbody > tr.child ul {
    text-align: left;
    display: block;
}

.table.table-hover > tbody > tr:hover td:not(.dataTables_empty) {
    background: #e4e4e4 !important;

    &.fade-edge {
        .fade-color(#e4e4e4);
    }
}

.table.table-selectable > tbody > tr:hover {
    cursor: pointer;
}

.table.table-selectable > tbody > tr:hover td:not(.dataTables_empty):first-child:before,
.table.table-selectable > tbody > tr.DTTT_selected td:not(.dataTables_empty):first-child:before {
    position: absolute;
    display: block;
    content: "";
    background-color: transparent;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #fff;
    height: .65rem;
    width: 1.3rem;
    z-index: 102;
    -webkit-transform: rotate(-45deg);
    transform: rotate(-45deg);
    right: 0.3rem;
    left: auto;
    top: 0.3rem;
}

.table.table-selectable.grid-view > tbody > tr.DTTT_selected td:not(.dataTables_empty):first-child {
    border: 5px solid #007d85;
}

.table.table-selectable:not(.grid-view) > tbody > tr.DTTT_selected td:not(.dataTables_empty) {
    background: #2C313B !important;
    color: #fff;
}

.table.table-selectable > tbody > tr:hover td:not(.dataTables_empty):first-child:after,
.table.table-selectable > tbody > tr.DTTT_selected td:not(.dataTables_empty):first-child:after {
    position: absolute;
    display: block;
    border-top: 32px solid #007d85;
    border-left: 32px solid transparent;
    right: 0;
    content: "";
    top: 0;
    z-index: 101;
}

.table.list-table thead tr.bulk-action-row {
    display: block;
    margin: 0 15px;

    & > th, & > td {
        display: block !important;
    }

    & > th > div, & > td > div,
    & > th > span, & > td > span,
    & > th > ul, & > td > ul {
        margin: 0 -10px;
    }
}

.table.list-table > thead.block > tr > td:not(:empty):before,
.table.list-table > thead.block > tr > th:not(:empty):before {
    content: attr(data-for);
}

.table.list-table:not(.grid-view) .content-fill {
    width: 1%;
}

.table.list-table:not(.grid-view) {
    & > tbody > tr > td,
    & > tbody > tr > th,{
        background: #f5f5f5;

        &.fade-edge:after {
            display: none;
        }
    }
}

.table.list-table:not(.grid-view) tbody {
    margin: 0 15px;
}

.table.list-table:not(.grid-view) .thumbnail {
    max-width: 60px;
    min-width: 60px;
}

.table.list-table.grid-view > thead > tr {
    width: auto;
}

.table.list-table.grid-view {
    & > tbody > tr > td,
    & > tbody > tr > th,
    & > tfoot > tr > td,
    & > tfoot > tr > th {
        display: block;
        white-space: nowrap;
        padding: 10px 0;
    }
    & > tbody > tr > td[data-grid-label]:before,
    & > tbody > tr > th[data-grid-label]:before {
        content: attr(data-grid-label)+':';
        font-weight: 600;
        margin-right: 8px;
    }
    & > tbody > tr.header-row {
        display: none;
    }
    & > thead > tr > td,
    & > thead > tr > th {
        display: inline-block;
    }
    & > thead > tr > td:not(:empty):before,
    & > thead > tr > th:not(:empty):before {
        content: attr(data-for);
    }
    .hidden-on-grid-view {
        display: none;
    }
    .padding-reduce-on-grid-view {
        padding: 2px;
    }
    .text-left-on-grid-view {
        text-align: left;
    }
    .text-right-on-grid-view {
        text-align: right;
    }
    .text-center-on-grid-view {
        text-align: center;
    }
}

.table.list-table {
    width: auto;
    display: block;
    margin-right: -15px;
    margin-left: -15px;

    & > thead,
    & > tbody,
    & > tfoot {
        display: block;
    }
}

.table.list-table.grid-view tr {
    display: inline-block;
}

.table.list-table.grid-view > tbody > tr {
    padding: 15px 15px 0;
}

.table.list-table.grid-view .filter-row,
.table.list-table thead.block .filter-row {
    background: #e4e4e4;
    margin: 0 15px;
    padding: 15px;
    display: block;
}

.table.list-table.grid-view .filter-row th:empty,
.table.list-table thead.block .filter-row th:empty {
    display: none;
}

.table.list-table.grid-view tr td {
    padding: 0;
}

@media (max-width:767px){
    .table.list-table {
        & > thead > tr.filter-row,
        & > thead > tr.filter-row > td,
        & > thead > tr.filter-row > th {
            display: block;
        }
    }
}
@media (min-width:320px) and (max-width:479px){
   .table.list-table.grid-view tr {
        width: 100%;
    }
}
@media (min-width:480px) and (max-width:767px){
    .table.list-table.grid-view tr {
        width: 50%;
    }
    .table.list-table:not(.grid-view) .content-fill {
        width: auto;
    }
}
@media (min-width:768px) and (max-width:991px){
    .table.list-table.grid-view tr {
        width: 33.3%;
    }
}
@media (min-width:992px) and (max-width:1199px){
    .table.list-table.grid-view tr {
        width: 20%;
    }
}
@media (min-width:1200px){
    .table.list-table.grid-view tr {
        width: 10%;
    }
}

/* ========================================================================
 * data table styles
 * ======================================================================== */

table.dataTable thead .sorting:after,
table.dataTable thead .sorting_asc:after,
table.dataTable thead .sorting_desc:after {
    font-family: @font-icons;
}

.dataTables_wrapper ul.sort-list li a:before,
.dataTables_wrapper ul.sort-list li a.sorting_asc:before,
.dataTables_wrapper ul.sort-list li a.sorting_desc:before {
    font-family: @font-icons;
    margin-right: 10px;
    font-size: 11px;
    .opacity(1);
}

.dataTables_wrapper ul.sort-list li a:before {
    .opacity(0.2);
}

table.dataTable thead .sorting:after,
.dataTables_wrapper ul.sort-list li a:before {
    content: "\e673";
}

table.dataTable thead .sorting_asc:after,
.dataTables_wrapper ul.sort-list li a.sorting_asc:before {
    content: "\e64b";
}

table.dataTable thead .sorting_desc:after,
.dataTables_wrapper ul.sort-list li a.sorting_desc:before {
    content: "\e663";
}

table.dataTable thead .sorting {
    padding-right: 30px !important;
}

table.dataTable thead .no-sort:after {
    display: none!important;
}

table.dataTable thead .no-sort {
    pointer-events: none!important;
    cursor: default!important;
}

table.dataTable tr.filter-row td,
table.dataTable tr.filter-row th {
    padding: 0 8px 10px;
}

.dataTables_wrapper > div.row > div {
    text-align: left;
}

.dataTables_filter,
.dataTables_toolbar,
.dataTables_length,
.dataTables_info {
    text-align: left;
    float: left;
}

.dataTables_toolbar,
.dataTables_paginate {
    float: right;
}

.dataTablesTop,
.dataTablesBottom {
    .clearfix;
    margin: 0;
}

.dataTablesBottom .dataTables_info {
    padding: 4px 0 0 10px;
    margin-left: 10px;
    border-left: 1px solid #e4e4e4;
}

.dataTables_filter .search-icon {
    position: relative;
    z-index: 1;
    right: -10px;
    top: 0;
    color: #7B7B7B;
    cursor: pointer;
}

.dataTables_filter input {
    padding: 0 15px 0 35px;
    min-width: 300px;
    margin: 0 0 0 -14px !important;
}

.table.dataTable tbody tr.active td,
.table.dataTable tbody tr.active th,
.table.dataTable tbody tr.active:hover td,
.table.dataTable tbody tr.active:hover th {
    background-color: @primary-color !important;
}


.table.dataTable tbody tr td.dataTables_empty {
    overflow: visible;
    cursor: default;
    background: none;
    padding: 0;
}

table.dataTable.dtr-inline.collapsed > tbody > tr {
    & > td:first-child:before,
    & > th:first-child:before {
        top: 50%;
        left: 10px;
        margin-top: -8px;
    }
    & > td:first-child:first-child,
    & > th:first-child:first-child {
        padding-left: 40px !important;
    }
}

/* ========================================================================
 * thumbnail styles
 * ======================================================================== */

.thumbnail {
    .border-radius;
}

.thumbnail.icon {
    border: none;
    margin: 0;
    background: @primary-color;
    color: #fff;
    text-align: center;
    overflow: hidden;
    .square-ratio(1,1);
}

.thumbnail.icon .square-element:before {
    position: absolute;
    top: 50%;
    left: 50%;
    .transform(translate(-50%, -50%));
}

.thumbnail.icon img {
    width: 100%;
}

/* ========================================================================
 * thumbnail list styles
 * ======================================================================== */

.thumbnail-list {
    .reset-default;
    .clearfix;
}

.thumbnail-list li {
    float: left;
}


/* ========================================================================
 * pagination styles
 * ======================================================================== */

.pagination > li {
    &:first-child > a,
    &:first-child > span,
    &:last-child > a,
    &:last-child > span {
        .border-radius;
    }

    & > a,
    & > a:focus,
    & > a:hover,
    & > span,
    & > span:hover{
        text-decoration: none;
        color: @primary-color;
    }
}

.pagination > .active {
    & > a,
    & > a:focus,
    & > a:hover,
    & > span,
    & > span:focus,
    & > span:hover {
        background: @primary-color;
        border-color: @primary-color;
    }
}

.pagination > .disabled {
    & > a,
    & > a:focus,
    & > a:hover,
    & > span,
    & > span:focus,
    & > span:hover {
        display: none;
    }
}

/* ========================================================================
 * panel styles
 * ======================================================================== */

.panel-group .panel, .panel-heading, .panel-footer, .panel-body {
    .border-radius;
    padding: 0;
}

.panel {
    .box-shadow;
    border: none;
}

.panel-default > .panel-heading {
    background: transparent;
    font-size: 24px;
    font-weight: 500;
    border-bottom: 1px solid #e4e4e4;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* ========================================================================
 * noty styles
 * ======================================================================== */

#noty_topRight_layout_container {
    position: absolute !important;
}

#noty_topRight_layout_container, #noty_topLeft_layout_container {
    margin-top: 100px !important;
}

.noty_bar {
    height: auto;
    border: none;
    padding: 10px 20px;
}

.noty_container_type {
    &_notification {
        background-color: @base-dark-color;
        color: @base-light-color;
    }
    &_warning {
        background-color: #ffeaa8;
        color: #826200;
    }
    &_error {
        background-color: #e74c3c;
        color: @base-light-color;
    }
    &_information {
        background-color: #78c5e7;
        color: @base-light-color;
    }
    &_success {
        background-color: #40d47e;
        color: @base-light-color;
    }
}

@media only screen and (max-width: 768px) {
    #noty_topRight_layout_container, .noty_container_type_information, #noty_topLeft_layout_container, .noty_bar {
        width: 100% !important;
        left: 0;
        right: 0;
    }
}

/* ========================================================================
 * tiles styles
 * ======================================================================== */

ul.tiles {
    .reset-default;
}

ul.tiles li {
    display: inline-block;
}

ul.tiles li.square {
    min-width: 80px;
    .square-ratio(1,1);
}

ul.tiles li a {
    text-decoration: none;
    padding: 5px;
    background: #f3f3f3;
    color: @base-dark-color;
    display: block;
    overflow: hidden;
    line-height: 1.2em;
    white-space: normal;
    text-transform: capitalize;
}

ul.tiles .icon {
    display: block;
    font-size: 15px;
    margin: 0 auto 5px;
}

/* ========================================================================
 * modal popup styles
 * ======================================================================== */

.modal-open {
    padding: 0 !important;
}

.modal {
    z-index: 100000001;
    padding: 0 !important;
}

.modal-backdrop {
    z-index: 100000000;
}

.modal-content {
    .border-radius;
    .box-shadow;
}

.modal-dialog {
    margin: 80px auto;
}

@media only screen and (max-width: 768px) {
    .modal {
        padding: 0 15px !important;
    }
}

/* ========================================================================
 * list group styles
 * ======================================================================== */

.list-group-item:first-child,
.list-group-item:last-child {
    .border-radius;
}

a.list-group-item:hover {
    text-decoration: none;
}

.list-group-item.active, .active > .list-group-item {
    &,
    &:focus,
    &:hover {
        color: @base-light-color;
        background: @primary-color;
        border-color: @primary-color;
    }
}

/* ========================================================================
 * tree styles
 * ======================================================================== */

.tree-view,
.tree-view ul {
    .reset-default;
}

.tree-view ul {
    margin-left: 0.7em;
    position: relative;
}

.tree-view ul li {
    display: none;
}

.tree-view li[aria-expanded=true] > ul > li {
    display: list-item;
}

.tree-view li {
    margin: 0;
    padding: 0 2em;
    line-height: 2em;
    position: relative;
}

.tree-view .branch {
    cursor: pointer;
}

.tree-view li {
    & > .icon {
        font-family: @font-icons;
        font-style: normal;
        background: @primary-color;
        color: @base-light-color;
        height: 20px;
        width: 20px;
        text-align: center;
        line-height: 20px;
        font-size: 10px;
        display: inline-block;
        margin-right: 10px;
    }
    & > .icon:before {
        content: "\e687";
    }
    &[aria-expanded=true] > .icon:before {
        content: "\e685";
    }
}

.tree-view li a {
    &, &:hover {
        text-decoration: none;
    }
}

.tree-view li button {
    &:active,
    &:focus {
        cursor: pointer;
        text-decoration: none;
        border: none;
        background: transparent;
        .reset-default;
    }
}

.tree-view.tree-view-lines ul {
    &:before {
        content: "";
        display: block;
        width: 0;
        position: absolute;
        top: 0;
        bottom: 15px;
        left: 0;
        border-left: 1px solid;
    }
    & li:before {
        content: "";
        display: block;
        width: 20px;
        height: 0;
        border-top: 1px solid;
        margin-top: -1px;
        position: absolute;
        top: 1em;
        left: 0;
    }
}

.tree-view .checkbox,
.tree-view .radio {
    margin: 0;
    display: inline-block;
}

.tree-view .checkbox input[type=checkbox],
.tree-view .checkbox-inline input[type=checkbox],
.tree-view .radio input[type=radio],
.tree-view .radio-inline input[type=radio] {
    margin-top: 6px;
}

/* ========================================================================
 * asset details styles
 * ======================================================================== */

.asset-image {
    max-width: 150px;
    background: @primary-color;
    float: none;
}

.asset-desc .asset-name {
    font-size: 24px;
    margin-bottom: 0;
}

.asset-desc .asset-publisher {
    font-size: 14px;
    margin-bottom: 20px;
}
