/* Sound, Skip and Replay on each page's main film (video-controls.js): a tiny row of outlined pills,
   centred at the bottom of the film. The visible pill stays small on phones; the touch area around
   it is 44px tall. Loaded after events.css. */

.vc {
  --vc-ink: #FFF8EE;
  --vc-line: rgba(255, 248, 238, .42);
  --vc-fill: rgba(18, 10, 5, .34);
  --vc-fill-on: rgba(18, 10, 5, .58);
  position: absolute;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  z-index: 4;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
  pointer-events: none; /* touches between the pills still reach the page */
  animation: vc-in .8s ease 1s both;
}
.vc__btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
  height: 30px;
  min-width: 44px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid var(--vc-line);
  border-radius: 999px;
  background: var(--vc-fill);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: var(--vc-ink);
  font: 500 10px/1 "Archivo", system-ui, sans-serif;
  letter-spacing: .16em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .3s ease, border-color .3s ease;
}
.vc__btn[hidden] { display: none; }
.vc__btn:hover { background: var(--vc-fill-on); border-color: var(--vc-ink); }
.vc__btn:focus-visible { outline: 1px solid var(--vc-ink); outline-offset: 2px; }
.vc__icon { display: inline-flex; }

/* Each event's colours, as its other buttons have them. */
.ev .vc {
  --vc-ink: var(--ev-ink);
  --vc-line: color-mix(in srgb, var(--ev-accent) 45%, transparent);
  --vc-fill: color-mix(in srgb, var(--ev-ground) 38%, transparent);
  --vc-fill-on: color-mix(in srgb, var(--ev-accent) 18%, var(--ev-ground));
  top: calc(100svh - env(safe-area-inset-bottom, 0px) - 46px);
  bottom: auto;
}
.ev--welcome-lunch .vc {
  --vc-ink: var(--cv-ink);
  --vc-line: rgba(217, 72, 15, .45);
  --vc-fill: rgba(255, 250, 238, .72);
  --vc-fill-on: rgba(255, 250, 238, .94);
}
.ev--gala-dinner .vc {
  --vc-ink: var(--gl-gold-light);
  --vc-line: rgba(216, 183, 106, .55);
  --vc-fill: rgba(11, 23, 16, .5);
  --vc-fill-on: rgba(11, 23, 16, .75);
}

/* After the film the details fill the screen, so the row moves up above them, clear of them.
   There is nothing left to skip. */
.ev.is-settled .vc { top: calc(env(safe-area-inset-top, 0px) + 86px); animation: vc-in-after .8s ease .7s both; }
.ev.is-settled .vc__btn--skip { display: none; }
/* A film on top of the page keeps the row where it was: the details are not over it. */
.ev--film-top.is-settled .vc { top: calc(100svh - env(safe-area-inset-bottom, 0px) - 46px); }

@keyframes vc-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes vc-in-after { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 720px), (pointer: coarse) {
  .vc__btn { height: 28px; }
  .vc__btn::after { content: ""; position: absolute; inset: -9px 0; }
}

/* Phones: the navigation is a bar along the bottom, so the row sits above it; on Swagatam ENTER is
   already there, so the row sits above that. */
@media (max-width: 720px) {
  .vc { gap: 6px; }
  .vc__btn { padding: 0 10px; letter-spacing: .12em; }
  .j-cinema > .vc { bottom: calc(var(--nav-h, 58px) + env(safe-area-inset-bottom, 0px) + 78px); }
  .ev .vc { top: calc(100svh - var(--nav-h, 58px) - env(safe-area-inset-bottom, 0px) - 44px); }
  .ev.is-settled .vc { top: calc(env(safe-area-inset-top, 0px) + 62px); }
  .ev--film-top.is-settled .vc { top: calc(100svh - var(--nav-h, 58px) - env(safe-area-inset-bottom, 0px) - 44px); }
}

@media (prefers-reduced-motion: reduce) {
  .vc, .ev.is-settled .vc { animation: vc-in .4s ease both; }
  .vc__btn { transition: none; }
}
