/* Edithor 306 – video player (video-edit). Colours can be changed per site via the custom properties below. */
.wms-video {
  --wms-video-akcent: #fff;
  --wms-video-pozadi: #000;
  --wms-video-lista: linear-gradient(transparent, rgba(0, 0, 0, .72));
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--wms-video-pozadi);
  color: #fff;
  font: 500 13px/1 system-ui, -apple-system, "Segoe UI", sans-serif;
}
.wms-video video { display: block; width: 100%; height: auto; }
.wms-video[data-wms-video="youtube"], .wms-video[data-wms-video="vimeo"] { aspect-ratio: 16 / 9; }
.wms-video-iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Background video: the element's own size decides, the video covers it */
.wms-video[data-wms-pozadi] { background: transparent; }
.wms-video[data-wms-pozadi] video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }

/* YouTube / Vimeo before playing */
.wms-video-start { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; background: var(--wms-video-pozadi); cursor: pointer; }
.wms-video-start img { display: block; width: 100%; height: 100%; object-fit: cover; }
.wms-video-start:focus-visible { outline: 3px solid var(--wms-video-akcent); outline-offset: -3px; }

/* Big play button (both kinds) */
.wms-video-ikona, .wms-video-tl.wms-video-velke {
  position: absolute; left: 50%; top: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px; padding: 0;
  border: 0; border-radius: 50%; background: rgba(0, 0, 0, .55); color: var(--wms-video-akcent);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); cursor: pointer; transition: transform .15s, background .15s, opacity .2s;
}
.wms-video-ikona::after { content: ""; position: absolute; inset: 0; margin: auto; width: 22px; height: 26px; background: var(--wms-video-akcent); clip-path: polygon(0 0, 100% 50%, 0 100%); transform: translateX(3px); }
.wms-video-start:hover .wms-video-ikona, .wms-video-tl.wms-video-velke:hover { transform: scale(1.06); background: rgba(0, 0, 0, .7); }
.wms-video-velke { display: flex; align-items: center; justify-content: center; }
.wms-video-tl.wms-video-velke svg { width: 30px; height: 30px; transform: translateX(2px); }
.wms-video-velke:focus-visible { outline: 3px solid var(--wms-video-akcent); outline-offset: 3px; }
.wms-video:not(.wms-video-stop) .wms-video-velke, .wms-video.wms-video-ceka .wms-video-velke { opacity: 0; pointer-events: none; }

/* Control bar */
.wms-video-lista {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 4px;
  padding: 28px 10px 8px; background: var(--wms-video-lista); transition: opacity .25s, transform .25s;
}
.wms-video.wms-video-stop:not(.wms-video-hraje) .wms-video-lista { opacity: 0; transform: translateY(6px); pointer-events: none; }
.wms-video.wms-video-skryte { cursor: none; }
.wms-video.wms-video-skryte .wms-video-lista { opacity: 0; transform: translateY(6px); }
.wms-video-tl {
  display: inline-flex; flex: none; align-items: center; justify-content: center; width: 36px; height: 36px; margin: 0; padding: 0;
  border: 0; border-radius: 8px; background: none; color: #fff; cursor: pointer;
}
.wms-video-tl svg { width: 21px; height: 21px; }
.wms-video-tl:hover { background: rgba(255, 255, 255, .14); }
.wms-video-tl:focus-visible { outline: 2px solid var(--wms-video-akcent); outline-offset: 1px; }
.wms-video-titulky[aria-pressed="true"] { color: var(--wms-video-akcent); box-shadow: inset 0 -2px 0 var(--wms-video-akcent); }
.wms-video-cas { flex: none; min-width: 36px; padding: 0 2px; font-variant-numeric: tabular-nums; text-align: center; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }

/* Range inputs: seek bar and volume */
.wms-video-posun, .wms-video-hlasitost {
  --wms-video-prehrano: 0%;
  --wms-video-nacteno: 0%;
  -webkit-appearance: none; appearance: none; height: 18px; margin: 0; padding: 0; background: none; cursor: pointer;
}
.wms-video-posun { flex: 1; min-width: 40px; }
.wms-video-hlasitost { width: 72px; flex: none; }
.wms-video-posun::-webkit-slider-runnable-track, .wms-video-hlasitost::-webkit-slider-runnable-track {
  height: 4px; border-radius: 4px;
  background: linear-gradient(to right, var(--wms-video-akcent) var(--wms-video-prehrano), rgba(255, 255, 255, .45) var(--wms-video-prehrano), rgba(255, 255, 255, .45) var(--wms-video-nacteno), rgba(255, 255, 255, .22) var(--wms-video-nacteno));
}
.wms-video-posun::-moz-range-track, .wms-video-hlasitost::-moz-range-track {
  height: 4px; border-radius: 4px;
  background: linear-gradient(to right, var(--wms-video-akcent) var(--wms-video-prehrano), rgba(255, 255, 255, .45) var(--wms-video-prehrano), rgba(255, 255, 255, .45) var(--wms-video-nacteno), rgba(255, 255, 255, .22) var(--wms-video-nacteno));
}
.wms-video-posun::-webkit-slider-thumb, .wms-video-hlasitost::-webkit-slider-thumb { -webkit-appearance: none; width: 13px; height: 13px; margin-top: -4.5px; border: 0; border-radius: 50%; background: var(--wms-video-akcent); box-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
.wms-video-posun::-moz-range-thumb, .wms-video-hlasitost::-moz-range-thumb { width: 13px; height: 13px; border: 0; border-radius: 50%; background: var(--wms-video-akcent); box-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
.wms-video-posun:focus-visible, .wms-video-hlasitost:focus-visible { outline: 2px solid var(--wms-video-akcent); outline-offset: 2px; border-radius: 4px; }

/* Subtitle menu */
.wms-video-menu { position: absolute; right: 52px; bottom: 52px; z-index: 3; min-width: 150px; padding: 5px; border-radius: 10px; background: rgba(20, 20, 24, .94); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.wms-video-menu[hidden] { display: none; }
.wms-video-menu button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: none; color: #fff; font: inherit; text-align: left; cursor: pointer; }
.wms-video-menu button::before { content: ""; width: 7px; height: 7px; border-radius: 50%; }
.wms-video-menu button[aria-checked="true"]::before { background: var(--wms-video-akcent); }
.wms-video-menu button:hover, .wms-video-menu button:focus-visible { background: rgba(255, 255, 255, .12); outline: 0; }

/* Loading and errors */
.wms-video-nacitani { position: absolute; left: 50%; top: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border: 3px solid rgba(255, 255, 255, .3); border-top-color: #fff; border-radius: 50%; opacity: 0; pointer-events: none; animation: wms-video-toc .8s linear infinite; transition: opacity .2s; }
.wms-video.wms-video-ceka .wms-video-nacitani { opacity: 1; }
.wms-video-chyba { position: absolute; left: 50%; top: 50%; z-index: 2; max-width: 80%; padding: 10px 14px; border-radius: 8px; background: rgba(0, 0, 0, .75); transform: translate(-50%, -50%); text-align: center; line-height: 1.4; }
.wms-video-chyba[hidden] { display: none; }
@keyframes wms-video-toc { to { transform: rotate(360deg); } }

/* Full screen */
.wms-video.wms-video-celaobrazovka, .wms-video:fullscreen { display: flex; align-items: center; width: 100%; height: 100%; }
.wms-video.wms-video-celaobrazovka video, .wms-video:fullscreen video { width: 100%; height: 100%; object-fit: contain; }

@media (max-width: 560px) {
  .wms-video-hlasitost { display: none; }
  .wms-video-lista { gap: 0; padding: 22px 4px 4px; }
  .wms-video-tl.wms-video-velke, .wms-video-ikona { width: 60px; height: 60px; margin: -30px 0 0 -30px; }
}
@media (hover: none) { .wms-video-hlasitost { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .wms-video-lista, .wms-video-velke, .wms-video-ikona { transition: none; }
  .wms-video-nacitani { animation-duration: 2s; }
}
