.video-dialog {
  width: min(56rem, calc(100% - 1.5rem), max(20rem, calc((100dvh - 10rem) * 16 / 9)));
  max-width: none;
  max-height: calc(100dvh - 1.5rem);
  border: 0;
  border-radius: 16px;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--white);
  color: var(--ink);
}

.video-dialog:not([open]) {
  display: none;
}

.video-dialog::backdrop {
  background: rgb(0 0 0 / 75%);
}

html:has(.video-dialog[open]) {
  overflow: hidden;
}

.video-dialog-content {
  display: grid;
  gap: 8px;
  padding: clamp(12px, 2vw, 24px);
}

.video-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.video-dialog-header h2 {
  color: var(--magenta-ink);
  font-size: clamp(18px, 4vw, 24px);
  line-height: 1.2;
}

.video-dialog-close {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: var(--pale);
  color: var(--magenta-ink);
  cursor: pointer;
}

.video-dialog-player {
  aspect-ratio: 16 / 9;
  background: var(--ink);
}

.video-dialog-player iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-dialog-link {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  justify-self: start;
  color: var(--magenta-ink);
  font-weight: 700;
}
