/*!
 * 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.
 */
@input-height: 1.93571428em;
@input-default-width: 12.4em;
@input-border-width: 1px;
@input-padding-x: 0;
@input-padding-y: 0.17857143em;
@input-indent: .8em;
@input-offset: (@input-height + .35em);

@combobox-padding-x: 1.9em;

@input-clear-icon-offset: ~"( (@{input-offset} - @{grid-size})/2 )";
@combobox-clear-icon-offset: ~"( @{input-offset} + ((@{combobox-padding-x} - @{grid-size})/2) )";
@multiselect-clear-icon-top-offset: ~"( (@{input-height} - @{grid-size}) / 2 + @{input-padding-y} + 1px )";

@editor-icon-size: 32px;
@menu-link-padding: 1.2em 1.2em 1.1em;
@button-padding-x: 12px;
@button-padding-y: 6px;
@button-padding: @button-padding-y @button-padding-x;
@button-line-height: (20 / 14);
@disabled-button-opacity: 0.6;

@treeview-inner-padding: 0.4167em 0.6667em 0.3333em 0.5833em;
@treeview-inner-margin: 1px 0 1px 0.3333em;
@scheduler-link-padding: .16666em 1.1em;
@grid-header-padding: .75em .2em .8333em 1em;
@grid-th-padding: .5em .6em .4em .6em;
@icon-positioning: "default";

@window-border-width: 1px;
@window-border-style: solid;

@window-sizes: {
    sm: 300px;
    md: 800px;
    lg: 1200px;
};

@window-titlebar-padding-x: 12px;
@window-titlebar-padding-y: 6px;
@window-titlebar-border-width: 0 0 1px;
@window-titlebar-border-style: solid;

@window-title-font-size: 1.2em;
@window-title-line-height: 1.25;

@window-inner-padding-x: @window-titlebar-padding-x;
@window-inner-padding-y: @window-inner-padding-x;

@grid-padding-x: 8px;
@grid-padding-y: 6px;

@grid-header-padding-x: @grid-padding-x;
@grid-header-padding-y: @grid-padding-y;

@grid-footer-padding-x: @grid-header-padding-x;
@grid-footer-padding-y: @grid-header-padding-y;

@grid-cell-padding-x: @grid-padding-x;
@grid-cell-padding-y: @grid-padding-y;


// Calendar
@calendar-padding-x: 0;
@calendar-padding-y: 0;
@calendar-border-width: 1px;
@calendar-border-radius: 4px;
@calendar-font-size: 14px;
@calendar-line-height: (20 / 14);

@calendar-header-padding-x: 2px;
@calendar-header-padding-y: 2px;
@calendar-header-border-width: 0;
@calendar-header-button-padding-x: 4px;
@calendar-header-button-padding-y: 4px;
@calendar-header-button-border-width: 0;
@calendar-header-button-border-radius: @calendar-border-radius;

@calendar-content-padding-x: 0;
@calendar-content-padding-y: 0;

@calendar-cell-padding-x: .5em;
@calendar-cell-padding-y: .5em;
@calendar-cell-border-radius: @calendar-border-radius;
@calendar-cell-line-height: (20 / 14);
@calendar-cell-size: ( (34px / 14px ) * 1em );

@calendar-header-cell-padding-x: 2px;
@calendar-header-cell-padding-y: (@calendar-cell-padding-y / 2);
@calendar-header-cell-border-width: 1px;
@calendar-header-cell-font-size: 12px;
@calendar-header-cell-line-height: (20 / 14);
@calendar-header-cell-size: @calendar-cell-size;

@calendar-meta-cell-size: ( (60px / @calendar-font-size) * 1em );

// Multiviewcalendar
@multiviewcalendar-font-size: @calendar-font-size;
@multiviewcalendar-line-height: @calendar-line-height;

@multiviewcalendar-header-padding-x: 16px;
@multiviewcalendar-header-padding-y: 8px;

@multiviewcalendar-content-padding-x: 16px;
@multiviewcalendar-content-padding-y: 8px;

@multiviewcalendar-cell-padding-x: @calendar-cell-padding-x;
@multiviewcalendar-cell-padding-y: @calendar-cell-padding-y;
@multiviewcalendar-cell-border-radius: @calendar-border-radius;
@multiviewcalendar-cell-line-height: @calendar-cell-line-height;
@multiviewcalendar-cell-size: @calendar-cell-size;

