/*!
 * Copyright 2023 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.
 */
@import "../common/base.less";

@office365-border-width: 1px;
@office365-border-radius: 2px;
@office365-inline-border-radius: @office365-border-radius - 1px;

.km-office365
{
    font: normal 1.14em "HelveticaNeue Light", "Roboto Light", "Slate Light", "Segoe WP", sans-serif;
}

// override transform options for performance
.km-root .km-office365.km-pane,
.km-root .km-office365 .km-view,
.km-root .km-office365 .km-slider,
.km-root .km-office365 .km-switch,
.km-root .km-office365 .km-group-title,
.km-root .km-office365 .km-filter-reset,
.km-root .km-office365 .km-shim .k-animation-container
{
    -webkit-transform: none;
}

.km-office365,
.km-office365 *
{
    .box-sizing(border-box);
    .background-clip(border-box);
}

// Revert box/clip for Web widgets
.km-office365 [class^=k-]
{
    .box-sizing(content-box);
}


.km-office365 .km-tabstrip .km-button
{
    background: none;
}

// PopUp

.km-office365 .km-popup .k-popup
{
    font-size: 1em !important;
}

.km-office365 .km-popup .k-item,
.km-office365 .km-actionsheet > li > a
{
    text-decoration: none;
    padding: .688em 1em;
    border-radius: 0;
    border-width: 0 0 @office365-border-width;
    border-style: solid;
    .box-sizing(border-box);
}

.km-office365 .km-popup
{
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    .box-sizing(border-box);
}

.km-office365 .km-popup .k-list-container
{
    width: 100% !important;
    height: auto !important;
    padding: 0;
}

.km-office365 .km-actionsheet,
.km-office365 .km-popup .k-list-container
{
    max-height: 80%;
}

.km-office365 .km-actionsheet-wrapper,
.km-office365 .km-popup .k-list-container
{
    bottom: 0;
    border-width: @office365-border-width 0 0;
    border-style: solid;
    border-radius: 0;
    .box-sizing(border-box);
}

.km-office365 .km-shim .k-animation-container
{
    left: 0;
    top: auto;
    bottom: 0;
}

.km-office365 .km-popup-wrapper
{
    padding: 15px;
}

.km-office365 .km-view-title,
.km-office365 .km-dialog-title {
    font-size: 1.125em;
    line-height: 2.78em;
}

// Color Template
@import "template.less";

// Tablet Styles

.km-tablet .km-office365.km-horizontal .km-navbar .km-button,
.km-tablet .km-office365.km-horizontal .km-toolbar .km-button
{
    margin-top: .2rem;
    margin-bottom: .2rem;
}

.km-office365 .km-icon:before,
.km-office365 .km-contactadd:before,
.km-office365 .km-rowdelete:before,
.km-office365 .km-rowinsert:before,
.km-office365 .km-detaildisclose:before {
    margin-top: 0;
}

// Loader & Pull-to-refresh
.km-office365 .km-load-more
{
    height: 3.4em;
}

.km-office365 .km-load-more .km-button
{
    margin: 0 .8em;
    display: block;
}

.km-office365 .km-scroller-refresh.km-load-more,
.km-office365 .km-scroller-pull
{
    border-radius: 50%;
    overflow: visible;
}

.km-office365 .km-loader
{
    left: 45%;
    margin: 0;
    width: 100%;
    height: 100%;
    background: none;
}

.km-office365 .km-loader .km-loading {
    .animation(none);
    display: none;
}

.km-office365 .km-loading-left,
.km-office365 .km-loading-right {
    background: none;
}

.km-office365 .km-loading-left,
.km-office365 .km-loading-right,
.km-office365 .km-scroller-refresh .km-icon
{
    position: absolute;
    top: 50%;
    left: 45%;
}

.km-office365 .km-scroller-pull .km-loading-left,
.km-office365 .km-scroller-pull .km-loading-right,
.km-office365 .km-scroller-refresh > .km-icon
{
    display: none;
}

.km-office365 .km-scroller-refresh .km-loading-left,
.km-office365 .km-scroller-refresh .km-loading-right
{
    display: block;
}

.km-office365 .km-scroller-refresh .km-loading-left,
.km-office365 .km-scroller-refresh .km-loading-right,
.km-office365 .km-scroller-refresh .km-icon
{
    top: 0;
    left: 0;
}

.km-office365 .km-scroller-refresh .km-icon:before
{
    content: "\a0";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 12px;
    height: 12px;
    border-width: 2px;
    border-style: solid;
    border-radius: 50%;
}

.km-root .km-office365 .km-scroller-pull .km-icon
{
    -webkit-background-clip: inherit;
    background-size: inherit;
    border-radius: 50%;
}

.km-office365 .km-loading:after
{
    display: none;
}

.km-office365 .km-scroller-refresh.km-load-more
{
    padding: 0;
    position: relative;
    margin: auto;
}

