/*!
 * Copyright 2019 Progress Software Corporation and/or one of its subsidiaries or affiliates. 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.
 */
// Widget
@widget-background-color: @background;
@widget-text-color: @normal-text-color;
@widget-border-color: darken(@background, 12%);
@widget-gradient: false;
@widget-shadow: 0 4px 10px 4px rgba(0, 0, 0, 0.2);
// Button
@button-text-color: lighten(@hover-text-color, 8%);
@button-background-color: @normal-background;
@button-border-color: lighten(@hover-text-color, 8%);
@button-gradient: false;
@button-shadow: false;
@button-hover-text-color: @button-text-color;
@button-hover-background-color: @hover-background;
@button-hover-border-color: @button-border-color;
@button-hover-gradient: false;
@button-hover-shadow: false;
@button-active-background: @accent-hover-background;
@button-active-text-color: @inversed-text-color;
@button-active-border-color: @selected-background;
@button-active-gradient: false;
@button-active-shadow: false;
@button-focused-border-color: @accent;
@button-focused-shadow: false;
@button-focused-active-shadow: false;
// Primary button
@primary-text-color: @inversed-text-color;
@primary-background-color: @accent;
@primary-border-color: @accent;
@primary-gradient: false;
@primary-shadow: false;
@primary-hover-text-color: @primary-text-color;
@primary-hover-background-color: lighten(@accent, 4%);
@primary-hover-border-color: @primary-hover-background-color;
@primary-hover-gradient: false;
@primary-hover-shadow: false;
@primary-active-text-color: @primary-text-color;
@primary-active-background-color: @accent-hover-background;
@primary-active-border-color: @accent-hover-background;
@primary-active-gradient: false;
@primary-active-shadow: false;
@primary-focused-border-color: multiply(@accent, #dbdbdb);
@primary-focused-shadow: false;
@primary-focused-active-shadow: false;
@primary-disabled-text-color: @selected-text-color;
@primary-disabled-background-color: lighten(@accent, 18%);
@primary-disabled-border-color: lighten(@accent, 18%);
@primary-disabled-gradient: false;
// Input
@input-text: @normal-text-color;
@input-bg: @background;
@input-border: darken(@normal-background, 12%);
@input-shadow: false;
@input-hovered-text: @input-text;
@input-hovered-bg: @input-bg;
@input-hovered-border: @input-border;
@input-hovered-shadow: false;
@input-focused-text: @input-text;
@input-focused-bg: @input-bg;
@input-focused-border: lighten(@hover-text-color, 8%);
@input-focused-shadow: false;
@sprite-image: url('@{image-folder}/sprite.png');
@inversed-text-color: contrast(@accent);
@accent-hover-background: multiply(@accent, #e5e5e5);
@link-text-color: #00acc1;
@popups-shadow: 0 0px 6px 1px rgba(0, 0, 0, 0.2);
@tabs-normal-bg: #081421;
@tabs-normal-gradient: "#303553 0%, #072138 100%";
@tabs-hover-bg: #081421;
@tabs-hover-gradient: "#202333 0%, #081421 100%";
@secondary-border-color: darken(@base, 12%);
@secondary-widget-background-color: darken(@widget-background-color, 2%);
@disabled-text-color: darken(@base, 23%);
@disabled-border-color: darken(@base, 6%);
@disabled-background-color: @widget-background-color;
@disabled-gradient: none;
@header-background-color: @accent;
@header-text-color: contrast(@accent);
@inputs-border-radius: 3px;
@input-validation-error: darken(@error, 25%);
@column-highlight-background-color: darken(@background, 4%);
@scheduler-nonwork-background-color: darken(@background, 2%);
@notification-border-radius: @border-radius;
@notification-info-background-color: @info;
@notification-info-text-color: darken(@info, 38%);
@notification-info-border-color: @info;
@notification-success-background-color: @success;
@notification-success-text-color: darken(@success, 27%);
@notification-success-border-color: @success;
@notification-warning-background-color: @warning;
@notification-warning-text-color: darken(@warning, 27%);
@notification-warning-border-color: @warning;
@notification-error-background-color: @error;
@notification-error-text-color: darken(@error, 25%);
@notification-error-border-color: @error;
@notification-gradient: false;
@cell-border-color: transparent;
@focused-shadow: none;
@default-icon-opacity: 1;
@hover-background-color: @hover-background;
@hover-border-color: @hover-background;


// Link
@link-text: @link-text-color;
@link-hovered-text: contrast(@base, darken(@link-text, 4), lighten(@link-text, 4), .5);


// component
@component-bg: @widget-background-color;
@component-text: @widget-text-color;
@component-border: @widget-border-color;


// Toolbar
@toolbar-bg: @header-background-color;
@toolbar-text: @normal-text-color;
@toolbar-border: @widget-border-color;
@toolbar-gradient: @widget-gradient;

@card-bg: @component-bg;
@card-text: @component-text;
@card-border: @component-border;

@card-header-bg: @header-background-color;
@card-header-text: contrast(@card-header-bg);
@card-header-border: @card-border;


@chat-bg: @component-bg;
@chat-text: @component-text;
@chat-border: @component-border;

@chat-bubble-bg: @button-background-color;
@chat-bubble-text: @button-text-color;
@chat-bubble-border: @chat-bubble-bg;

@chat-alt-bubble-bg: @accent;
@chat-alt-bubble-text: contrast(@accent);
@chat-alt-bubble-border: @chat-alt-bubble-bg;

@chat-quick-reply-color: @accent;


// Grid
@grid-bg: @component-bg;
@grid-text: @component-text;
@grid-border: @component-border;

@grid-header-bg: @secondary-widget-background-color;
@grid-header-text: lighten(@hover-text-color, 8%);
@grid-header-border: @grid-border;
@grid-header-gradient: false;

@grid-alt-bg: @grid-bg;
@grid-alt-text: @grid-text;
@grid-alt-border: @grid-border;

@grid-hover-bg: @hover-background;
@grid-hover-text: @grid-text;
@grid-hover-border: @grid-border;
@grid-hover-gradient: false;

@grid-selected-bg: lighten(@info, 22%);
@grid-selected-text: @grid-text;
@grid-selected-border: @grid-border;
@grid-selected-gradient: false;


// Calendar
@calendar-bg: @component-bg;
@calendar-text: @component-text;
@calendar-border: @component-border;

@calendar-header-bg: @header-background-color;
@calendar-header-text: @header-text-color;
@calendar-header-border: @calendar-border;
@calendar-header-gradient: none;

@calendar-header-cell-bg: @calendar-bg;
@calendar-header-cell-text: #9ca3a6;
@calendar-header-cell-border: @calendar-border;

@calendar-week-cell-bg: contrast(@calendar-bg, lighten(@calendar-bg, 4), darken(@calendar-bg, 4), .5);
@calendar-week-cell-text: @calendar-header-cell-text;
@calendar-week-cell-border: @calendar-header-cell-border;

@calendar-weekend-cell-bg: transparent;
@calendar-weekend-cell-text: null;
@calendar-weekend-cell-border: null;

@calendar-othermonth-cell-bg: null;
@calendar-othermonth-cell-text: @disabled-text-color;
@calendar-othermonth-cell-border: null;

@calendar-cell-hovered-bg: @button-hover-background-color;
@calendar-cell-hovered-text: @button-hover-text-color;
@calendar-cell-hovered-border: @button-hover-border-color;

@calendar-cell-selected-bg: lighten(@info, 22%);
@calendar-cell-selected-text: @link-text;
@calendar-cell-selected-border: lighten(@info, 22%);

@calendar-cell-focused-shadow: inset 0 0 0 1px lighten(@hover-text-color, 8%);


// Dialog
@dialog-button-stretched-padding-x: 1em;
@dialog-button-stretched-padding-y: @dialog-button-stretched-padding-x;

// Tooltip
@tooltip-text-color: @normal-text-color;
@tooltip-background-color: @background;
@tooltip-border-color: darken(@background, 21%);

// ScrollView
@scrollview-pagebutton-bg: @button-background-color;
@scrollview-pagebutton-border: @button-border-color;
@scrollview-pagebutton-primary-bg: @primary-background-color;
@scrollview-pagebutton-primary-border: @primary-border-color;
@scrollview-pagebutton-shadow: @button-shadow;

@scrollview-navigation-color: @selected-text-color;
@scrollview-navigation-icon-shadow: rgba(0, 0, 0, .3) 0 0 15px;
@scrollview-navigation-background: rgba(0, 0, 0, 0);
@scrollview-navigation-default-opacity: .7;
@scrollview-navigation-hover-opacity: 1;
@scrollview-navigation-hover-span-bg: transparent;


// Switch
@switch-container-shadow: false;
@switch-container-hovered-shadow: false;
@switch-container-focused-shadow: false;

@switch-on-bg: @normal-background;
@switch-on-text: @primary-background-color;
@switch-on-border: darken(@base, 12%);
@switch-on-gradient: false;
@switch-on-shadow: false;
@switch-on-focused-shadow: false;

@switch-on-focused-bg: @switch-on-bg;
@switch-on-focused-text: @switch-on-text;
@switch-on-focused-border: @button-border-color;
@switch-on-focused-gradient: @switch-on-gradient;

@switch-on-hovered-bg: @switch-on-bg;
@switch-on-hovered-text: @switch-on-text;
@switch-on-hovered-border: @switch-on-border;
@switch-on-hovered-gradient: false;

@switch-on-handle-bg: @primary-background-color;
@switch-on-handle-text: @switch-on-text;
@switch-on-handle-border: @primary-border-color;
@switch-on-handle-gradient: @primary-gradient;
@switch-on-handle-shadow: false;

@switch-on-handle-focused-bg: @switch-on-handle-bg;
@switch-on-handle-focused-text: @switch-on-handle-text;
@switch-on-handle-focused-border: multiply(@primary-background-color, #e5e5e5);
@switch-on-handle-focused-gradient: @switch-on-handle-gradient;

@switch-on-handle-hovered-bg: @switch-on-handle-focused-border;
@switch-on-handle-hovered-text: @switch-on-text;
@switch-on-handle-hovered-border: @switch-on-handle-focused-border;
@switch-on-handle-hovered-gradient: @primary-hover-gradient;

@switch-off-bg: @switch-on-bg;
@switch-off-text: @normal-text-color;
@switch-off-border: @switch-on-border;
@switch-off-gradient: false;
@switch-off-shadow: false;
@switch-off-focused-shadow: @switch-on-focused-shadow;

@switch-off-focused-bg: @switch-off-bg;
@switch-off-focused-text: @switch-off-text;
@switch-off-focused-border: @button-border-color;
@switch-off-focused-gradient: @switch-off-gradient;

@switch-off-hovered-bg: @switch-off-bg;
@switch-off-hovered-text: @switch-off-text;
@switch-off-hovered-border: @switch-on-hovered-border;
@switch-off-hovered-gradient: false;

@switch-off-handle-bg: @button-background-color;
@switch-off-handle-text: @switch-off-text;
@switch-off-handle-border: @button-border-color;
@switch-off-handle-gradient: @button-gradient;
@switch-off-handle-shadow: false;

@switch-off-handle-focused-bg: @switch-off-handle-bg;
@switch-off-handle-focused-text: @switch-off-handle-text;
@switch-off-handle-focused-border: @button-focused-border-color;
@switch-off-handle-focused-gradient: @switch-off-handle-gradient;

@switch-off-handle-hovered-bg: @button-hover-background-color;
@switch-off-handle-hovered-text: @switch-off-text;
@switch-off-handle-hovered-border: @button-hover-border-color;
@switch-off-handle-hovered-gradient: @button-hover-gradient;


// PDF viewer
@pdf-viewer-bg: null;
@pdf-viewer-text: null;
@pdf-viewer-border: null;

@pdf-viewer-canvas-bg: @chat-bg;
@pdf-viewer-canvas-text: null;
@pdf-viewer-canvas-border: null;

@pdf-viewer-page-bg: white;
@pdf-viewer-page-text: @component-text;
@pdf-viewer-page-border: @component-border;
@pdf-viewer-page-shadow: 0 0 15px @pdf-viewer-page-border;

@pdf-viewer-toolbar-button-bg: @button-text-color;


// Adaptive Common
@adaptive-content-bg: darken(@background, 2%);
@adaptive-content-text: @accent;

@adaptive-menu-bg: @accent;
@adaptive-menu-text: @selected-text-color;

@adaptive-menu-clear-text: @accent;

@adaptive-menu-item-border: darken(@background, 12%);

@adaptive-menu-title-text: @normal-text-color;


// Adaptive Grid
@adaptive-grid-sort-text: @accent;

// Adaptive Scheduler
@adaptive-scheduler-current-text: @normal-text-color;
@adaptive-scheduler-base-text: inherit;


// Drawer
@drawer-text:  @widget-text-color;
@drawer-bg: @widget-background-color;
@drawer-border: @widget-border-color;

@drawer-scrollbar-color: rgba(156, 156, 156, 0.7);
@drawer-scrollbar-bg: #dedede;
@drawer-scrollbar-hovered-color: rgba(156, 156, 156, 1);

@drawer-hovered-text: @hover-text-color;
@drawer-hovered-bg: @hover-background;
@drawer-hovered-gradient: @hover-gradient;

@drawer-focused-bg: @drawer-bg;
@drawer-focused-shadow: inset 0 0 0 1px @accent;

@drawer-selected-text: @selected-text-color;
@drawer-selected-bg: @selected-background;
@drawer-selected-hover-bg: contrast(@background, lighten(@selected-background, 5%), darken(@selected-background, 5%), 0.5);
@drawer-selected-hover-text: @selected-text-color;


// Spreadsheet
@spreadsheet-insert-image-dialog-preview-overlay: inset 0 0 0 2000px rgba(0,0,0, 0.5);
@spreadsheet-insert-image-dialog-hovered-text: #fff;

@spreadsheet-drawing-handle-bg: @spreadsheet-selection-border;
@spreadsheet-drawing-handle-border-color: #fff;
@spreadsheet-drawing-handle-border-radius: 50%;
@spreadsheet-drawing-handle-outline: @spreadsheet-selection-border;

@spreadsheet-drawing-anchor-bg:  @spreadsheet-selection-background;


@theme-name: ~"nova";

@import "common/mixins.less";
@import "mixins/gradients.less";
@import "mixins/border-radius.less";
@import "themes/type.less";
@import "themes/button.less";
@import "Default/card/_theme.less";
@import "Default/chat/_theme.less";
@import "Default/calendar/_theme.less";
@import "Default/multiviewcalendar/_theme.less";
@import "Default/pdf-viewer/_theme.less";
@import "Default/scrollview/_theme.less";
@import "Default/switch/_theme.less";
@import "common/adaptive/_theme.less";
@import "Default/drawer/_theme.less";


// Main colors
.k-splitbar .k-resize-handle {
    background-color: @normal-text-color;
}

.k-in,
.k-item {
    border-color: transparent;
}

.k-block,
.k-widget {
    background-color: @background;
}

.k-block,
.k-widget,
.k-input,
.k-textbox,
.k-group,
.k-content,
.k-header,
.k-filter-row > th,
.k-editable-area,
.k-separator,
.k-textbox > input,
.k-autocomplete,
.k-dropdown-wrap,
.k-toolbar,
.k-group-footer td,
.k-grid-footer,
.k-footer-template td,
.k-state-default,
.k-state-disabled,
.k-grid-header,
.k-grid-header-wrap,
.k-grid-header-locked,
.k-grid-footer-locked,
.k-grid-content-locked,
.k-grid td,
.k-grid td.k-state-selected,
.k-grid-footer-wrap,
.k-pager-wrap,
.k-pager-wrap .k-link,
.k-pager-refresh,
.k-grouping-header,
.k-grouping-header .k-group-indicator,
.k-panelbar > .k-item > .k-link,
.k-panel > .k-item > .k-link,
.k-panelbar .k-panel,
.k-panelbar .k-content,
.k-treemap-tile,
.k-slider-track,
.k-splitbar,
.k-dropzone-active,
.k-tiles,
.k-tooltip,
.k-button-group .k-tool,
.k-upload-files,
.k-popup.k-align .k-list .k-item:last-child,
.k-maskedtextbox.k-state-disabled > .k-textbox:hover,
.k-dateinput.k-state-disabled > .k-textbox:hover {
    border-color: @widget-border-color;
}

.k-group,
.k-toolbar,
.k-grouping-header,
.k-pager-wrap,
.k-group-footer td,
.k-grid-footer,
.k-footer-template td,
.k-widget .k-status,
.k-dropzone-hovered,
.k-popup {
    background-color: @widget-background-color;
}

.k-mediaplayer-toolbar {
    background: fade(@widget-background-color, 85%);
}

.k-header,
.k-grid-header,
.k-grouping-header,
.k-pager-wrap,
.k-state-highlight,
.k-panelbar .k-tabstrip-items .k-item {
    background-color: @accent;
    border-color: @accent;
}

.k-block,
.k-widget,
.k-popup,
.k-content,
.k-toolbar,
.k-dropdown .k-input {
    color: @normal-text-color;
}

.k-popup,
.k-menu .k-menu-group,
.k-grid .k-filter-options,
.k-time-popup,
.k-tooltip {
    .box-shadow(@popups-shadow);
}

.k-content,
.k-panelbar > li.k-item,
.k-panel > li.k-item,
.k-tiles {
    background-color: @background;
}

.k-alt,
.k-separator,
.k-resource.k-alt,
.k-pivot-layout > tbody > tr:first-child > td:first-child {
    background-color: @background;
}

.k-input,
input.k-textbox,
textarea.k-textbox,
input.k-textbox:hover,
textarea.k-textbox:hover,
.k-textbox > input,
.k-multiselect-wrap {
    color: @normal-text-color;
    background-color: @background;
    border-color: @widget-border-color;
}

.k-state-selected {
    background-color: fadeout(@info, 75%);
}

.k-state-focused:not(.k-button) {
    box-shadow: inset 0 0 0 1px darken(@widget-border-color, 35%);
}

.k-state-hover,
.k-splitbar-horizontal-hover,
.k-splitbar-vertical-hover,
.k-list>.k-state-hover,
.k-pager-wrap .k-link:hover,
.k-dropdown .k-state-focused,
.k-filebrowser-dropzone {
    color: @hover-text-color;
    background-color: @hover-background;
    border-color: @hover-background;
}

.k-pager-wrap .k-link.k-state-disabled {
    color: @link-text-color;
}

.k-state-disabled,
.k-state-disabled .k-link,
.k-dropzone em,
.k-tile-empty strong,
.k-slider .k-draghandle {
    color: @disabled-border-color;
}

// Border radius
.k-block,
.k-drag-clue,
.k-touch-scrollbar,
.k-window,
.k-window-titleless .k-window-content,
.k-inline-block,
.k-grid .k-filter-options,
.k-grouping-header .k-group-indicator,
.k-treeview .k-in,
.k-editor-inline,
.k-tile,
.k-slider-track,
.k-slider-selection {
    border-radius: @border-radius;
}

.k-textbox,
.k-autocomplete,
.k-autocomplete .k-input,
.k-multiselect,
.k-combobox,
.k-dropdown,
.k-dropdown-wrap,
.k-datepicker,
.k-timepicker,
.k-colorpicker,
.k-datetimepicker,
.k-numerictextbox,
.k-picker-wrap,
.k-numeric-wrap,
.k-tooltip,
.k-upload,
.k-split-button {
    border-radius: @inputs-border-radius;
}

.k-dropdown-wrap .k-input,
.k-picker-wrap .k-input,
.k-numeric-wrap .k-input,
.k-toolbar .k-split-button .k-button {
    border-radius: @inputs-border-radius 0 0 @inputs-border-radius;
}

.k-toolbar .k-split-button .k-split-button-arrow {
    border-radius: 0 @inputs-border-radius @inputs-border-radius 0;
}

.k-hr {
    border-color: @widget-border-color;
}

.k-rtl .k-dropdown-wrap .k-input,
.k-rtl .k-picker-wrap .k-input,
.k-rtl .k-numeric-wrap .k-input {
    border-radius: 0 @inputs-border-radius @inputs-border-radius 0;
}

// Default icons opacity
.k-button .k-image,
.k-panelbar > .k-state-active > .k-header > .k-icon,
.k-panelbar > .k-state-active > .k-header .k-state-default .k-icon
 {
    opacity: .4;
}

.k-primary .k-icon,
.k-state-active .k-icon,
.k-button:active .k-icon,
.k-numerictextbox .k-state-selected .k-icon,
.k-multiselect-wrap .k-icon,
.k-window-titlebar .k-icon,
.k-drag-clue .k-icon,
.k-group-indicator .k-icon,
.k-pivot-toolbar .k-icon,
.k-grid-content .k-button:active .k-icon,
.k-splitbar.k-state-focused .k-icon,
.k-scheduler-toolbar .k-icon,
.k-gantt-toolbar .k-icon,
.k-toolbar .k-overflow-anchor.k-state-border-down .k-i-more-vertical,
.k-panelbar > .k-state-active > .k-header .k-state-active .k-icon {
    opacity: 1;
}

.k-state-disabled .k-icon,
.k-state-disabled .k-button .k-icon,
.k-button.k-state-disabled .k-icon {
    opacity: .7;
}

.k-split-button.k-state-disabled .k-icon {
    opacity: 1;
}

// Loading indicator
.k-i-loading {
    background-image: url('@{image-folder}/loading.gif');
}

.k-loading-image { background-image: url('@{image-folder}/loading-image.gif'); }
.k-loading-color { background-color: @background; }

// Button
.k-button {
    border-radius: @inputs-border-radius;
}

// Bare Button
.k-button.k-bare {
    position: relative;

    &:before {
        content: "";
        background-color: currentcolor;
        opacity: 0.12;
        border-radius: inherit;
        height: 100%;
        width: 100%;
        position: absolute;
        left: 0;
        top: 0;
        display: none;
    }

    &.k-state-focused,
    &:focus {

        &:before {
            display: block;
        }
    }
}

.k-mediaplayer-toolbar .k-button.k-bare {
    &:active,
    &.k-state-active,
    &.k-state-active:hover {
        color: @accent;

        &:before {
            opacity: 0.24;
        }
    }
}

.k-slider.k-mediaplayer-seekbar {
    top: -14px;
}

.k-quality-list {
    margin-left: -25px !important;
}

// Menu
.k-menu {
    background-color: @base;
    border-color: @base;
}

.k-menu {
    >.k-item.k-state-hover {
        color: @normal-text-color;
    }

    .k-popup .k-item {
        color: @link-text-color;
    }

    .k-item > .k-state-active {
        color: @selected-text-color;
        background-color: @selected-background;
    }

    .k-state-selected.k-state-hover,
    .k-menu-scroll-button:hover {
        background-color: lighten(@info, 11%);
    }

    .k-state-hover .k-link.k-state-active {
        background-color: @accent-hover-background;
    }
}

// Inputs
.k-list-container {
    border-color: darken(@normal-background, 12%);
    background-color: @normal-background;
}

.k-dropdown,
.k-combobox,
.k-datepicker,
.k-datetimepicker,
.k-colorpicker {
    background-color: @widget-background-color;
}

.k-autocomplete,
.k-picker-wrap.k-state-default,
.k-numeric-wrap.k-state-default,
.k-dropdown-wrap.k-state-default {
    background-color: @normal-background;
    border-color: darken(@normal-background, 12%);
}

.k-multiselect-wrap,
.k-multiselect-wrap.k-state-hover {
    background-color: @widget-background-color;
    border-color: darken(@normal-background, 12%);
}

.k-autocomplete.k-state-hover,
.k-picker-wrap.k-state-hover,
.k-numeric-wrap.k-state-hover,
.k-dropdown-wrap.k-state-hover {
    background-color: @hover-background;
}

.k-autocomplete.k-state-focused,
.k-picker-wrap.k-state-focused,
.k-numeric-wrap.k-state-focused,
.k-dropdown-wrap.k-state-focused {
    background-color: @normal-background;
    border-color: lighten(@hover-text-color, 8%);
    box-shadow: none;
}
.k-multiselect-wrap.k-state-focused,
.k-state-focused > .k-multiselect-wrap {
    background-color: @normal-background;
    border-color: lighten(@hover-text-color, 8%);
    box-shadow: none;
}

.k-autocomplete.k-state-active,
.k-picker-wrap.k-state-active,
.k-numeric-wrap.k-state-active,
.k-dropdown-wrap.k-state-active {
    color: @selected-text-color;
    background-color: @selected-background;
    border-color: @selected-background;
}
.k-multiselect-wrap.k-state-active,
.k-state-active.k-multiselect-wrap {
    color: @selected-text-color;
    background-color: @selected-background;
    border-color: @selected-background;
}
.k-multiselect-wrap.k-state-border-up,
.k-multiselect-wrap.k-state-border-down,
.k-state-border-up > .k-multiselect-wrap,
.k-state-border-down > .k-multiselect-wrap {
    border-color: @selected-background;
}

.k-textbox.k-state-disabled,
.k-state-disabled .k-picker-wrap,
.k-autocomplete.k-state-disabled,
.k-dropdown-wrap.k-state-disabled,
.k-picker-wrap.k-state-disabled,
.k-numeric-wrap.k-state-disabled {
    background-color: @widget-background-color;
    border-color: @disabled-border-color;
}
.k-multiselect-wrap.k-state-disabled,
.k-state-disabled > .k-multiselect-wrap {
    background-color: @widget-background-color;
    border-color: @disabled-border-color;
}

.k-numerictextbox .k-select,
.k-combobox .k-select,
.k-picker-wrap .k-select {
    border-color: @widget-background-color;
}

.k-autocomplete.k-state-border-up,
.k-autocomplete.k-state-border-down,
.k-picker-wrap.k-state-active .k-select,
.k-numeric-wrap.k-state-active .k-select,
.k-dropdown-wrap.k-state-active .k-select {
    border-color: @selected-background;
}

.k-numeric-wrap .k-link.k-state-selected,
.k-grid .k-numeric-wrap .k-link.k-state-selected {
    background-color: @selected-background;
}

.k-dropdown .k-state-active .k-input {
    color: @selected-text-color;
}

.k-colorpicker .k-selected-color {
    background-color: @widget-background-color;
}

input.k-textbox:focus {
    border-color: lighten(@hover-text-color, 8%);
}

input.k-textbox:active {
    border-color: @selected-background;
}

.k-popup > .k-group-header,
.k-popup > .k-virtual-wrap > .k-group-header {
    background: @selected-background;
    color: @selected-text-color;
}

.k-popup .k-list .k-item {
    color: @link-text-color;
}

.k-group-header + div > .k-list > .k-item.k-first:before {
    border-top-color: @selected-background;
}

.k-popup .k-list .k-state-selected.k-state-focused.k-first:before {
    border-top-color: multiply(@accent, #9a9a9a);
}

.k-popup .k-list .k-item > .k-group {
    background: @selected-background;
    color: @selected-text-color;
}

.k-popup .k-list .k-state-selected {
    color: @selected-text-color;
    background-color: @selected-background;
    border-color: @selected-background;
}

.k-popup .k-list .k-state-focused {
    border-color: darken(@widget-border-color, 27%);
    box-shadow: none;
}

.k-popup .k-list .k-state-selected.k-state-focused {
    border-color: multiply(@accent, #9a9a9a);
}

.k-popup .k-list .k-state-selected.k-state-hover {
    background-color: multiply(@accent, #cccccc);
}

.k-multiselect-wrap {
    .k-button {
        color: @inversed-text-color;
        background-color: @accent;
        border-color: @accent;
    }
}

.k-multiselect.k-state-disabled {
    .k-button {
        color: @primary-disabled-text-color;
        background-color: @primary-disabled-background-color;
        border-color: @primary-disabled-border-color;
    }
}

.k-list-optionlabel {
    border-color: transparent;
}

.k-nodata {
    color: @disabled-text-color;
}

// Notification
@import "themes/notification.less";

// Tooltip
.k-widget.k-tooltip,
.k-chart-crosshair-tooltip,
.k-chart-shared-tooltip {
    color: @normal-text-color;
    background-color: @widget-background-color;
    border-color: @widget-border-color;
    .box-shadow(@widget-shadow);
}

.k-widget.k-tooltip-validation {
    color: darken(@warning, 25%);
    background-color: @warning;
    border-color: @warning;
    .box-shadow(none);
    border-radius: 0;
}

// Badge
.k-badge {
    background-color: @accent;
    color: contrast(@accent, @normal-background, @normal-text-color, 0.5);
}

// TreeView
.k-treeview {
    .k-state-hover {
        color: @normal-text-color;
    }

    .k-state-selected {
        color: @accent;
    }
}

// Splitter
.k-splitbar {
    background: @widget-background-color;
    border-color: @widget-background-color;
}

.k-splitbar.k-state-focused {
    background-color: @selected-background;
    border-color: @selected-background;
}

// Window
.k-window {
    .box-shadow(@widget-shadow);
}

.k-window {
    > .k-header {
        color: @inversed-text-color;
    }

    > .k-header .k-state-hover {
        background-color: @accent-hover-background;
    }
}

// PanelBar
.k-panelbar {
    color: @normal-text-color;
    background-color: @widget-background-color;
    border-color: @widget-border-color;
}

.k-panelbar {
    > .k-item .k-panel > .k-item > .k-link,
    > .k-item .k-panel > .k-item .k-panel > .k-item > .k-link,
    .k-panel > .k-item .k-panel .k-item > .k-link {
        color: @normal-text-color;
    }

     .k-item > .k-link.k-header {
        color: @accent;
        background-color: @widget-background-color;
    }

    > .k-item > .k-link.k-state-hover,
    > .k-item .k-panel > .k-item > .k-link.k-state-hover {
        background-color: @hover-background;
    }
}

// TabStrip
.k-tabstrip.k-header {
    background-color: @widget-background-color;
}

.k-tabstrip-items {
    .composite-background(@tabs-normal-gradient);
    background-color: @tabs-normal-bg;
}

.k-tabstrip-items {
    .k-item {
        color: @inversed-text-color;
        border-color: transparent;
    }

    .k-item.k-state-hover,
    .k-item.k-state-selected {
        border-top-color: @normal-text-color;
        .composite-background(@tabs-hover-gradient);
        background-color: @tabs-hover-bg;
    }
}

.k-tabstrip-left > .k-tabstrip-items > .k-item.k-state-active {
    border-right-color: @selected-background;
}

.k-tabstrip-right > .k-tabstrip-items > .k-item.k-state-active {
    border-left-color: @selected-background;
}

.k-tabstrip-top > .k-tabstrip-items .k-item.k-state-active {
    .composite-background(@tabs-hover-gradient);
    border-bottom-color: @selected-background;
}

.k-tabstrip-bottom > .k-tabstrip-items > .k-item.k-state-active {
    border-top-color: @selected-background;
}

// ProgressbBar
.k-progressbar {
    background: darken(@widget-background-color, 20%);
    border-color: darken(@widget-background-color, 20%);
}

.k-progressbar {
    .k-state-selected {
        background-color: @selected-background;
    }
}

.k-progressbar-horizontal {
    .k-state-selected {
        border-top-color: @selected-background;
        border-bottom-color: @selected-background;
        border-left-color: darken(@normal-background, 12%);
        border-right-color: darken(@normal-background, 12%);
    }

    .k-state-selected.k-first {
        border-left-color: @selected-background;
    }

    .k-state-selected.k-last {
        border-right-color: @selected-background;
    }
}

.k-progressbar-vertical {
    .k-state-selected {
        border-left-color: @selected-background;
        border-right-color: @selected-background;
        border-top-color: darken(@normal-background, 12%);
        border-bottom-color: darken(@normal-background, 12%);
    }

    > .k-complete {
        border-top-color: @selected-background;
        border-bottom-color: @selected-background;
    }

    .k-state-selected.k-first {
        border-top-color: @selected-background;
    }

    .k-state-selected.k-last {
        border-bottom-color: @selected-background;
    }
}

// Grid
.k-grid-header,
.k-grid-header .k-header,
.k-pager-wrap,
.k-pager-numbers .k-state-selected,
.k-grid-footer,
.k-grid-footer td,
.k-scheduler-agenda .k-scheduler-header {
    background-color: @secondary-widget-background-color;
    border-color: @widget-border-color;
}

.k-grid-header .k-header .k-link,
.k-grid-header .k-header,
.k-grid-header .k-link,
.k-grid-header .k-link:link,
.k-pager-info,
.k-scheduler-agenda .k-scheduler-header,
.k-scheduler-agendaview .k-scheduler-datecolumn {
    color: lighten(@hover-text-color, 8%);
}

.k-grid .k-alt {
    background-color: @widget-background-color;
}

.k-grid tr:hover {
    background-color: @hover-background;
}

.k-grid-header th.k-state-focused,
.k-grid td.k-state-focused {
    box-shadow: inset 0 0 0 1px darken(@widget-border-color, 27%);
}

.k-grid-toolbar .k-button,
.k-grid-content .k-button {
    color: @accent;
    border-color: transparent;
    background-color: @normal-background;
}

.k-grid-toolbar .k-button-icontext .k-icon,
.k-grid-content .k-button-icontext .k-icon,
.k-edit-form-container .k-edit-buttons .k-button-icontext .k-icon  {
    display: none;
}

.k-edit-form-container .k-edit-buttons {
    background-color: @background;
}

.k-grid-toolbar .k-button:hover {
    border-color: @hover-background;
}

.k-grid-content .k-button-icontext {
    background-color: transparent;
}

.k-grid-content .k-primary {
    color: @inversed-text-color;
    background-color: @accent;
}

.k-grid-toolbar .k-button:active,
.k-grid-content .k-button-icontext:active {
    color: @inversed-text-color;
    background-color: @selected-background;
    border-color: @selected-background;
}

.k-grid-content .k-button:active {
    border-color: @selected-background;
}

.k-header.k-grid-toolbar {
    background-color: @widget-background-color;
    border-color: @widget-border-color;
}

.k-grid .k-grouping-header {
    color: rgba(256, 256, 256, 0.5);
}

.k-grouping-header .k-group-indicator{
    color: @inversed-text-color;
    background-color: @accent-hover-background;
    border-color: @accent-hover-background;
}

.k-group-indicator .k-link {
    color: @inversed-text-color;
}

.k-grouping-row {
    background-color: @secondary-widget-background-color;
    font-weight: bold;
}

.k-group-cell {
    background-color: @secondary-widget-background-color;
}

.k-filter-menu .k-button,
.k-edit-form-container .k-button {
    color: @normal-text-color;
    background: transparent;
    border-color: transparent;
}

.k-filter-menu .k-button:active {
    color: @normal-text-color;
}

.k-filter-menu .k-primary,
.k-edit-form-container .k-primary {
    color: @accent;
}

.k-filter-menu .k-primary {
    border-left-color: @widget-border-color;
}

.k-filter-menu>div>div:last-child {
    border-color: @widget-border-color;
}

.k-grid td.k-state-selected,
.k-grid tr.k-state-selected > td {
    border-color: fadeout(@widget-border-color, 20%);
}

.k-grid tr.k-state-selected,
.k-grid td.k-state-selected,
.k-grid td.k-state-selected.k-state-focused {
    background-color: lighten(@info, 22%);
}

.k-grid td.k-state-selected:hover,
.k-grid tr.k-state-selected:hover td {
    background-color: lighten(@info, 17%);
}

.k-grid tr:hover .k-state-focused.k-state-selected,
.k-grid tr.k-state-selected:hover td.k-state-focused {
    box-shadow: inset 0 0 0 1px darken(@widget-border-color, 35%);
}

.k-grid .k-state-selected:hover .k-group-cell {
    background-color: @secondary-widget-background-color;
}

.k-marquee-color {
    background-color: desaturate(@info, 8%);
}

// PivotGrid
.k-alt,
.k-grid.k-alt,
.k-fieldselector .k-item.k-header {
    background-color: @secondary-widget-background-color;
    border-color: @widget-border-color;
}

.k-pivot-toolbar .k-button {
    color: @inversed-text-color;
    background-color: @accent-hover-background;
    border-color: @accent-hover-background;
}

.k-pivot-toolbar .k-empty {
    color: rgba(256, 256, 256, 0.5);
}

.k-fieldselector .k-item.k-header.k-state-hover {
    color: @normal-text-color;
}

.k-grid-footer td,
.k-pivot-rowheaders .k-grid-footer {
    font-weight: bold;
}

.k-grid .k-filter-row:hover,
.k-pivot-rowheaders .k-grid tr:hover {
    background: none;
}

// Pager
.k-pager-wrap,
.k-pager-numbers .k-link,
.k-pager-numbers .k-link:link {
    color: @normal-text-color;
}

.k-pager-wrap .k-link {
    border-color: @secondary-widget-background-color;
}

.k-pager-wrap .k-link:hover {
    background-color: transparent;
    border-color: transparent;
}

.k-pager-numbers .k-state-selected {
    color: @selected-background;
    border-color: @selected-background transparent transparent;
    border-radius: 0;
}

.k-pager-lg,
.k-pager-md,
.k-pager-sm {

    .k-pager-numbers {
        color: @link-text-color;
        background-color: @normal-background;

        &.k-state-expanded {

            li:nth-child(2) {
                padding-bottom: 11px;
            }

            li:last-child {
                padding-top: 11px;
            }

            .k-link:hover {
                color: @hover-text-color;
                background-color: @hover-background;
                border-color: @hover-background;
            }

            .k-state-selected,
            .k-current-page .k-link {
                color: @primary-text-color;
                background-color: @primary-background-color;
                border-color: @primary-border-color;
            }
        }
    }
}

// Scheduler
.k-scheduler th,
.k-scheduler tr,
.k-scheduler td {
    border-color: @widget-border-color;
}

.k-scheduler-table td.k-state-selected {
    background-color: lighten(@info, 22%);
}

.k-scheduler-toolbar {
    border-color: @secondary-widget-background-color;
}

.k-scheduler .k-header .k-button,
.k-scheduler .k-header li,
.k-scheduler .k-header .k-link {
    color: @inversed-text-color;
}

.k-scheduler .k-header .k-button {
    color: @inversed-text-color;
    background-color: @accent-hover-background;
    border-color: @accent-hover-background;
}

.k-scheduler .k-header li,
.k-scheduler .k-header .k-link,
.k-gantt>.k-header li {
    border-color: @accent;
}

.k-scheduler .k-scheduler-toolbar ul li.k-state-hover,
.k-scheduler .k-scheduler-toolbar .k-state-selected {
    background-color: @selected-background;
    border-color: @selected-background;
}

.k-scheduler .k-header .k-button:hover,
.k-scheduler .k-scheduler-toolbar .k-scheduler-views li.k-state-hover,
.k-scheduler .k-scheduler-toolbar .k-scheduler-views li.k-state-hover .k-link {
    background-color: @accent-hover-background;
    border-color: @accent-hover-background;
}

.k-scheduler .k-scheduler-toolbar .k-scheduler-views li.k-state-selected.k-state-hover,
.k-scheduler-toolbar>.k-scheduler-views>li.k-state-selected {
    border-bottom-color: @widget-background-color;
}

.k-scheduler-footer {
    border-color: @widget-border-color;
}

.k-scheduler-footer > .k-header li {
    border-color: transparent;
}

.k-scheduler-footer > .k-header {
    background-color: @secondary-widget-background-color;
    border-color: @widget-border-color;
}

.k-scheduler-footer > .k-header .k-link {
    color: @link-text-color;
}

.k-event,
.k-task-complete {
    color: @inversed-text-color;
    background: darken(@info, 21%);
    border-color: darken(@info, 21%);
}

.k-event.k-state-selected {
    .box-shadow(0 0 0 2px @normal-text-color);
}

.k-scheduler-table .k-nonwork-hour,
.k-scheduler-dayview .k-today.k-nonwork-hour,
.k-scheduler-timelineview .k-today.k-nonwork-hour
{
    background-color: @scheduler-nonwork-background-color;
}

.k-scheduler-table .k-today,
.k-today > .k-scheduler-datecolumn,
.k-today > .k-scheduler-groupcolumn
{
    background-color: @column-highlight-background-color;
}

.k-scheduler-header .k-today {
    background: transparent;
}

table:not(.k-scheduler-dayview) .k-scheduler-header-wrap .k-today {
    color: @selected-background;
}

// Gantt
.k-gantt .k-treelist,
.k-gantt .k-treelist .k-alt,
.k-gantt .k-header.k-nonwork-hour,
.k-gantt .k-treelist .k-alt,
.k-gantt .k-header.k-nonwork-hour {
    background-color: @secondary-widget-background-color;
}

.k-gantt .k-treelist .k-state-selected,
.k-gantt .k-treelist .k-state-selected td,
.k-gantt .k-treelist .k-alt.k-state-selected,
.k-gantt .k-treelist .k-alt.k-state-selected > td {
    background-color: lighten(@info, 22%);
}

.k-gantt-toolbar {
    border-color: @secondary-widget-background-color;
}

.k-gantt-toolbar .k-button {
    background-color: @accent;
    border-color: @accent;
}

.k-gantt>.k-header li,
.k-gantt>.k-header .k-link,
.k-gantt-toolbar .k-button {
    color: @inversed-text-color;
}

.k-gantt .k-gantt-toolbar .k-gantt-views li.k-state-hover,
.k-gantt .k-gantt-toolbar .k-gantt-views li.k-state-hover .k-link,
.k-gantt .k-gantt-toolbar .k-button:hover {
    background-color: @accent-hover-background;
    border-color: @accent-hover-background;
}

.k-gantt-toolbar>.k-gantt-views>li.k-state-selected,
.k-gantt .k-gantt-toolbar .k-gantt-views li.k-state-selected.k-state-hover {
    border-bottom-color: @widget-background-color;
}

.k-gantt-toolbar li:first-child,
.k-gantt-toolbar li:first-child>.k-link,
.k-gantt-toolbar li:last-child,
.k-gantt-toolbar li:last-child>.k-link {
    border-radius: 0;
}

.k-gantt .k-task-draghandle {
    border-color: darken(@info, 21%);
}

.k-task-dot:after {
    background-color: lighten(@hover-text-color, 8%);
    border-color: lighten(@hover-text-color, 8%);
}

.k-task-dot:hover:after {
    background-color: @normal-text-color;
    border-color: @normal-text-color;
}

.k-task-summary {
    background: darken(@normal-background, 12%);
}

.k-task-milestone {
    background-color: darken(@success, 25%);
}

.k-task-summary-complete {
    background: @normal-text-color;
}

.k-state-selected.k-task-summary {
    background: lighten(@info, 4%);;
}

.k-state-selected.k-task-milestone,
.k-state-selected .k-task-summary-complete {
    background-color: lighten(@info, 22%);
    border-color: lighten(@info, 22%);
}

.k-task-single {
    color: @inversed-text-color;
    background-color: lighten(@info, 4%);
    border-color: lighten(@info, 4%);
}

.k-state-selected.k-task-single {
    border-color: @accent;
}

.k-line {
    background-color: @normal-text-color;
    color: @normal-text-color;
}

.k-state-selected.k-line {
    background-color: @accent;
    color: @accent;
}

.k-resource {
    background-color: @widget-background-color;
}

// Editor
.k-editor.k-header,
.editorToolbarWindow.k-header,
.k-filebrowser .k-header {
    color: @widget-text-color;
    background-color: @widget-background-color;
    border-color: @widget-border-color;
}

.k-editor .k-tool.k-state-selected,
.k-window .k-editor-toolbar .k-tool.k-state-selected {
    background-color: lighten(@hover-text-color, 8%);
    border-color: lighten(@hover-text-color, 8%);
}

.k-window .k-editor-toolbar .k-state-hover {
    background-color: @hover-background;
}

// Toolbar
.k-toolbar {
    .k-button,
    .k-button-group {
        color: @normal-text-color;
        border-color: @widget-border-color;
    }

    // Active state
    .k-button:active,
    .k-button.k-state-active {
        color: @inversed-text-color;
    }

    .k-button-group .k-button {
        border-color: transparent;
    }

    .k-button-group .k-button:active,
    .k-button-group .k-button.k-state-active,
    .k-overflow-anchor.k-state-active,
    .k-toggle-button.k-state-active {
        background-color: lighten(@hover-text-color, 8%);
    }

    .k-overflow-anchor.k-state-active {
        border-color: lighten(@hover-text-color, 8%);
    }

    .k-overflow-anchor.k-state-border-down,
    .k-overflow-anchor.k-state-border-up {
        background-color: @selected-background;
        border-color: @selected-background;
    }

    // Disabled state
    .k-button.k-state-disabled,
    .k-button.k-state-disabled:hover,
    .k-button.k-state-disabled:active,
    .k-state-disabled.k-split-button > .k-button {
        color: @disabled-text-color;
        border-color: @disabled-border-color;
        background-color: @widget-background-color;
    }
    .k-button-group .k-button.k-state-disabled {
        border-color: transparent;
    }

    // Focused state
    .k-button:focus,
    .k-button.k-state-disabled:focus,
    .k-split-button:focus > .k-button {
        border-color: @button-focused-border-color;
        .box-shadow(@button-focused-shadow);
    }
}

.k-overflow-container .k-button,
.k-split-container .k-button {
    color: @link-text-color;
}

.k-overflow-container  {
    .k-button {
        border-radius: 0;
    }

    .k-overflow-group,
    .k-separator {
        border-color: @secondary-border-color;
    }
}

    // Active state
    .k-overflow-container .k-overflow-button.k-state-active,
    .k-split-container .k-button.k-state-active {
        color: @selected-text-color;
    }

    // Disabled state
    .k-overflow-container .k-state-disabled .k-button,
    .k-overflow-container .k-state-disabled.k-button,
    .k-split-container .k-state-disabled .k-button {
        color: @disabled-text-color;

        &:focus {
            border-color: @button-focused-border-color;
        }
    }

// Upload
.k-file,
.k-upload {
    background-color: @widget-background-color;
    border-color: @widget-border-color;
}

.k-dropzone .k-upload-status {
    color: lighten(@hover-text-color, 8%);
}
.k-file .k-upload-status {
    color: @normal-text-color;
}

.k-file-progress {
    color: @normal-text-color;
}

.k-file-progress .k-progress {
    background-color: darken(@info, 25%);
}

.k-file-success .k-file-name,
.k-file-success .k-upload-pct {
    color: darken(@success, 25%);
}

.k-file-success .k-progress {
    background-color: darken(@success, 25%);
}

.k-file-error {
    color: darken(@error, 25%);

    .k-file-extension-wrapper,
    .k-multiple-files-extension-wrapper {
        color: darken(@error, 25%);
        border-color: darken(@error, 25%);
    }

    .k-file-extension-wrapper:before,
    .k-multiple-files-extension-wrapper:before {
        background-color: @widget-background-color;
        border-color: transparent transparent darken(@error, 25%) darken(@error, 25%);
    }
}

.k-file-error .k-progress {
    background-color: @accent;
}

.k-file-extension-wrapper,
.k-multiple-files-extension-wrapper {
    color: @disabled-text-color;
    border-color: @disabled-text-color;
}

.k-file-invalid .k-file-name-invalid {
    color: darken(@error, 25%);
}

.k-file-invalid-extension-wrapper,
.k-multiple-files-invalid-extension-wrapper {
    color: darken(@error, 25%);
    border-color: darken(@error, 25%);
}

.k-file-extension-wrapper:before,
.k-multiple-files-extension-wrapper:before {
    background-color: @widget-background-color;
    border-color: transparent transparent @disabled-text-color @disabled-text-color;
}

.k-file-invalid-extension-wrapper:before,
.k-multiple-files-invalid-extension-wrapper:before {
    background-color: @widget-background-color;
    border-color: transparent transparent darken(@error, 25%) darken(@error, 25%);
}

.k-multiple-files-extension-wrapper:after {
    border-top-color: @disabled-text-color;
    border-left-color: @disabled-text-color;
}

.k-multiple-files-invalid-extension-wrapper:after {
    border-top-color: darken(@error, 25%);
    border-left-color: darken(@error, 25%);
}

.k-file-size,
.k-file-information,
.k-file-validation-message {
    color: @disabled-text-color;
}

.k-upload .k-upload-selected {
    color: @accent;
    border-color: @widget-border-color;

    &:hover {
        color: @selected-text-color;
        background-color: @accent;
    }
}

// Slider
.k-slider-track {
    background-color: darken(@widget-background-color, 12%) ;
}

.k-slider-selection {
    background-color: @selected-background;
}

.k-slider-horizontal .k-tick {
    background-image:url('@{image-folder}/slider-h.gif');
}

.k-slider-vertical .k-tick {
    background-image:url('@{image-folder}/slider-v.gif');
}

.k-draghandle {
    background-color: @widget-background-color;
    border-color: @widget-border-color;
    .box-shadow(@popups-shadow);
    border-radius: 50%;
}

.k-draghandle:hover {
    background-color: @hover-background;
}

// ColorPicker
.k-flatcolorpicker .k-hue-slider .k-draghandle {
    background-color: @widget-background-color;
    border-color: @widget-background-color;
    .box-shadow(@popups-shadow);
    border-radius: 50%;
}

.k-flatcolorpicker .k-hue-slider .k-draghandle:hover,
.k-flatcolorpicker .k-transparency-slider .k-draghandle:hover,
.k-flatcolorpicker .k-hue-slider .k-draghandle:focus,
.k-flatcolorpicker .k-transparency-slider .k-draghandle:focus {
    background-color: @hover-background;
    border-color: @hover-background;
    .box-shadow(@popups-shadow);
}

@import "themes/checkbox.less";

@checkbox-border-color: darken(@widget-background-color, 12%);
@checkbox-border-radius: @inputs-border-radius;
@checkbox-background-color: @widget-background-color;
@checkbox-hover-border-color: @checkbox-border-color;
@checkbox-hover-box-shadow: none;
@checkbox-checked-border-color: darken(@widget-background-color, 12%);
@checkbox-checked-background-color: @widget-background-color;
@checkbox-active-border-color: @accent;
@checkbox-active-box-shadow: none;
@checkbox-indeterminate-border-radius: 0;

@import "themes/radiobutton.less";

@radio-hover-border-color: darken(@base, 12%);
@radio-active-border-color: @accent;
@radio-active-box-shadow: none;

.k-radio:checked + .k-radio-label:hover:before,
.k-radio:checked + .k-radio-label:active:before {
    border-color: @accent;
}

.k-radio:disabled:checked + .k-radio-label:hover:before {
    border-color: @radio-border-color;
}

// Drag & Drop
.k-drag-clue {
    color: @inversed-text-color;
    .box-shadow(@widget-shadow);
}

// Responsive styles
@media only screen and (max-width: 1450px) {
    .k-webkit,
    .k-ff,
    .k-ie11,
    .k-edge,
    .k-safari {
        // Responsive Scheduler
        .k-scheduler-toolbar .k-nav-current {
            margin: 0;
        }
    }
}

@media only screen and (max-width: 1400px) {
    .k-webkit,
    .k-ff,
    .k-ie11,
    .k-edge,
    .k-safari {
        // Responsive Scheduler
        .k-nav-current > .k-link .k-lg-date-format {
            max-width: 100px;
            display: inline-block;
            white-space: nowrap;
            text-overflow: ellipsis;
            overflow: hidden;
            vertical-align: top;
        }

        .k-nav-current > .k-link .k-sm-date-format {
            display: none;
        }

        .k-scheduler-toolbar .k-link {
            padding: 0 .5em;
        }
    }
}

@media only screen and (max-width: 1024px) {
    .k-webkit,
    .k-ff,
    .k-ie,
    .k-edge,
    .k-safari {
        .k-scheduler-toolbar > ul.k-scheduler-views {
            top: 0;
        }

        .k-gantt-toolbar > ul.k-gantt-views > li.k-current-view,
        .k-gantt-toolbar > ul.k-gantt-views > li.k-current-view:hover,
        .k-scheduler-toolbar > ul.k-scheduler-views > li.k-current-view,
        .k-scheduler-toolbar > ul.k-scheduler-views > li.k-current-view:hover {
            background-position: 50% 50%;
            color: @selected-text-color;
            background-color: @selected-background;
            border-color: @selected-background;
            text-align: right;
        }

        .k-gantt-toolbar > ul.k-gantt-views.k-state-expanded > li,
        .k-scheduler-toolbar > ul.k-scheduler-views.k-state-expanded > li {
            border-radius: 0;
        }

        .k-gantt-toolbar > ul.k-gantt-views.k-state-expanded > .k-state-hover,
        .k-scheduler-toolbar > ul.k-scheduler-views.k-state-expanded > .k-state-hover {
            background-color: @hover-background;
        }

        .k-gantt-toolbar > ul.k-gantt-views.k-state-expanded >.k-state-selected,
        .k-scheduler-toolbar > ul.k-scheduler-views.k-state-expanded >.k-state-selected {
            color: @selected-text-color;
            background-color: @selected-background;
        }

        .k-gantt-toolbar > ul.k-gantt-views.k-state-expanded >.k-state-hover .k-link,
        .k-scheduler-toolbar > ul.k-scheduler-views.k-state-expanded >.k-state-hover .k-link {
            background-color: transparent;
        }

        .k-gantt-toolbar > ul.k-gantt-views.k-state-expanded > li.k-current-view .k-link,
        .k-scheduler-toolbar > ul.k-scheduler-views.k-state-expanded > li.k-current-view .k-link {
            color: @inversed-text-color;
        }

        .k-scheduler-toolbar > ul li:first-child, .k-scheduler-toolbar > ul li:first-child .k-link,
        .k-scheduler-toolbar > ul.k-scheduler-views li,
        .k-scheduler-toolbar > ul.k-scheduler-views li .k-link {
            border-radius: 0;
        }

        .k-scheduler-toolbar > ul.k-scheduler-views > li.k-current-view > .k-link,
        .k-scheduler-toolbar > ul.k-scheduler-views > li.k-current-view:hover > .k-link {
            min-width: 20px;
        }

        .k-gantt-toolbar > ul.k-gantt-views.k-state-expanded .k-link,
        .k-scheduler-toolbar > ul.k-scheduler-views.k-state-expanded .k-link {
            color: @link-text-color;
        }

        .k-gantt-toolbar > ul.k-gantt-views.k-state-expanded .k-state-selected .k-link,
        .k-scheduler-toolbar > ul.k-scheduler-views.k-state-expanded .k-state-selected .k-link {
            color: @selected-text-color;
        }

        .k-scheduler-views > li.k-state-selected > .k-link:after {
            display: block;
            content: "";
            position: absolute;
            top: 50%;
            margin-top: -0.5em;
            right: 0.333em;
            width: 1.333em;
            height: 1.333em;
            opacity: 0.45;
        }

        .k-scheduler-toolbar > ul.k-scheduler-views > li.k-current-view .k-link:after {
            background-position: -14px -30px;
        }

        .k-scheduler-toolbar > ul.k-scheduler-views.k-state-expanded {
            border-width: 1px 1px 0 1px;
            border-style: solid;
        }

        .k-scheduler-toolbar > ul.k-scheduler-views.k-state-expanded {
            border-width: 1px;
            background-image: none;
        }

        .k-gantt-toolbar > ul.k-gantt-views {
            top: 0;
        }

    }
}

// Stock Chart
.k-chart .k-mask {
    background-color: @widget-background-color;
    filter: alpha(opacity=68);
    -moz-opacity: 0.68;
    opacity: 0.68;
}

.k-chart .k-selection {
    border-color: @widget-border-color;
}

.k-chart .k-handle {
    width: 15px;
    height: 15px;
    border-width: 1px;
    border-style: solid;
    -moz-border-radius: 10px;
    -webkit-border-radius: 10px;
    border-radius: 10px;
}

.k-chart .k-left-handle {
    left: -8px;
}

.k-chart .k-right-handle {
    right: -8px;
}

.k-chart .k-handle:hover {
    background-color: @hover-background;
}

.k-chart .k-navigator-hint .k-tooltip {
    border: @widget-border-color;
   .box-shadow(@popups-shadow);
    background: @widget-background-color;
    color: @normal-text-color;
}

.k-chart .k-navigator-hint .k-scroll {
    background: @base;
    height: 4px;
}

.k-chart-tooltip {
    background-image: none;
}

// Map
.k-map .k-header {
    background-color: @widget-background-color;
    border-color: @widget-border-color;
}

.k-map .k-marker {
    font-size: 28px;
    color: @accent;
}

.k-map .k-attribution {
    color: #666666;
}

@import "themes/spreadsheet.less";

@spreadsheet-selection-border: #26c6da;
@spreadsheet-selection-background: fadeout(@spreadsheet-selection-border, 80%);

@active-header-text: contrast(@accent);
@inactive-header-text: contrast(@accent);

.k-spreadsheet {
    .k-spreadsheet-quick-access-toolbar,
    .k-spreadsheet-sheets-bar {
        .k-button {
            box-shadow: none;
            color: @active-header-text;
            border-radius: 0;
            line-height: 2.6em;
            height: calc(3.1em + 2px); // IE centering icon fix
            width: 3em;

            &:hover {
                .composite-background(@tabs-hover-gradient);
                border-color: saturate(@normal-text-color, 7%);
            }
        }
    }

    .k-spreadsheet-sheets-bar .k-button {
        padding-top: .5em;
        padding-bottom: .5em;
        line-height: 2.2em;
    }

    .k-spreadsheet-sheets-bar-add {
        left: 0;
        bottom: 0;
    }

    .k-spreadsheet-sheets-remove {
        margin: 0 0 0 -1em;
    }
}

.k-spreadsheet-sheets-items {
    color: @inactive-header-text;
    .composite-background(@tabs-normal-gradient);
}

.k-spreadsheet-sheets-items,
.k-spreadsheet-tabstrip {

    .k-item.k-state-hover,
    .k-item.k-state-active,
    .k-item.k-state-focused {
        background-color: transparent;

        .k-link {
            color: @active-header-text;
        }
    }

    .k-state-active .k-link {
        color: @active-header-text;
    }
}

.k-spreadsheet-toolbar {

    > .k-button {
        border-color: transparent;
    }
}

@spreadsheet-page-orientation-border-color: lighten(@hover-text-color, 8%);

.k-window .k-popup-edit-form .k-edit-field {
    label.k-checkbox-label {
        margin-top: 0.8em;
    }
}

// Dialog

.k-dialog {

    .k-dialog-title {
        font-size: 1.2em;
    }

    &.k-alert .k-window-titlebar,
    &.k-confirm .k-window-titlebar,
    &.k-prompt .k-window-titlebar {
        .k-dialog-title {
            color: @normal-text-color;
        }
        border-bottom: none;
    }
    .k-content {
        border-bottom-right-radius: @border-radius;
        border-bottom-left-radius: @border-radius;
    }
    &.k-dialog-titleless .k-content {
        border-top-right-radius: @border-radius;
        border-top-left-radius: @border-radius;
    }
    .k-dialog-buttongroup {
        &.k-dialog-button-layout-stretched {
            .k-button {
                padding: @dialog-button-stretched-padding-y @dialog-button-stretched-padding-x;
            }
        }
        &.k-dialog-button-layout-normal {
            border-top: solid 1px @widget-border-color;

            .k-button {
                border-radius: @border-radius;
            }
        }
    }
    &.k-window-sm {
        .k-dialog-buttongroup {
            &.k-dialog-button-layout-stretched {
                flex-direction: column;

                .k-button {
                    flex: 0 0 auto;
                    padding: (@dialog-button-stretched-padding-y / 2) (@dialog-button-stretched-padding-x / 2);
                }
            }
        }
    }
    &.k-window-md {
        .k-dialog-buttongroup {
            &.k-dialog-button-layout-stretched {

                .k-button {
                    padding: (@dialog-button-stretched-padding-y * .7) (@dialog-button-stretched-padding-x * .7);
                }
            }
        }
    }
}

.k-rtl {
    .k-grid-header .k-header:first-child,
    .k-filter-row th:first-child,
    .k-grid tbody td:first-child,
    .k-grid tfoot td:first-child {
        border-left-width: 0;
    }
}

.k-rtl .k-dialog {
    .k-window-titlebar {
        .k-dialog-title {
            padding-right: 1em;
            padding-left: 2em;
        }
    }
    a.k-dialog-action.k-dialog-close {
        left: 0;
    }
    .k-dialog-buttongroup {
        &.k-dialog-button-layout-stretched {
            .k-button:first-child {
                border-bottom-right-radius: @border-radius;
            }
            .k-button:last-child {
                border-bottom-left-radius: @border-radius;
            }
        }
        &.k-dialog-button-layout-normal {
            text-align: left;
            .k-button {
                margin-left: 0;
                margin-right: 0.5em;
                &:first-child {
                    margin-right: 0;
                }
            }
        }
    }
}

.k-numeric-wrap .k-i-warning {
    color: @input-validation-error;
    position: absolute;
    top: 0;
    right: 2.2em;
    width: 2.2em;
}

.k-numeric-wrap.k-state-invalid {
    border-color: @input-validation-error;

    input {
        color: @input-validation-error;
    }
}

.k-rtl .k-numeric-wrap.k-state-invalid .k-i-warning {
    right: auto;
    left: 2.2em;
}

.k-maskedtextbox.k-state-invalid {
    .k-textbox {
        border-color: @input-validation-error;
        color: @input-validation-error;
    }

    .k-i-warning {
        color: @input-validation-error;
    }
}

.k-dateinput.k-state-invalid {
    .k-textbox {
        color: @input-validation-error;
        border-color: @input-validation-error;
    }

    .k-i-warning {
        margin-left: 0;
        margin-right: 0.8em;
        color: @input-validation-error;
    }
}

.k-rtl .k-dateinput .k-i-warning {
    margin-right: 0;
    margin-left: 0.8em;
}

.k-datepicker .k-picker-wrap,
.k-timepicker .k-picker-wrap {
    &.k-state-invalid {
        border-color: @input-validation-error;

        .k-input {
            color: @input-validation-error;
        }
    }

    .k-i-warning {
        color: @input-validation-error;
        margin-left:0;
        margin-right: 2.8em;
    }

    .k-rtl & {
        .k-i-warning {
            margin-right: 0;
            margin-left: 2.8em;
        }
    }
}

.k-datetimepicker .k-picker-wrap {
    &.k-state-invalid {
        border-color: @input-validation-error;

        .k-input {
            color: @input-validation-error;
        }
    }

    .k-i-warning {
        color: @input-validation-error;
        margin-left:0;
        margin-right: 5.3em;
    }

    .k-rtl & {
        .k-icon.k-i-warning {
            margin-right: 0;
            margin-left: 5.3em;
        }
    }
}

.k-listbox {
    .k-list-scroller {
        border-color: @widget-border-color;
        background-color: @background;
    }

    .k-item {
        padding: 1px 11px;
        color: @normal-text-color;

        &:hover:not(.k-state-disabled) {
            background-color: @hover-background;
        }

        &.k-state-selected {
            color: @selected-text-color;
            background-color: @selected-background;
            border-color: transparent;

            &:hover {
                background-color: multiply(@accent, #cccccc);
            }
        }

        &.k-state-disabled {
            color: @disabled-text-color;
        }

        &.k-state-focused {
            border-color: darken(@widget-border-color, 27%);
            box-shadow: none;
        }
    }

    .k-button.k-state-disabled:active .k-icon {
        opacity: .2;
    }

    .k-button.k-state-disabled:active .k-icon {
        opacity: .2;
    }

    .k-drop-hint {
        height: 0;
        border-top: 1px solid @accent;
    }
}

.k-item.k-state-selected.k-drag-clue {
    color: @selected-text-color;
    background-color: @selected-background;
}

.k-grid-header {
    .k-i-sort-asc-sm,
    .k-i-sort-desc-sm,
    .k-i-sort-asc-sm:hover,
    .k-i-sort-desc-sm:hover,
    .k-sort-order {
        color: @accent;
        opacity: 1;
        margin-bottom: -1px;
    }
}

.k-menu-scroll-button {
    border-width: 0;
    box-shadow: none;
    border-color: @widget-border-color;
    background-color: @base;
}

.k-menu-scroll-wrapper.horizontal {
    .k-scroll-left { border-right-width: 1px; }
    .k-scroll-right { border-left-width: 1px; }
}
.k-menu-scroll-wrapper.vertical {
    .k-scroll-up { border-bottom-width: 1px; }
    .k-scroll-down { border-top-width: 1px; }
}


// Scheduler other month
.k-scheduler .k-other-month .k-nav-day {
    opacity: .6;
}


// Dropdowngrid
.k-dropdowngrid-popup {
    border-color: @grid-border;
    color: @grid-text;
    background-color: @grid-bg;
}
.k-dropdowngrid-popup .k-header {
    .linear-gradient(~"@{grid-header-gradient}");
    border-color: @grid-header-border;
    color: @grid-header-text;
    background-color: @grid-header-bg;
}
.k-dropdowngrid-popup .k-group-header {
    border-color: @grid-header-border;
    color: @grid-header-text;
    background-color: @grid-header-bg;
}
.k-dropdowngrid-popup .k-cell {
    border-color: @grid-border;
}
.k-dropdowngrid-popup .k-item:nth-child(2n) {
    background-color: @grid-alt-bg;
}
.k-dropdowngrid-popup .k-footer {
    border-color: @grid-header-border;
    color: @grid-header-text;
    background-color: @grid-header-bg;
}
.k-dropdowngrid-popup .k-item.k-state-hover {
    .linear-gradient(~"@{grid-hover-gradient}");
    border-color: @grid-hover-border;
    color: @grid-hover-text;
    background-color: @grid-hover-bg;
}
.k-dropdowngrid-popup .k-item.k-state-selected {
    .linear-gradient(~"@{grid-selected-gradient}");
    border-color: @grid-selected-border;
    color: @grid-selected-text;
    background-color: @grid-selected-bg;
}
.k-dropdowngrid-popup .k-group-cell span {
    background-color: @grid-text;
    color: @grid-bg;
}
.k-grid-list > .k-item.k-last > .k-cell,
.k-grid-list > .k-item.k-last > .k-group-cell,
.k-grid-list > .k-item.k-last > .k-spacer-cell {
    border-bottom-color: @grid-text;
}


.k-calendar {

    .k-header,
    .k-footer {
        text-transform: uppercase;
    }

    .k-nav-fast {
        width: 60%;
    }

    table .k-link {
        color: @link-text;
    }
    .k-other-month .k-link {
        color:inherit;
    }

    td.k-state-focused {
        box-shadow: none;
    }
}
