@import '../../styles/variables';

.PopupWrapper {
  position: fixed;
  z-index: layer('modal');
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.PopupInner {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  padding: 70px 0;
  overflow: auto;
  display: flex;
  justify-content: center;
  align-items: baseline;

  @media screen and (min-width: $layout-desktop) {
    align-items: center;
  }
}

.PopupOverlay {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: rgba(255,255,255,.9);

  &_black {
    background: rgba(0,0,0,.7);
  }
}

.Popup {
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-width: 320px;
  max-width: 800px;
  border-radius: 3px;
  background-color: $white;
  box-shadow: $base-shadow;
  transition: transform .25s ease;
  transform: translate(0, 150%);

  &_active {
    transform: translate(0, 0);
  }

  &__header {
    display: flex;
    height: 74px;
    min-height: 74px;
    position: relative;
    padding: 0 12px 0 25px;
    font-size: 20px;
    align-items: center;
    justify-content: space-between;

    &-close-button {
      position: absolute;
      margin: 0;
      right: 8px;
      top: 8px;
      padding: 12px;
      cursor: pointer;
      border: 0;
      outline: 0;
      background: transparent;
    }
  }

  &__content {
    padding: 0 25px 50px;
    display: flex;
    justify-content: flex-start;
    word-break: break-word;
    line-height: 1.5;

    &_overflow {
      overflow: hidden;
      overflow-y: auto;
    }
  }

  &__footer {
    display: flex;
    height: 82px;
    min-height: 82px;
    padding: 0 25px 0 0;
    align-items: center;
    justify-content: flex-end;
  }
}
