/* Видео и просмотр оригинальных изображений. */
.video-feature {
  max-width: 980px;
}

.video-feature h2 {
  margin: 12px 0;
  font: 400 clamp(28px, 4vw, 40px)/1.2 var(--display);
}

.video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--surface);
  margin-block: 28px 16px;
}

.video-embed picture, .video-embed img, .video-embed iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
}

.video-embed button {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  min-height: 52px;
  width: max-content;
  max-width: 90%;
  padding: 12px 20px;
  background: #070809ee;
  border: 1px solid #fff;
  font-size: 16px;
}

.video-embed button > span {
  margin-right: 10px;
}

.gallery-dialog {
  width: min(1200px, calc(100% - 24px));
  max-width: none;
  max-height: calc(100dvh - 24px);
  padding: 20px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
}

.gallery-dialog::backdrop {
  background: #000e;
}

.gallery-bar, .gallery-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.gallery-bar p {
  margin: 0;
  font-size: 14px;
}

.gallery-dialog button, .gallery-controls a {
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 14px;
}

.gallery-image {
  padding-block: 16px;
}

.gallery-image img {
  width: 100%;
  height: min(70dvh, 900px);
  object-fit: contain;
}

.has-dialog {
  overflow: hidden;
}

@media (max-width: 560px) {
  .gallery-dialog {
    padding: 12px;
  }
  .gallery-controls {
    flex-wrap: wrap;
  }
  .gallery-controls a {
    order: 3;
    text-align: center;
    width: 100%;
  }
  .gallery-image img {
    height: 55dvh;
  }
}
