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

// Component used to render a fixed container that spans to the viewport height just below the header
.fixed-container {
  z-index: 1000;
  position: fixed;
  right: 0;
  bottom: 0;
  top: @header-height;
  display: flex;
  flex-direction: column;

  .fixed-container-header, .fixed-container-footer {
    flex: 0;
  }

  .fixed-container-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow-y:auto;

    .fixed-container-body-content {
      padding-top: 15px;
    }
  }
}

// ModalPanel component
.fixed-container.modal-panel-backdrop {
  background: rgba(0, 0, 0, .5);
}

.fixed-container.modal-panel {
  background: white;
  left: 0;

  @media(max-width: @screen-md-max) {
    position: absolute;
    top: 0;
  }

  .nav.nav-tabs {
    &:extend(.modal .modal-dialog .nav-tabs);
  }

  .fixed-container-header {
    .modal-panel-header {
      &:extend(.modal .modal-header, .modal-header all);
    }
  }

  .fixed-container-footer {
    .modal-panel-footer {
      background-color: #f8f8f8;
      border-top: 1px solid #e5e5e5;
      padding-top: 10px;
      padding-bottom: 10px;
    }
  }
}
