/* SPDX-License-Identifier: GPL-3.0-only
   Copyright (c) 2026 Fin. Additional terms under GPL section 7 apply: see LICENSE-ADDITIONAL-TERMS. */
.gallery-ctl {
  position: sticky;
  bottom: 32px;
  z-index: 1;
  width: max-content;
  margin: 48px auto 0;
  display: flex;
  gap: 16px;
}
.gallery-ctl.wait {
  opacity: 0;
  pointer-events: none;
}
.dotnav,
.playpause {
  position: relative;
  height: 56px;
}
/* the glass is its own box so the arrival can size it without moving the dots */
.dotnav::before,
.playpause::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 100%;
  height: 100%;
  translate: -50% -50%;
  border-radius: 28px;
  background: light-dark(rgb(232 232 237 / 0.72), rgb(42 42 45 / 0.72));
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
}
/* dots sit against the right edge: the bar's width is the dots' at rest, with one of them long */
.dotnav {
  --dot-w: 48px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  width: calc(24px + var(--dot-w) + var(--n, 3) * 24px);
  padding: 0 24px;
}
.dots {
  position: relative;
  display: flex;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.dots > span {
  display: flex;
}
/* --k is 1 on the slide in view and falls to 0 one slide away */
.dot {
  position: relative;
  width: calc(8px + var(--k, 0) * (var(--dot-w) - 8px));
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  background: light-dark(rgb(0 0 0 / 0.42), rgb(255 255 255 / 0.36));
  transition: width 60ms linear;
}
.dot::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--dot-w);
  border-radius: inherit;
  background: light-dark(rgb(0 0 0 / 0.8), #f5f5f7);
  translate: calc(-7px - var(--dot-w)) 0;
}
.playpause {
  width: 56px;
  display: grid;
  place-items: center;
  color: light-dark(var(--ink), #f5f5f7);
}
.playpause::before {
  transition: background-color 100ms linear;
}
.playpause:hover::before {
  background: light-dark(rgb(210 210 215 / 0.72), rgb(84 84 88 / 0.72));
}
.playpause .ico {
  position: relative;
  width: 28px;
  height: 28px;
}
@media (max-width: 734px) {
  .gallery-ctl {
    bottom: 20px;
    margin-top: 32px;
  }
  .dotnav {
    --dot-w: 32px;
  }
}

