/* Video player dialog: large default size, player fills available space, resizable */
[data-slot="dialog-content"].vh-video-player-dialog {
  --vh-dialog-width: min(96vw, 1400px);
  --vh-dialog-height: min(88vh, 900px);

  display: flex !important;
  flex-direction: column !important;
  gap: 0.5rem !important;
  padding: 0.5rem 0.75rem 1.75rem !important;
  width: var(--vh-dialog-width) !important;
  max-width: 98vw !important;
  height: var(--vh-dialog-height) !important;
  max-height: 95vh !important;
  min-width: 320px !important;
  min-height: 240px !important;
  overflow: hidden !important;
  position: fixed !important;
}

[data-slot="dialog-content"].vh-video-player-dialog [data-slot="dialog-header"] {
  flex-shrink: 0;
  padding-right: 2rem;
}

[data-slot="dialog-content"].vh-video-player-dialog .vh-video-player-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

[data-slot="dialog-content"].vh-video-player-dialog .vh-video-player-frame {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  height: 100%;
  display: flex;
}

[data-slot="dialog-content"].vh-video-player-dialog .vh-video-player-frame > iframe,
[data-slot="dialog-content"].vh-video-player-dialog .vh-video-player-frame > video {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0.5rem;
  background: #000;
}

[data-slot="dialog-content"].vh-video-player-dialog .vh-dialog-resize-handle {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 28px;
  height: 28px;
  cursor: nwse-resize;
  z-index: 100;
  touch-action: none;
  opacity: 0.7;
  pointer-events: auto;
  background: transparent;
}

[data-slot="dialog-content"].vh-video-player-dialog .vh-dialog-resize-handle::before {
  content: "";
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 14px;
  height: 14px;
  border-right: 2px solid #8a6d4a;
  border-bottom: 2px solid #8a6d4a;
  border-radius: 0 0 2px 0;
  pointer-events: none;
}

[data-slot="dialog-content"].vh-video-player-dialog .vh-dialog-resize-handle:hover,
[data-slot="dialog-content"].vh-video-player-dialog .vh-dialog-resize-handle.vh-dialog-resize-handle--active {
  opacity: 1;
}

[data-slot="dialog-content"].vh-video-player-dialog.vh-dialog-resizing,
[data-slot="dialog-content"].vh-video-player-dialog.vh-dialog-resizing * {
  user-select: none !important;
}

@media (max-width: 640px) {
  [data-slot="dialog-content"].vh-video-player-dialog {
    --vh-dialog-width: 100vw;
    --vh-dialog-height: min(92vh, 100dvh);
    border-radius: 0.75rem !important;
  }
}
