body {
  font-family: "Helvetica", "Arial";
  min-height: 100vh;
  font-family: "Arial";

  /* center box_wrapper horizontally and vertically (very common way apparently) */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  overflow-x: hidden; /*avoid horizontal scroll */
}

html { height: auto; } /* works with body's min-height */

#box_wrapper {
  width: 100%;
  display: flex;
  flex-direction: row;

  /* center vertically and horizontally i think */
  justify-content: center;
}


video{
  align-self: center;
  order: 1;
  width: 100%;
  max-width: 750px;
  height: auto; /* to maintain aspect ratio */
  flex-shrink: 1;
}

#media{
  width: 100%;
  max-width: 600px;
}

.embed_wrapper{
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
}

.youtube_embed{
  position: absolute;
  width: 100%;
  height: 100%;
}


button{
  width: 100px;
  background-color: white;
  color: blue;
  font-size: 1.2em;
  border: 0;
}

#previous{
  margin-right: 10px;
  text-align: right;
}

#next{
  margin-left: 10px;
  text-align: left;
}

#video_desc{
  margin-top: 5px;
  margin-bottom: 5px;
  color: blue;
}

dialog{
  border: 0px;
  padding: 5px;
  max-width: 500px;
  width: 80%;
  border: 2px solid blue;
  background-color: white;
  color: blue;
}

dialog p{
  margin: 0;
  font-size: 1.2em;
}

#links{
  text-align: center;
  align-items: center;
}

dialog span{
  float: right;
}


.close_button{
  width: 1.7em;
  float: right;
  background-color: white;
  color: blue;
  border: 0px;
  font-size: 1.7em;
}

@media screen and (max-width: 620px){
  #previous{
    order: 2;
  }
  
  #next{
    order: 3;
  }
  #box_wrapper{
    flex-wrap: wrap;
  }
}