@multiviewcalendar-centuryview-cell-padding-x: @multiviewcalendar-cell-padding-x;
@multiviewcalendar-centuryview-cell-padding-y: @multiviewcalendar-cell-padding-y;

@multiviewcalendar-header-cell-font-size: 12px;

// ScrollView
@scrollview-pagebutton-size: 8px;
@scrollview-navigation-size: 4.5em;

@scrollview-pager-offset: 20px;
@scrollview-pager-item-spacing: 20px;
@scrollview-pager-item-border-width: 1px;
@scrollview-pager-height: calc(@scrollview-pagebutton-size + (2 * @scrollview-pager-item-border-width) + (@scrollview-pager-item-spacing / 2 ));

// Switch
@switch-size: (6.6em / 1.4);
@switch-border-radius: @switch-size;
@switch-font-size: 14px;

@switch-track-size: null;
@switch-container-border-width: 0;
@switch-container-padding-x: 0;
@switch-container-padding-y: @switch-container-padding-x;

@switch-handle-size: (.5 * @switch-size);
@switch-handle-border-radius: @switch-size;
@switch-handle-border-width: 1px;

@switch-label-display: inline;
@switch-label-outer-spacing: 10px;
@switch-label-inner-spacing: 2px;
@switch-label-spacing: calc(@switch-label-outer-spacing + @switch-label-inner-spacing);

@switch-label-position: calc(@switch-label-outer-spacing - @switch-container-border-width);
@switch-label-width: calc(100% - @switch-handle-size - @switch-label-spacing - @switch-container-padding-x);
@switch-on-left-x: calc(100% - @switch-handle-size);

// Pager
@pager-button-border-radius-sm: 4px;
@pager-button-border-radius-lg: @pager-button-border-radius-sm;
@pager-button-width: 2em;
@pager-button-height: 2.3em;
@pager-button-margin: 0;

// Pdf Viewer
@pdf-viewer-page-spacing: 30px;

@pdf-viewer-action-buttons-top-offset: 10px;
@pdf-viewer-action-buttons-padding: 10px;


// Drawer
@drawer-border-width: 1px;
@drawer-content-padding-x: 8px;
@drawer-content-padding-y: 8px;

@drawer-scrollbar-width: 7px;
@drawer-scrollbar-radius: 20px;

@drawer-item-padding-x: 8px;
@drawer-item-padding-y: 8px;
@drawer-item-font-size: 16px;
@drawer-item-line-height: 1.5;

@drawer-icon-size: 18px;
@drawer-mini-initial-width: calc(4 * @drawer-item-padding-x + @drawer-icon-size);


// Spreadsheet
@spreadsheet-insert-image-dialog-margin: 0 1em;
@spreadsheet-insert-image-dialog-border-style: dashed;
@spreadsheet-insert-image-dialog-border-width: 2px;

@spreadsheet-insert-image-dialog-preview-width: 355px;
@spreadsheet-insert-image-dialog-preview-height: 200px;
@spreadsheet-insert-image-dialog-preview-padding: 10px;
@spreadsheet-insert-image-dialog-text-padding: 10px;

@spreadsheet-drawing-outline-style: solid;
@spreadsheet-drawing-outline-width: 2px;

@spreadsheet-drawing-handle-width: 6px;
@spreadsheet-drawing-handle-height: 6px;
@spreadsheet-drawing-handle-border-style: solid;
@spreadsheet-drawing-handle-border-width: 1px;


// Notification
@notification-border-width: 1px;

@notification-padding-x: 0.5em;
@notification-padding-y: 0.6em;
@notification-padding-end: 20px;

@notification-icon-spacing: 4px;


@import "common/all.less";

.k-widget.k-tabstrip
{
    background-color: transparent;
    background-image: none;
    border-style: none;
    .box-shadow(none);
}

.k-tabstrip .k-tabstrip-items
{
    padding: 0;
}

.k-tabstrip-items .k-link {
    padding: 8px .92em;
}

.k-tabstrip > .k-button {
    top: 0;

    &.k-bare {
        top: 0;
    }
}

.k-tabstrip-bottom > .k-button.k-bare
{
    top: auto;
}

.k-tabstrip > .k-content,
.k-panelbar .k-tabstrip > .k-content
{
    margin: 0;
}

.k-slider-track
{
    border-width: 1px;
    border-style: solid;
}

.k-grouping-dropclue
{
    margin-top: 10px;
}

.k-grid tr td
{
    border-width: 0 0 1px 1px;
    border-style: solid;
}

