#lvideo-wrap {
  position: fixed;
  inset: 0;
  z-index: 99999999;
  opacity: 0;
  visibility: hidden;
  padding: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.3s ease-in-out;
}

#lvideo-wrap,
#lvideo-wrap:after,
.lvideo-overlay {
  left: 0;
  top: 0;
  width: 100%;
  transition: all 0.3s ease-in-out;
  box-sizing: border-box;
}

#lvideo-wrap:after,
.lvideo-overlay {
  height: 100%;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background-color: rgba(0, 0, 0, 0.85);
  z-index: -1;
}

#lvideo-wrap .lvideo-container {
  width: auto;
  max-width: 90vw;
  max-height: 90vh;
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
}

#lvideo-wrap video {
  position: relative;
  box-sizing: border-box;
  background-color: #000;
  z-index: 10;
  box-shadow: 0 0 19px rgba(0, 0, 0, 0.16);
  display: block;
  max-width: 900px;
  height: auto;
  max-height: 85vh;
  /* Prevent video from exceeding screen height */
  width: auto;
  margin: 0 auto;
  object-fit: contain;
}

#lvideo-wrap iframe {
  position: relative;
  box-sizing: border-box;
  background-color: #000;
  z-index: 10;
  box-shadow: 0 0 19px rgba(0, 0, 0, 0.16);
  display: block;
  max-width: 900px;
  height: auto;
  width: 100%;
  aspect-ratio: 16 / 9;
}

#lvideo-wrap .lvideo-close {
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  /* Fixed to top right of screen */
  right: 30px;
  top: 30px;
  font-size: 35px;
  font-weight: bold;
  width: 50px;
  height: 50px;
  border-radius: 100%;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid white;
  transition: all 0.3s ease-in-out;
  z-index: 999999999;
  /* Above everything */
}

#lvideo-wrap .lvideo-close:before,
#lvideo-wrap .lvideo-close:after {
  content: "";
  width: 60%;
  height: 3px;
  transition: 0.3s;
  position: absolute;
  transition: all 0.3s ease-in-out;
}

#lvideo-wrap .lvideo-close:before {
  transform: rotate(42deg);
}

#lvideo-wrap .lvideo-close:after {
  transform: rotate(-42deg);
}

/* Ensure the overlay is clickable */
.lvideo-overlay {
  cursor: pointer;
}

#lvideo-wrap .lvideo-close:focus {
  outline: none;
}

#lvideo-wrap .lvideo-close:hover {
  color: white;
}

#lvideo-wrap .lvideo-close:hover :before,
#lvideo-wrap .lvideo-close:hover :after {
  color: white;
}

#lvideo-wrap.active {
  opacity: 1;
  visibility: visible;
}

#lvideo-wrap.active:after {
  opacity: 0.75;
}