/**
 * Copyright (c) 2015 Bosch Software Innovations GmbH and others.
 *
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 */
// scss-lint:disable ImportantRule, PropertySortOrder

$view-padding: round($v-unit-size / 1.5) !default;
@mixin dashboard-dashboard-view {
  .dashboard-view.dashboard-view {
    padding: 1.4px;
    overflow: auto;
    .dashboard-panel-toolbar {
      padding: 1px 0;
      height: $v-unit-size + 2px;
      top: 0;
      left: 0;
    }
    .dashboard-panels {
      display: block;
      height: 100%;
      margin: 0 round($view-padding / -3);

      //Style of each report widget
      .card {
        height: 100%;
        overflow: hidden;
        position: relative;
        .v-menubar-menuitem-icon-only {
          color: $button-icon-color;
        }
        .highcharts-background {
          fill: $widget-bg;
        }
        .highcharts-legend > rect {
          fill: $widget-bg;
        }
      }

      //Each report widget style.Applying padding between the widgets
      .dashboard-panel-slot {
        padding-bottom: round($view-padding / 5)*2;
        padding-left: round($view-padding / 5);
        padding-right: round($view-padding / 5);
        padding-top: 0;
        min-height: 220px;
        .card {
          border: 1px solid $widget-border-color;
          background-color: $widget-bg;
        }
      }

      //Maximized report widget style
      .dashboard-panel-slot.max {
        width: 100% !important;
        height: 100% !important;
        padding-top: 0;
        padding-bottom: 0;
      }
    }
  }
  .dashboard-view {
    @include width-range($max: 480px) {
      padding-left: round($view-padding / 2);
      padding-right: round($view-padding / 2);
    }
  }

  //Information table displayed when report widget is maximized
  .info-table {
    margin-right: 20px;
    overflow-x: hidden;
    overflow-y: auto;
    font-size: $v-font-size--small;
  }

  //Make information table visible when  report widget is maximized
  .info-table-show {
    visibility: visible;
  }

  //Report widget caption style
  .v-caption-report-caption {
    margin-top: 4px;
    color: $widget-caption-color;
    padding-left: 10px;
    font-weight: 500;
  }
}
