/*
  Copyright 2017 Red Hat Inc.

  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.
 */

//
// Login
// --------------------------------------------------

.login-pf {
  background-color: @login-bg-color;
  @media (min-width: @screen-sm-min) {
    background-image: url("../../img/bg-login-2.png");
    background-position: 100% 100%;
    background-repeat: no-repeat;
    background-size: 30%;
  }
  @media (min-width: @screen-md-min) {
    background-size: auto;
  }
  #badge {
    margin-bottom: 50px;
  }
  body {
    background: transparent;
    @media (min-width: @screen-sm-min) {
      background-image: url("../../img/bg-login.png");
      background-repeat: no-repeat;
      background-size: 30%;
      height: 100%;
    }
    @media (min-width: @screen-md-min) {
      background-size: auto;
    }
  }
  #brand {
    top: -30px;
    @media (min-width: @screen-sm-min) {
      top: -40px;
      + .alert {
        margin-top: -20px;
      }
    }
    img {
      height: 75px;
    }
  }
  .container {
    padding-top: 0;
    color: #333;
    @media (min-width: @screen-md-min) {
      bottom: 20%;
      padding-right: 120px;
    }

    [class^='alert'] {
      color: #333333;
    }
  }
}

// this seems to work better than 'middle'
.badge {
  vertical-align: baseline;
}

// Additional treeview styles not included in patternfly but included in patternfly's treeview example ?!?
.treeview {
  .list-group-item {
    cursor: pointer;
  }
  span.indent {
    margin-left: 10px;
    margin-right: 10px;
  }
  span.icon {
    width: 12px;
    margin-right: 5px;
  }
  .node-disabled {
    color: silver;
    cursor: not-allowed;
  }
}
.node-treeview1 {
  border: none;
}
.node-treeview1:not(.node-disabled):hover {
  background-color: #f5f5f5;
}

// Custom styles
.treeview {
  .list-grou-item {
    white-space: nowrap; // experimental
    overflow: hidden; // experimental
  }
  .item-group {
    display: none;
    &.expanded {
      display: block;
    }
  }
}

// spinner
.spinner.spinner-xl {
  height: 50px;
  width: 50px;
}

// Dropdown Component
.dropdown-wrapper {
  // isolate z-index for Dropdown
  position: relative;
  z-index: 1;
  .dropdown {
    // make z-index to play with modal-backdrop we use in Dropdown
    z-index: 1050;
  }
}

// Sidebar
.sidebar-pf {
  background-color: @sidebar-pf-bg; // keep sidebar background for all screen sizes
  .sidebar-header {
    padding-bottom: 12px;
  }
}

// logo
.navbar-brand {
  img {
    height: 24px;
  }
}
.navbar-pf .navbar-utility > li > a {
  padding: 14px 10px;
}

// blank slate doesn't have margin-top to match bottom for some reason
.blank-slate-pf {
  margin-top: 20px;
}

// ListView
// remove those 2 when this issue is resolved https://github.com/patternfly/patternfly/issues/324
.list-view-pf-main-info {
  min-width: 0;
}
.list-view-pf-body {
  min-width: 0;
}
// fix heading in stacked list view
// .list-view-pf-stacked .list-group-item-heading {
//   text-overflow: clip;
//   white-space: normal;
// }

// Remove top margin from page-header if there are breadcrumbs above it
.breadcrumb + .page-header {
  margin-top: 0;
}

// Notifications Toaster needs to lie over modals which are 1050
.toast-notifications-list-pf {
  z-index: 1060;
}
