@import 'base';

.popup-wrapper {
  background-color: $color-popup-overlay;
  bottom: 0;
  left: 0;
  opacity: 0;
  position: fixed;
  right: 0;
  top: 0;
  visibility: hidden;
  z-index: $popup-overlay-level;

  -webkit-transition: visibility 0s linear $fade-time, opacity $fade-time ease-out;
  -moz-transition: visibility 0s linear $fade-time, opacity $fade-time ease-out;
  -o-transition: visibility 0s linear $fade-time, opacity $fade-time ease-out;
  -ms-transition: visibility 0s linear $fade-time, opacity $fade-time ease-out;
  transition: visibility 0s linear $fade-time, opacity $fade-time ease-out;

  .popup-box {
    background-color: $color-background-secondary;
    box-shadow: 0 0 4 * $spacing $color-background-box-shadow;
    margin: 10% auto;
    overflow: hidden;
    width: 520px;

    .popup-box__msg {
      @include _padding(0px, 5 * $spacing, 5 * $spacing, 5 * $spacing);
      text-align: left;

      p {
        @include _font-size(18px);
        @include _margin(0px, 0px, 0px, 0px);
        @include _padding($spacing, 0px, $spacing, 0px);
        color: $color-text-primary;
      }
    }

    .popup-box__buttons {
      @include _margin(5 * $spacing, 5 * $spacing, 5 * $spacing, 5 * $spacing);

      .button {
        @include _margin(0px, 2 * $spacing, 2 * $spacing, 2 * $spacing);
      }
    }

    .popup-box__title {
      @include _padding(5 * $spacing, 5 * $spacing, 0px, 5 * $spacing);
      background-color: $color-background-secondary;
      color: $color-text-primary;
      display: flex;
      justify-content: flex-start;
      font-family: "Space Grotesk", sans-serif;
      @include _font-size(21px);
    }

    .popup-box__close {
      min-width:0;
      @include _margin(8px, 8px, 8px, 8px);
    }

    label {
      text-align: left;
    }
  }

  &#screentime-popup,
  &#session-popup {
    z-index: $nav-bar-level + 1;
  }
}

.popup--fade {
  opacity: 1;
  visibility: visible;

  -webkit-transition: opacity $fade-time ease-out;
  -moz-transition: opacity $fade-time ease-out;
  -o-transition: opacity $fade-time ease-out;
  -ms-transition: opacity $fade-time ease-out;
  transition: opacity $fade-time ease-out;
}

@media (max-width: $mobile-max-width) {
  .popup-wrapper {
    .popup-box {
      width: 80%;
    }
  }
}