.km-office365 .km-scroller-refresh.km-load-more,
.km-office365 .km-scroller-pull
{
    font-size: 1em;
    width: 2.5em;
    height: 2.5em;
    top: .25em;
    white-space: nowrap;
}

.km-office365 .km-scroller-pull
{
    left: 50%;
    margin: 0 0 0 -90px;
}

.km-office365 .km-loader h1
{
    display: none;
    font-size: 1em;
    position: absolute;
    left: -50%;
    width: 200%;
    top: 55%;
}

.km-office365 .km-scroller-pull .km-template
{
    position: absolute;
    line-height: 2em;
    font-size: 1.2em;
    min-width: 0;
    top: 0;
    left: 3em;
}

.km-office365 .km-scroller-pull .km-icon
{
    margin-right: 0;
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    margin-left: -1rem;
    margin-top: -1rem;
}

.km-office365 .km-scroller-pull .km-icon:after
{
    content: "\e012";
    margin-left: -3px;
}

.km-office365 .km-scroller-refresh .km-icon
{
    display: none;
}

.km-office365 .km-load-more .km-icon,
.km-office365 .km-scroller-pull .km-icon
{
    .transform(rotate(0deg));
    .pTransition(none);
}

.km-office365 .km-load-more .km-icon:after,
.km-office365 .km-scroller-pull .km-icon:after
{
    .transform(rotate(0deg));
    .transform-origin(62% 50%);
    .pTransition(~"transform 300ms linear");
}

.km-office365 .km-scroller-release .km-icon:after
{
    .transform(rotate(180deg));
}

.km-office365 .km-scroller-refresh .km-icon:after
{
    .transition(none);
}

.km-office365 .km-loading-left:before,
.km-office365 .km-loading-right:before{
    content: " ";
    position: absolute;
    top: 1px;
    left: 1px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: block;
    border: 4px dotted @office365-border-color;
}

.km-office365 .km-loading-left,
.km-office365 .km-loading-right,
.km-office365 .km-loading-left:after,
.km-office365 .km-loading-right:after {
    left: 0;
    top: 0;
    display: block;
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    clip: rect(0px, 20px, 40px, 0px);
}

.km-office365 .km-loading-left:after,
.km-office365 .km-loading-right:after {
    content: " ";
    background-color: #fff;
    .animation(rotate_left_sector 4s linear infinite);
}

.km-office365 .km-loading-right {
    left: 0;
    -moz-transform: rotate(180deg);
    -webkit-transform: rotate(180deg);
    -ms-transform: rotate(180deg);
    transform: rotate(180deg);
}

.km-office365 .km-loading-right:after {
    .animation(rotate_right_sector  4s linear infinite);
}

@-moz-keyframes rotate_left_sector {
    0% { -moz-transform: rotate(0deg);  }
    25% { -moz-transform: rotate(0deg); }
    50% { -moz-transform: rotate(180deg); }
    75% { -moz-transform: rotate(180deg); }
    100% { -moz-transform: rotate(360deg); }
}

@-moz-keyframes rotate_right_sector {
    0% { -moz-transform: rotate(0deg);  }
    25% { -moz-transform: rotate(180deg); }
    50% { -moz-transform: rotate(180deg); }
    75% { -moz-transform: rotate(360deg); }
    100% { -moz-transform: rotate(360deg); }
}

@-webkit-keyframes rotate_left_sector {
    0% { -webkit-transform: rotate(0deg) ; }
    25% { -webkit-transform: rotate(0deg); }
    50% { -webkit-transform: rotate(180deg); }
    75% { -webkit-transform: rotate(180deg); }
    100% { -webkit-transform: rotate(360deg); }
}

@-webkit-keyframes rotate_right_sector {
    0% { -webkit-transform: rotate(0deg);  }
    25% { -webkit-transform: rotate(180deg); }
    50% { -webkit-transform: rotate(180deg); }
    75% { -webkit-transform: rotate(360deg); }
    100% { -webkit-transform: rotate(360deg); }
}

@-ms-keyframes rotate_left_sector {
    0% { -ms-transform: rotate(0deg);  }
    25% { -ms-transform: rotate(0deg); }
    50% { -ms-transform: rotate(180deg); }
    75% { -ms-transform: rotate(180deg); }
    100% { -ms-transform: rotate(360deg); }
}

@-ms-keyframes rotate_right_sector {
    0% { -ms-transform: rotate(0deg);  }
    25% { -ms-transform: rotate(180deg); }
    50% { -ms-transform: rotate(180deg); }
    75% { -ms-transform: rotate(360deg); }
    100% { -ms-transform: rotate(360deg); }
}

@keyframes rotate_left_sector {
    0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }
    25% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }
    50% { -webkit-transform: rotate(180deg); transform: rotate(180deg); }
    75% { -webkit-transform: rotate(180deg); transform: rotate(180deg); }
    100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}

@keyframes rotate_right_sector {
    0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }
    25% { -webkit-transform: rotate(180deg); transform: rotate(180deg); }
    50% { -webkit-transform: rotate(180deg); transform: rotate(180deg); }
    75% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
    100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}
