/* R7 SAFE: Exam answer-video modal must always fit the visible viewport. */
.qira-answer-video-modal {
  padding: 4px !important;
  overflow: auto !important;
  align-items: center !important;
  justify-items: center !important;
}
.qira-answer-video-dialog {
  width: min(960px, calc(100vw - 8px)) !important;
  max-width: calc(100vw - 8px) !important;
  max-height: calc(100vh - 8px) !important;
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  overflow: hidden !important;
  margin: auto !important;
}
.qira-answer-video-dialog > header {
  flex: 0 0 auto !important;
}
.qira-answer-video-stage {
  width: 100% !important;
  height: min(540px, 56.25vw, calc(100vh - 66px)) !important;
  max-height: calc(100vh - 66px) !important;
  min-height: 0 !important;
  aspect-ratio: auto !important;
  overflow: hidden !important;
}
.qira-answer-video-stage iframe,
.qira-answer-video-stage video,
.qira-answer-video-stage img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
}
@supports (height: 100dvh) {
  .qira-answer-video-dialog {
    max-height: calc(100dvh - 8px) !important;
  }
  .qira-answer-video-stage {
    height: min(540px, 56.25vw, calc(100dvh - 66px)) !important;
    max-height: calc(100dvh - 66px) !important;
  }
}
@media (orientation: landscape) and (max-height: 700px) {
  .qira-answer-video-dialog {
    border-radius: 12px !important;
  }
  .qira-answer-video-dialog > header {
    min-height: 46px !important;
    padding: 5px 10px !important;
  }
  .qira-answer-video-dialog > header button {
    width: 34px !important;
    height: 34px !important;
    font-size: 20px !important;
  }
  .qira-answer-video-dialog > header strong {
    font-size: .9rem !important;
  }
  .qira-answer-video-dialog > header small {
    font-size: .68rem !important;
  }
  .qira-answer-video-stage {
    height: calc(100vh - 54px) !important;
    max-height: calc(100vh - 54px) !important;
  }
}
@media (orientation: landscape) and (max-height: 700px) and (height: 100dvh) {
  .qira-answer-video-stage {
    height: calc(100dvh - 54px) !important;
    max-height: calc(100dvh - 54px) !important;
  }
}
