/* Functional base for the player. Each design re-skins it with the variables below
   or by targeting .vp-* classes. */
.vp {
  --vp-fg: #fff;
  --vp-accent: #fff;
  --vp-track: rgba(255,255,255,.25);
  --vp-bar-bg: linear-gradient(to top, rgba(0,0,0,.55), transparent);
  --vp-font: inherit;
  position: relative; width: 100%; aspect-ratio: var(--vp-ratio, 16/9);
  overflow: hidden; background: #000; color: var(--vp-fg); font-family: var(--vp-font);
  outline: none; isolation: isolate; cursor: pointer;
}
.vp:focus-visible { box-shadow: 0 0 0 2px var(--vp-accent); }
.vp-media, .vp-media iframe, .vp-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; display: block; }
.vp-media--vimeo iframe { pointer-events: none; }
.vp-poster { z-index: 0; }
.vp-media { z-index: 1; }
.vp.is-engaged .vp-media { object-fit: contain; background: #000; }

.vp-big {
  position: absolute; z-index: 3; inset: 0; margin: auto; width: max-content; height: max-content;
  display: flex; align-items: center; gap: .6em; padding: .8em 1.2em; border: 0; cursor: pointer;
  font: inherit; color: var(--vp-fg); background: transparent; transition: opacity .3s, transform .3s;
}
.vp-big-icon svg { width: 1.1em; height: 1.1em; display: block; }
.vp.is-engaged .vp-big { opacity: 0; pointer-events: none; transform: scale(.9); }
.vp.is-engaged[data-state="paused"] .vp-big,
.vp.is-engaged[data-state="ended"] .vp-big { opacity: 1; pointer-events: auto; transform: none; }
/* centre pulse when play / pause is toggled */
.vp-flash { position: absolute; z-index: 3; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.45); color: #fff; opacity: 0; pointer-events: none; }
.vp-flash svg { width: 40%; height: 40%; display: block; }
.vp-flash.is-on { animation: vp-flash .6s cubic-bezier(.2,.8,.2,1) both; }
@keyframes vp-flash { 0% { opacity: .9; transform: scale(.7); } 100% { opacity: 0; transform: scale(1.35); } }

.vp-bar {
  position: absolute; z-index: 4; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: .9em;
  padding: 2.2em 1.1em .9em; background: var(--vp-bar-bg); font-size: 13px; font-variant-numeric: tabular-nums;
  opacity: 0; transform: translateY(8px); transition: opacity .35s, transform .35s; pointer-events: none;
}
.vp.is-engaged .vp-bar { pointer-events: auto; }
.vp.is-engaged[data-state="paused"] .vp-bar,
.vp.is-engaged.is-active .vp-bar,
.vp.is-engaged:focus-within .vp-bar { opacity: 1; transform: none; }
.vp-btn { border: 0; background: none; color: inherit; padding: 0; width: 22px; height: 22px; cursor: pointer; flex: none; }
.vp-btn svg { width: 100%; height: 100%; display: block; }
.vp-track { position: relative; flex: 1; height: 18px; cursor: pointer; touch-action: none; }
.vp-track::before, .vp-buf, .vp-prog { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; transform-origin: 0 50%; }
.vp-track::before { background: var(--vp-track); }
.vp-buf { background: var(--vp-track); transform: scaleX(0); }
.vp-prog { background: var(--vp-accent); transform: scaleX(0); }
.vp-head { position: absolute; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--vp-accent); transition: transform .2s; transform: scale(0); }
.vp-track:hover .vp-head { transform: scale(1); }
.vp-hover { position: absolute; bottom: 100%; transform: translateX(-50%); opacity: 0; transition: opacity .2s; pointer-events: none; font-size: 11px; padding: 2px 6px; background: var(--vp-accent); color: #000; }
.vp-track:hover .vp-hover { opacity: 1; }
.vp-time { min-width: 3.2em; }
.vp-dur { text-align: right; }
.vp--loop { cursor: default; }
@media (max-width: 640px) { .vp-bar { gap: .6em; padding: 1.6em .7em .6em; font-size: 12px; } }