.k-slider-horizontal .k-slider-track,
.k-slider-horizontal .k-slider-selection
{
    margin-top: -5px;
}

.k-slider-vertical .k-slider-track,
.k-slider-vertical .k-slider-selection
{
    margin-left: -5px;
}

input.k-textbox {
  height: 2.43em;
}

.k-textbox > input,
.k-autocomplete .k-input,
.k-picker-wrap .k-input,
.k-numeric-wrap .k-input,
.k-dropdown-wrap .k-input,
.k-selectbox .k-input {
      padding: 0.167em 0;
}

.k-combobox-clearable {
    .k-input {
        padding-right: @combobox-padding-x;
    }
}

.k-colorpicker {
    @picker-icon-height: 2.28571428em;
    .k-selected-color {
        width: @picker-icon-height;
        height: @picker-icon-height;

        .k-i-line {
            font-size: @picker-icon-height;
        }
    }
}

.k-combobox > .k-dropdown-wrap > .k-i-close {
    right: calc(@combobox-clear-icon-offset);
}

.k-numerictextbox .k-link {
    height: 1.167em;
}

.k-toolbar {
    padding: 0.57142857em calc(0.57142857em - 0.2em);
    border-radius: 4px;
}

.k-toolbar .k-overflow-anchor {
    width: calc((52/14)*1em);
}

.k-webkit .k-rtl .k-widget .k-dropdown-wrap .k-input,
.k-webkit .k-rtl .k-widget .k-numeric-wrap .k-input {
    margin-right: 0;
}

.k-rtl .k-widget.k-autocomplete > .k-i-close,
.k-rtl .k-widget.k-multiselect > .k-multiselect-wrap > .k-i-close {
    right: initial;
    margin-right: 0;
}

.k-rtl .k-widget.k-combobox > .k-dropdown-wrap > .k-i-close {
    left: calc(@combobox-clear-icon-offset);
    right: initial;
}

.k-pager-numbers-wrap {
    margin-left: -1px;

    .k-rtl &,
    &[dir="rtl"],
    [dir="rtl"] & {
        margin-left: 0;
    }
}

.k-pager-wrap,
.k-pager-numbers .k-link {
    line-height: 2.3em;
}

.k-pager-wrap > .k-link {
    height: 2.3em;
    line-height: 2.3em;
}

.k-pager-numbers {
    .k-link,
    .k-state-selected {
        height: 2.3em;
    }
}

.k-pager-wrap > .k-link,
.k-pager-numbers .k-link,
.k-pager-numbers .k-state-selected {
    min-width: 2.3em;
}

.k-pager-sizes .k-dropdown-wrap .k-input {
    line-height: 2em;
}

.k-checkbox-label:before,
.k-checkbox-label:after,
.k-radio-label:before,
.k-radio-label:after {
    box-sizing: content-box;
}

.k-spreadsheet-sheets-bar .k-spreadsheet-sheets-remove {
    margin: 0 0 0 -.5em;
    padding: .65em .92em .65em .32em;
}

.k-button.k-spreadsheet-sheets-bar-add {
    padding-top: 2px;
    padding-bottom: 2px;
    top: 2px;
    bottom: 4px;
}

.k-spreadsheet .k-spreadsheet-sheets-bar .k-tabstrip-items {
    padding-bottom: 4px;
}

.k-gantt .k-grid-content tr,
.k-gantt-rows tr,
.k-gantt-tasks tr {
    height: 2.4em;
}

.k-editor-dialog.k-editor-table-wizard-dialog .k-tabstrip-wrapper .k-content {
    min-height: 510px;
    height: 38em;
}

.k-edit-label,
.k-edit-form-container .editor-label {
    padding: 0.65em 0 1em;
}

.k-editor-dialog.k-editor-table-wizard-dialog .k-dropdown.k-align {
    min-width: 56px;
}

.k-grid {
    .k-edit-cell {
        input[type='checkbox'],
        input.k-checkbox {
            margin-left: calc(.3em + 3px);

            + label.k-checkbox-label {
                margin-left: .3em;
            }
        }
    }
}

.k-filtercell > span {
    padding-right: 5.2em;
}

.k-filtercell > .k-operator-hidden {
    padding-right: 2.7em;
}

.k-filter-row .k-dropdown-operator {
    right: 3.0em;
}

// RTL
.k-rtl {

    .k-combobox-clearable {
        .k-input {
            padding-left: @combobox-padding-x;
            padding-right: 0.167em;
        }
    }
}
