﻿/*
 *  Power BI Visualizations
 *
 *  Copyright (c) Microsoft Corporation
 *  All rights reserved. 
 *  MIT License
 *
 *  Permission is hereby granted, free of charge, to any person obtaining a copy
 *  of this software and associated documentation files (the ""Software""), to deal
 *  in the Software without restriction, including without limitation the rights
 *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 *  copies of the Software, and to permit persons to whom the Software is
 *  furnished to do so, subject to the following conditions:
 *   
 *  The above copyright notice and this permission notice shall be included in 
 *  all copies or substantial portions of the Software.
 *   
 *  THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
 *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
 *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
 *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
 *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 *  THE SOFTWARE.
 */
 
/* 
 * Color styles MUST be set through the color palette in colors.less. This
 * will allow us to easily change the palette and get a consistent look. DO NOT
 * hard-code colors directly inside classes.
 *
 * To get integrated VS support for LESS install the Visual Studio Web Essentials.
 */

@import "colorPalette.less";
@import "fonts.less";

@dashboardTileHeaderHeight: 50px;
@dashboardTilePadding: 10px;

.unselectable {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -o-user-select: none;
    user-select: none;
    cursor: default;
}

.trimmedTextWithEllipsis {
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.skittlesNormal {
    opacity: 0;
    border: 1px solid @neutralTertiaryColor;
    color: @neutralPrimaryColor;
    background-color: @whiteColor;
    margin-bottom: 5px;
    margin-left: 5px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    -moz-transition: opacity 0.2s ease-in;
    -o-transition: opacity 0.2s ease-in;
    -webkit-transition: opacity 0.2s ease-in;
    transition: opacity 0.2s ease-in;
    -webkit-transition-delay: 0s; /* Safari */
    transition-delay: 0s;
}

.skittlesHovered {
    background-color: @neutralLighterColor;
}

.skittlesPressed {
    border-color: @neutralSecondaryAltColor;
    background-color: @neutralLightColor;
}

.skittlesIconNormal {
    vertical-align: middle;
    text-align: center;
    color: @neutralTertiaryColor;
}

.skittlesIconHovered {
    color: @neutralSecondaryAltColor;
}

.visible {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.5s linear, left 0.5s linear, transform 0.5s;
    -webkit-transition: opacity 0.5s linear, left 0.5s linear, transform 0.5s;
}

.hidden {
    visibility: hidden;
    /* Fully hide the element*/
    opacity: 0;
    transition: visibility 0s 0.5s, width 0s 0.5s, height 0s 0.5s, opacity 0.5s linear, left 0.5s linear, transform 0.5s;
    -webkit-transition: visibility 0s 0.5s, width 0s 0.5s, height 0s 0.5s, opacity 0.5s linear, left 0.5s linear, transform 0.5s;
}

.hiddenNoTransition {
    visibility: hidden;
    opacity: 0;
}

.placeholderColor(@color: @neutralSecondaryColor) {
    &::-webkit-input-placeholder { /* WebKit browsers */
        color: @color;
    }

    &:-moz-placeholder { /* Mozilla Firefox 4 to 18 */
        color: @color;
        opacity: 1;
    }

    &::-moz-placeholder { /* Mozilla Firefox 19+ */
        color: @color;
        opacity: 1;
    }

    &:-ms-input-placeholder { /* Internet Explorer 10+ */
        color: @color;
    }
}

.imgResource(@filename) {
    background: url('../images/@{filename}.png') center center no-repeat;
}

.expAppBarMenu {
    position: absolute;
    left: 10px;
    top: 7px;
    content: '';
}

.expAppBar {
    position: absolute;
    left: 10px;
    content: '';
}

.visualTitle() {
    font-family: @semiboldFontFamily;
    font-size: 14px;
    color: @neutralPrimaryColor;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    height: 20px;
    line-height: 16px;
}

.visualSubtitle() {
    font-family: @regularSecondaryFontFamily;
    font-size: 12px;
    color: @neutralTertiaryColor;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    height: 20px;
    text-transform: uppercase;
}

.visualCompositeTile(){
    top: @dashboardTilePadding;
    left: @dashboardTilePadding;
    right: @dashboardTilePadding;
    bottom: @dashboardTilePadding;
    font-family: @regularFontFamily;
    overflow: hidden;
    background-color: @whiteColor;
}

.visualDisplayTextSubDisplayText() {
    color: @neutralPrimaryColor;
    line-height: 1.3em;
    max-height: 2.6em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.visualSubDisplayTextDefaultSubtitle(){
    text-transform: uppercase;
    color: @neutralTertiaryColor;
}

.visualTileHeader(){    
    padding: 8px 10px 10px 10px;
    box-sizing: border-box;
    height: @dashboardTileHeaderHeight;
    position: absolute;
    top: 0;
    width: 100%;
    border-bottom: 1px solid @neutralTertiaryColor;
    background-color: @whiteColor;
    z-index: 1;

    transition: opacity 0.25s;
    -webkit-transition: opacity 0.25s;
}

.visualTile(){    
    top: @dashboardTileHeaderHeight;
    color: @whiteColor;
    overflow: hidden;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
}
