//
// Coded variables
//
// @logo-image
// @brand-primary
// @brand-secondary
// @brand-accent
//

.br-p     { color: @brand-primary; }
.br-s     { color: @brand-secondary; }
.br-a     { color: @brand-accent; }
.br-p-s10 { color: saturate(@brand-primary,   10%); }
.br-s-s10 { color: saturate(@brand-secondary, 10%); }
.br-a-s10 { color: saturate(@brand-accent,    10%); }
.br-p-s20 { color: saturate(@brand-primary,   20%); }
.br-s-s20 { color: saturate(@brand-secondary, 20%); }
.br-a-s20 { color: saturate(@brand-accent,    20%); }

.bg-p     { background-color: @brand-primary; }
.bg-s     { background-color: @brand-secondary; }
.bg-a     { background-color: @brand-accent; }
.bg-p-s10 { background-color: saturate(@brand-primary,   10%); }
.bg-s-s10 { background-color: saturate(@brand-secondary, 10%); }
.bg-a-s10 { background-color: saturate(@brand-accent,    10%); }
.bg-p-s20 { background-color: saturate(@brand-primary,   20%); }
.bg-s-s20 { background-color: saturate(@brand-secondary, 20%); }
.bg-a-s20 { background-color: saturate(@brand-accent,    20%); }

@custom-dark-accent: mix(black, desaturate(@brand-accent, 35%), 20%);
@custom-dark-secondary: mix(black, saturate(@brand-secondary, 20%), 25%);
@custom-dark-primary: mix(black, saturate(@brand-primary, 5%), 15%);

//
// Sidenav Tree
//

.sidenav-tree ul.top-level > li {
    > div.group:before {
        border-top-color: @brand-primary;
    }
    > ul li.active {
        border-color: @brand-secondary;
    }
}

//
// Side panel
//

#layout-side-panel {
    .sidepanel-content-header {
        background: @custom-dark-secondary;
    }
}

//
// Asset List
//

.control-assetlist ul li.active a:after,
.control-assetlist ul li.active a.link:after {
    background: @brand-secondary;
}

//
// Pages List
//

.control-treeview ol > li.active > div::after {
    background: @brand-secondary;
}

//
// Outside Layout
//

body.outer {
    background: @custom-dark-primary;
}

//
// Logos
//

.oc-logo-transparent when not (@logo-image = '') {
    background-image: url('@{logo-image}') !important;
}

.oc-logo when not (@logo-image = '') {
    background-image: url('@{logo-image}');
}

//
// List
//

table.table.data {
    tbody {
        tr.active td {
            &:first-child {
                border-left: 3px solid @brand-secondary;
            }
        }
    }
}

//
// Fancy Layout
//

.fancy-layout .form-tabless-fields {
    background: @brand-secondary;

    .loading-indicator-container .loading-indicator {
        background: @brand-secondary;
    }
}

.fancy-layout .control-tabs.master-tabs,
.fancy-layout.control-tabs.master-tabs {
    > div > div.tabs-container > ul.nav-tabs > li.active a > span.title {
        &, &:before, &:after {
            background: @brand-secondary;
        }
    }

    > div > div.tabs-container > ul.nav-tabs > li a > span.title {
        &, &:before, &:after {
            background-color: mix(black, saturate(@brand-secondary, 20%), 31%);
        }
    }

    > div > div.tabs-container {
        background: @custom-dark-secondary;
    }
}

.fancy-layout .control-tabs.primary-tabs,
.fancy-layout.control-tabs.primary-tabs {
    &.master-area > div > ul.nav-tabs {
        background: @brand-secondary;
    }
}

.fancy-layout .control-tabs.secondary-tabs.secondary-content-tabs.primary-collapsed,
.fancy-layout.control-tabs.secondary-tabs.secondary-content-tabs.primary-collapsed {
    > div > ul.nav-tabs {
        background: @brand-secondary;
    }
}

.control-filelist ul li.active > a:after {
    background: @brand-secondary;
}

//
// Component List
//

div.control-componentlist {
    &.droppable {
        background-color: lighten(@brand-secondary, 20%);
    }
}

//
// Stripe Indicator
//

.stripe-loading-indicator {
    .stripe, .stripe-loaded {
        background: @brand-accent;
    }
}

//
// Balloon Selector
//

.control-balloon-selector {
    ul {
        li.active {
            background: @brand-secondary !important;
        }
    }
}

//
// Media
//

.nav.selector-group li.active {
    border-left-color: @brand-secondary;
}

//
// Fancy breadcrumb
//
body.breadcrumb-fancy .control-breadcrumb,
.control-breadcrumb.breadcrumb-fancy {
    background-color: mix(black, saturate(@brand-secondary, 20%), 16%);

    li {
        background-color: mix(black, saturate(@brand-secondary, 20%), 31%);

        &:last-child {
            background-color: mix(black, saturate(@brand-secondary, 20%), 16%);

            &::before {
                border-left-color: mix(black, saturate(@brand-secondary, 20%), 16%);
            }
        }

        &::after {
            border-left-color: mix(black, saturate(@brand-secondary, 20%), 31%);
        }

        &:not(:last-child)::before {
            border-left-color: @brand-secondary;
        }
    }
}
