/* =========================
   MEDIA MODAL V2
========================= */

.media-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: block;
}

.media-modal[aria-hidden="true"] {
  display: none;
}

.media-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .55);
}

.media-modal__card {
  position: relative;
  z-index: 2;
  width: min(1000px, calc(100% - 28px));
  max-height: 92vh;
  margin: 4vh auto;
  background: #111827;
  color: #fff;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}

.media-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.media-modal__body {
  padding: 16px;
}

.media-modal__slides {
  width: 100%;
}

.media-modal__slide {
  display: none;
}

.media-modal__slide.is-active {
  display: block;
}

.media-modal__content {
  margin-top: 14px;
}

.media-modal__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
}

.modal-media {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: #000;
}

.modal-media .media-player,
.modal-media video,
.modal-media iframe,
.modal-media img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 0;
}

.icon-btn {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 700px) {
  .media-modal__card {
    width: calc(100% - 16px);
    margin: 2vh auto;
    max-height: 96vh;
  }

  .media-modal__foot {
    flex-direction: column;
    align-items: stretch;
  }
}