.db-media-preview-trigger {
  cursor: zoom-in;
}

.db-media-preview-frame {
  position: relative;
}

.db-media-preview-button {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(246, 239, 227, 0.24);
  border-radius: 6px;
  background: rgba(7, 9, 13, 0.78);
  color: rgba(246, 239, 227, 0.94);
  cursor: zoom-in;
  font-size: 10px;
  line-height: 1;
  backdrop-filter: blur(12px);
}

.db-media-preview-button:hover,
.db-media-preview-button:focus-visible {
  background: rgba(18, 21, 27, 0.94);
  border-color: rgba(214, 175, 107, 0.42);
  outline: none;
}

.db-media-preview[hidden] {
  display: none;
}

.db-media-preview {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(3, 4, 6, 0.86);
  backdrop-filter: blur(18px);
}

.db-media-preview-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: transparent;
  cursor: zoom-out;
}

.db-media-preview-shell {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  max-width: min(1180px, 96vw);
  max-height: 92vh;
}

.db-media-preview-stage {
  display: grid;
  place-items: center;
  min-width: min(280px, 86vw);
  overflow: hidden;
  border: 1px solid rgba(239, 225, 196, 0.16);
  border-radius: 8px;
  background: rgba(6, 8, 12, 0.96);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.62);
}

.db-media-preview-stage img,
.db-media-preview-stage video {
  display: block;
  max-width: 94vw;
  max-height: 84vh;
  width: auto;
  height: auto;
}

.db-media-preview-stage iframe {
  display: block;
  width: min(1120px, 94vw);
  aspect-ratio: 16 / 9;
  max-height: 84vh;
  border: 0;
}

.db-media-preview-close {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(246, 239, 227, 0.2);
  border-radius: 8px;
  background: rgba(7, 9, 13, 0.86);
  color: rgba(246, 239, 227, 0.94);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.db-media-preview-close:hover,
.db-media-preview-close:focus-visible {
  border-color: rgba(214, 175, 107, 0.42);
  outline: none;
}

.db-media-preview-caption {
  max-width: min(860px, 90vw);
  color: rgba(246, 239, 227, 0.72);
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

body.db-media-preview-open {
  overflow: hidden;
}

@media (max-width: 680px) {
  .db-media-preview {
    padding: 10px;
  }

  .db-media-preview-stage img,
  .db-media-preview-stage video {
    max-width: 96vw;
    max-height: 78vh;
  }

  .db-media-preview-stage iframe {
    width: 96vw;
    max-height: 78vh;
  }
}
