#modal-container {
  &.hidden {
    #overlay {
      display: none;
    }

    #modal-frame {
      height: 0;

      #modal-window {
        top: -500px;
      }
    }
  }

  &.displayed {
    display: flex;

    #overlay {
      display: flex;
    }

    #modal-frame {
      #modal-window {
        top: 58px;
      }
    }
  }

  #overlay {
    position: fixed;
    top: 56px;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
  }

  #modal-frame {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 101;
    display: flex;
    justify-content: center;
    transition: height 1s ease;

    #modal-window {
      position: absolute;
      background-color: #f6f6f6;
      z-index: 102;
      border: 1px solid #bfbfbf;
      border-top: none;
      width: 300px;
      max-height: 500px;
      box-shadow: inset 0px 5px 5px -3px rgba(0, 0, 0, 0.2),
        0px 5px 10px 1px rgba(0, 0, 0, 0.2);
      transition: top 1s ease;
      padding: 1rem 150px;
    }
  }
}