/* Trailer window */

#modal {
  position: fixed;
  left: 0px;
  top: 0px;
  z-index: 1000;
  width: 100%;
  height: 100%;
  background-color: rgba(229, 229, 229, 0.85);
  overflow: auto;
  display: none;
}

.modal__inner {
  display: table;
  width: 100%;
  height: 100%;
  position: relative;
}

.modal__block {
  display: table-cell;
  vertical-align: middle;
  text-align: center;
  padding: 80px 0;
}

.modal__btnClose {
  width: 40px;
  height: 40px;
  position: absolute;
  left: 0px;
  top: -60px;
  z-index: 1;
}

.modal__btnClose a {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
}

.modal__btnClose a:before,
.modal__btnClose a:after {
  content: "";
  display: block;
  width: 56px;
  height: 1px;
  background-color: #666666;
  transform-origin: 50% 50%;
  position: absolute;
  left: 50%;
  top: 50%;
  transition: all 0.2s;
}

.modal__btnClose a:before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.modal__btnClose a:after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.modal__btnClose a:hover:before,
.modal__btnClose a:hover:after {
  transform: translate(-50%, -50%) rotate(0deg);
  width: 100%;
}

.modal__closeBg {
  width: 100%;
  height: 100%;
  position: absolute;
  z-index: 0;
  left: 0;
  top: 0;
}

.modal__movie {
  margin: 0 auto;
  position: relative;
  text-align: left;
  display: none;
}

.modal__movie__inner {
  position: relative;
}

.modal__movie__inner:after {
  content: "";
  clear: both;
  display: block;
}

.modal__movie__details {
  position: relative;
  z-index: 0;
}

.modal__movie__details iframe {
  vertical-align: top;
}

@media screen and (max-width: 768px) {
  #modal {
    -webkit-overflow-scrolling: touch;
  }
  .modal__block {
    padding: 0;
  }
  .modal__btnClose {
    width: 9.375vw;
    height: 9.375vw;
    left: 6.25%;
    top: -15.625vw;
  }
  .modal__btnClose a:before,
  .modal__btnClose a:after {
    width: 13.125vw;
    height: 0.3125vw;
    transition: none;
  }
  .modal__btnClose a:hover:before {
    transform: translate(-50%, -50%) rotate(45deg);
    width: 13.125vw;
  }
  .modal__btnClose a:hover:after {
    transform: translate(-50%, -50%) rotate(-45deg);
    width: 13.125vw;
  }
  .modal__movie .modal__btnClose {
    left: 0;
  }
}

/* Player size: 16:9, inside the window with a 50px margin. */
#modalPlayer {
  display: block;
  border: 0;
  width: min(100vw - 100px, (100vh - 100px) * 16 / 9);
  aspect-ratio: 16 / 9;
}

@media screen and (max-width: 768px) {
  #modalPlayer {
    width: 87.5vw;
  }
}
