/*
 Licensed to Cloudera, Inc. under one
 or more contributor license agreements.  See the NOTICE file
 distributed with this work for additional information
 regarding copyright ownership.  Cloudera, Inc. 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 './styles/variables';
@import './styles/mixins';

.hue-modal-mask {
  @include transition(opacity 0.3s ease);

  position: fixed;
  z-index: 9998;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: table;
}

.hue-modal-enter {
  opacity: 0;
}

.hue-modal-leave-active {
  opacity: 0;
}

.hue-modal-enter .modal-container,
.hue-modal-leave-active .modal-container {
  @include hue-transform(scale(1.1));
}

.hue-modal-wrapper {
  display: table-cell;
  vertical-align: middle;
  opacity: 1;

  .hue-modal-container {
    @include display-flex;
    @include flex-direction(column);
    @include box-shadow(0, 2px, 8px, rgba(0, 0, 0, 0.33));
    @include transition(all 0.3s ease);

    width: 500px;
    margin: 0 auto;
    background-color: $fluidx-white;
    border-radius: $hue-panel-border-radius;

    .hue-modal-header {
      @include flex(0 1 auto);

      padding: 15px;

      h3 {
        float: left;
        margin-top: 0;
        color: $hue-primary-color-dark;
      }

      .hue-modal-close-button {
        float: right;
        padding: 4px;
        font-size: 28px;
        font-weight: bold;
        line-height: 20px;
        opacity: 0.2;
        border: none;
        background-color: transparent;

        &:active,
        &:focus,
        &:focus-visible,
        &:hover {
          border: none;
          outline: none;
        }

        &:hover {
          opacity: 0.7;
        }
      }
    }

    .hue-modal-body {
      @include flex(1 1 100%);

      padding: 5px 15px;
    }

    .hue-modal-footer {
      @include flex(0 1 auto);

      padding: 15px;
      text-align: right;

      button {
        margin-left: 5px;
      }
    }
  }
}



