@import "src/styles/color.module";
@import "src/styles/responsive.module";

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, .5);
  display: table;
  text-align: center;
  z-index: 9999;
  @include responsive($phone) {
    display: flex;
    align-items: center;
  }

  &.fullHeight {
    .cell {
      height: 100%;

      .modal {
        height: 100%;
        max-height: 95vh;
      }
    }
  }

  .cell {
    vertical-align: middle;
    display: table-cell;
    padding: 10px;
    @include responsive($phone) {
      max-width: 100%;
      width: 100%;
    }

    .modal {
      background: $white;
      max-width: 600px;
      margin: 0 auto;
      padding: 30px;
      position: relative;
      animation: scale-up-with-opacity .15s ease;
      border-radius: 10px;
      box-shadow: 0 0 8px 4px rgba(0, 0, 45, 0.04);
      text-align: left;
      @include maxWidth($phone - 1) {
        padding: 15px;
      }

      .closeBtn {
        position: absolute;
        right: -55px;
        top: 0;
        background: $white;
        border: 0;
        height: 40px;
        width: 40px;
        padding: 0;
        border-radius: 8px;
        box-shadow: 0 0 8px 4px rgba(0, 0, 45, 0.04);
        vertical-align: middle;
        outline: 0;
        cursor: pointer;
        @include responsive($phone) {
          right: 1px;
          background-color: transparent;
        }

        > svg {
          width: 20px;
          height: 20px;
          vertical-align: middle;
          color: $ultraMarine;
        }

        &:hover {
          background-color: $blueHoverSecondary;
        }
      }
    }
  }
}