/* Material 3 video player. Colors, shape and motion come from the --md-sys-* roles of the page theme. */
.m3-video {
  position: relative;
  display: grid;
  background: #000;
  color: #fff;
  border-radius: var(--md-sys-shape-corner-large, 16px);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  outline: none;
  container-type: inline-size;
  --md-icon-button-icon-color: currentColor;
  --md-icon-button-hover-icon-color: currentColor;
  --md-icon-button-pressed-icon-color: currentColor;
  --md-icon-button-focus-icon-color: currentColor;
  --md-icon-button-selected-icon-color: currentColor;
}
.m3-video:focus-visible {
  outline: 3px solid var(--md-sys-color-primary);
  outline-offset: -3px;
}
.m3-video > video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
.m3-video-controls {
  position: absolute;
  inset: auto 0 0;
  padding: 8px 12px 4px;
  background: linear-gradient(
    to top,
    color-mix(in srgb, var(--md-sys-color-scrim, #000) 80%, transparent),
    transparent
  );
  transition: opacity var(--md-sys-motion-duration-short3, 150ms) var(--md-sys-motion-easing-standard, ease);
}
.m3-video-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  font: var(--md-sys-typescale-label-large-weight, 500) var(--md-sys-typescale-label-large-size, 14px) / 1
    var(--md-ref-typeface-plain, system-ui);
}
.m3-video-bar md-icon-button span {
  font-size: 13px;
  font-weight: 500;
}
.m3-video-spacer {
  flex: 1;
}
.m3-video-seek {
  width: 100%;
  --md-slider-active-track-color: var(--md-sys-color-primary);
  --md-slider-handle-color: var(--md-sys-color-primary);
}
.m3-video-volume {
  width: 96px;
}
.m3-video-time {
  font-variant-numeric: tabular-nums;
  padding-inline: 8px;
  white-space: nowrap;
}
.m3-video-rate {
  position: relative;
}
.m3-video-big {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 72px;
  height: 72px;
  border-radius: var(--md-sys-shape-corner-full, 999px);
  background: color-mix(in srgb, var(--md-sys-color-scrim, #000) 55%, transparent);
  --md-icon-button-icon-size: 40px;
}
.m3-video-toast {
  position: absolute;
  inset-block-start: 12px;
  inset-inline: 0;
  margin: auto;
  width: max-content;
  max-width: 90%;
  padding: 8px 16px;
  border-radius: var(--md-sys-shape-corner-full, 999px);
  background: var(--md-sys-color-inverse-surface, #222);
  color: var(--md-sys-color-inverse-on-surface, #fff);
}
.m3-video-end {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--md-sys-color-scrim, #000) 70%, transparent);
}
.m3-video-loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}
@container (max-width: 520px) {
  .m3-video-volume,
  .m3-video-time {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .m3-video-controls {
    transition: none;
  }
}
