@import './../../styles/_base';

$color-modal-overlay: rgba(0, 0, 0, 0.7);
$modal-box-shadow: 0 7px 8px -4px rgba(0, 0, 0, 0.2),
  0 13px 19px 2px rgba(0, 0, 0, 0.14), 0 5px 24px 4px rgba(0, 0, 0, 0.12);
$modal-break: 720px;

dialog {
  height: 100%;
  width: 100%;
  border: 0;
  display: block;
  padding: 0;
  margin: 0;
}

.ngx-modal-overlay {
  display: block;
  z-index: 9999;
  position: fixed;
  overflow-x: hidden;
  overflow-y: auto;
  right: 0;
  left: 0;
  top: 0;
  bottom: 0;
  background-color: $color-modal-overlay;

  &.hidden {
    display: none;
  }
}

.ngx-modal {
  z-index: 2;
  position: relative;
  margin: 0 auto;
  min-height: 100%;
  width: 100%;
  background-color: $color-white;
  box-shadow: $modal-box-shadow;

  @media (min-width: $modal-break) {
    margin: 38px auto;
    min-height: 200px;
    height: auto;
    width: 90%;
    max-width: 520px;
  }

  &__header {
    min-height: 30px;
  }

  &__content {
    padding: 12px;
    overflow: hidden;
    width: 100%;
  }

  &__close-btn {
    text-decoration: none;
    display: block;
    padding: 4px 14px;
    font-size: 30px;
    border: 0;
    cursor: pointer;
    position: absolute;
    top: 0;
    right: 0;
    background-color: transparent;
    color: #2d2d2d;

    &:hover {
      background-color: $color-grey-light;
    }

    svg {
      width: 20px;
    }
  }
}

ngx-modal {
  [ngx-modal-header] {
    padding: 10px 12px;
    border-bottom: 1px solid #ccc;
  }

  [ngx-modal-footer] {
    padding: 12px;
    border-top: 1px solid #ccc;
  }
}
