/**
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you 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-once 'common.less';

.app-page {
  .wrap-tabs {
    margin-top: 30px;
  }
  .quick-links-wrapper {
    .nav-pills.move {
      float: right;
      width:135px;
      &>li {
        position: absolute;
      }
    }
    .dropdown-submenu {
      &> a:after {
        border-left-color: #333;
      }
    }
    .nav li.dropdown.open {
      .dropdown-toggle{
        color: #005580;
        background-color: #eeeeee;
        border-color: #eeeeee;
        -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
        -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
      }
      a:hover .caret {
        border-top-color: #005580;
        border-bottom-color: #005580;
      }
      .caret {
        border-top-color: #005580;
        border-bottom-color: #005580;
      }
    }
  }
}

.app_summary {
  padding-left: 0;
  table {
    &.no-borders {
      td {
        border-width: 0;
      }
    }
    td:nth-child(2) span{
      word-break: break-all;
    }
  }
  .panel-heading {
    font-weight: 700;
  }
  .panel-summary {
    min-height: 400px;
    td:first-child {
      text-align: right;
    }
  }
  .panel-components {
    .status {
      display: inline-block;
      width: 25px;
    }
    .icon-ok-sign {
      color: #5ab400;
    }
    .icon-warning-sign {
      color: #ff0000;
    }
    .panel-body {
      overflow-y: auto;
    }
  }
  .panel-link {
    margin-top: -5px;
    margin-right: -7px;
  }
  .column-left {
    padding-left: 0;
  }
  .column-right {
    padding-right: 0;
  }
}

.chart-container {
  cursor: default;

  position: relative;
  margin: 20px 15px 0px 15px;

  .chart {
    position: relative;
    z-index: 1;
  }
  .chart-y-axis {
    position: absolute;
    top: 0;
    bottom: 0px;
    width: 100px;
    z-index: 2;
    margin-top: 15px;
  }
  .chart-x-axis {
    position: absolute;
    top: 180px;
    left: 35%;
    width: 30%;
    z-index: 2;
  }
  .x_tick {
    margin-top: 5px;
    .title {
      padding: 0 2px 0 2px;
      opacity: 1 !important;
      top: 148px;
    }
  }
  svg {
    g {
      g:nth-child(1) {
        display: none;
      }
    }
  }
  text {
    font-weight: 700;
    opacity: 1 !important;
  }
  .chart-legend {
    font-family: 'Courier New';
    position: absolute;
    top: 180px;
    z-index: 3;
  }
  .rickshaw_legend {
    background-color: #999 !important;
    li:hover {
      background-color: #999 !important;
    }
  }
  .rickshaw_legend:empty {
    padding: 0;
  }
  .rickshaw_graph {
    .x_tick {
      .title {
        bottom: -6px;
        opacity: 0.75;
      }
    }
  }
  .chart-overlay {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
    z-index: 5;
  }
  .chart-title {
    text-align: center;
    margin-top: 20px;
  }
}

.app_configs {
  a.accordion-toggle {
    display: block;
  }
  .panel-heading{
    .icon{
      width: 24px;
    }
  }
  .row {
    .table-row();
    textarea {
      height: 200px;
      padding-left: 5px;
      padding-right: 5px;
      resize: none;
    }
    textarea[disabled] {
      cursor: not-allowed;
      background-color: #eeeeee;
    }
    input[disabled] {
      cursor: not-allowed;
      background-color: #eeeeee;
    }
    .property-name {
      word-wrap: break-word;
    }
  }
}

.app-alerts {
  overflow-y: auto;
  ul {
    padding-left: 0;
    margin-bottom: 0;
  }
  li {
    border-bottom: 1px solid #eee;
    list-style: none;
    padding: 5px;
    background-position: 14px 9px;
    background-repeat: no-repeat;
    .date-time {
      float: right;
    }
    p {
      margin-bottom: 2px;
    }
    .container-fluid {
      padding-left: 10px;
      padding-right: 10px;
    }
    .title {
      font-weight: normal;
      font-size: 13px;
    }
    .row-fluid [class*="span"] {
      min-height: 0px;
    }
    .date-time {
      color: #999;
      font-style: italic;
      font-size: small;
      text-align: right;
    }
    .message {
      font-size: 12px;
      color: #777;
      word-break: break-all;
      padding-right: 15px;
    }
    .serviceLink {
      padding-left: 7px;
    }
  }
  .icon-ok {
    color: #5AB400;
  }
  .icon-remove {
    color: #FF4B4B;
  }
  .icon-warning-sign {
    color: #FDB82F;
  }
  .icon-question-sign {
    color: #999;
  }
}

.flex-popup {
  .component-label {
    line-height: 28px;
  }
}

.view-user {
  line-height: 34px;
  padding-right: 10px;
}

.btn-primary {
  color: #ffffff;
  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
  background-color: #006dcc;
  *background-color: #0044cc;
  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
  background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
  background-image: -o-linear-gradient(top, #0088cc, #0044cc);
  background-image: linear-gradient(to bottom, #0088cc, #0044cc);
  background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
  background-repeat: repeat-x;
  border-color: #0044cc #0044cc #002a80;
  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
  filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);
  filter: progid:dximagetransform.microsoft.gradient(enabled=false);
}