/* The screenshots' light/dark switch (shared/shot_theme.js): a small pill with a sun and a crescent
   moon, above the picture's top-right corner. A page sets its colours with these variables; the
   defaults suit a dark page.
     --sw-bg, --sw-line      the pill and its edge
     --sw-ink                an icon not chosen
     --sw-on-bg, --sw-on-ink the chosen half
   A slot inside a device frame (.dv) hangs above the frame's top-right corner and takes no room;
   a slot the script adds itself (no slot written) is a row of its own above the pictures. */

.shot-switch-slot { display: contents; }
.dv > .shot-switch-slot,
.shot-switch-slot--float {
  display: block;
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  z-index: 3;
  line-height: 0;
}
.shot-switch-slot--top {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 10px;
  line-height: 0;
}

.shot-switch {
  --sw-bg: rgba(245, 241, 231, 0.06);
  --sw-line: rgba(245, 241, 231, 0.16);
  --sw-ink: #a9a395;
  --sw-on-bg: rgba(254, 188, 46, 0.2);
  --sw-on-ink: #febc2e;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 999px;
  background: var(--sw-bg);
  box-shadow: inset 0 0 0 1px var(--sw-line);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.shot-switch button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 22px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--sw-ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.2s ease, color 0.2s ease;
}
/* A finger's room, without making the pill larger. */
.shot-switch button::after { content: ""; position: absolute; inset: -11px -4px; }
.shot-switch button:hover { color: var(--sw-on-ink); }
.shot-switch button[aria-pressed="true"] { background: var(--sw-on-bg); color: var(--sw-on-ink); cursor: default; }
.shot-switch button:focus-visible { outline: 2px solid var(--sw-on-ink); outline-offset: 1px; }
.shot-switch svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.shot-switch .shot-switch-dark svg { fill: currentColor; stroke-width: 1.2; }
.shot-switch .shot-switch-light svg circle { fill: currentColor; }
/* The twin fades in over the picture, then takes its place. */
.dv-screen { position: relative; }
.dv-screen > img.shot-next,
img.shot-next {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  opacity: 0;
  transition: opacity 0.24s ease;
  pointer-events: none;
}
img.shot-next.is-in { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  img.shot-next { transition: none; }
}
@media print { .shot-switch { display: none; } }
