/* workstream-o.css: before/after slider, slideshow, timeline scrubber.
   Dark, offline, no external assets. Add with:
   <link rel="stylesheet" href="workstream-o.css">
   (Parent owns the ?v= versioning; do not hand-edit ?v= strings here.) */

/* ---------- 1. Before/after slider ---------- */
.ba-host {
  position: relative;
  overflow: hidden;
  background: #000;
  touch-action: none;          /* drag owns touch; the editor panel keeps the rest */
  user-select: none;
  -webkit-user-select: none;
  cursor: ew-resize;
  --split: 50%;
}
.ba-host:focus-visible { outline: 2px solid #8ecae6; outline-offset: -2px; }
.ba-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
  pointer-events: none;
}
.ba-edit { z-index: 1; }
.ba-orig {
  z-index: 2;
  /* Original visible LEFT of the divider, edited visible RIGHT. */
  clip-path: inset(0 calc(100% - var(--split)) 0 0);
}
.ba-divider {
  position: absolute; top: 0; bottom: 0; left: 0; z-index: 3;
  width: 2px; background: rgba(255,255,255,.92);
  box-shadow: 0 0 8px rgba(0,0,0,.6);
  left: 0;
  /* transform (translate3d px) is set from JS on each move: GPU, no layout */
  will-change: transform;
  pointer-events: none;
}
.ba-knob {
  position: absolute; top: 50%; left: 50%;
  width: 44px; height: 44px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(20,20,26,.85);
  border: 2px solid rgba(255,255,255,.92);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,.55);
}
.ba-knob svg { width: 22px; height: 22px; }
.ba-chip {
  position: absolute; top: 10px; z-index: 4;
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(255,255,255,.92);
  background: rgba(0,0,0,.55);
  padding: 4px 10px; border-radius: 999px;
  pointer-events: none;
}
.ba-chip-orig { left: 10px; }
.ba-chip-edit { right: 10px; }
/* Host used inside F's editor stage (see EDIT-PAIRS.md). */
.pp-ba-host { position: absolute; inset: 12px; z-index: 5; border-radius: 6px; }
.pp-ed-stage { position: relative; }

/* ---------- 2. Slideshow ---------- */
.ss-overlay {
  position: fixed; inset: 0; z-index: 1200;
  background: #000;
  overflow: hidden;
  touch-action: pan-y;
}
.ss-layer {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity .7s ease;
  pointer-events: none;
}
.ss-layer.on { opacity: 1; pointer-events: auto; }
.ss-img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
  will-change: transform;
}
/* Ken Burns drift variants: slow scale + small translate. Duration is set
   inline per slide (interval + fade). GPU-friendly transform only. */
@keyframes ss-kb1 { from { transform: scale(1.03) translate(0, 0); } to { transform: scale(1.14) translate(1.6%, -1.2%); } }
@keyframes ss-kb2 { from { transform: scale(1.14) translate(-1.6%, 1%); } to { transform: scale(1.03) translate(0, 0); } }
@keyframes ss-kb3 { from { transform: scale(1.05) translate(1.2%, 1%); } to { transform: scale(1.15) translate(-1.4%, -1%); } }
@keyframes ss-kb4 { from { transform: scale(1.12) translate(0, -1.4%); } to { transform: scale(1.04) translate(1%, 1.2%); } }
.ss-img.kb1 { animation: ss-kb1 linear forwards; }
.ss-img.kb2 { animation: ss-kb2 linear forwards; }
.ss-img.kb3 { animation: ss-kb3 linear forwards; }
.ss-img.kb4 { animation: ss-kb4 linear forwards; }
@media (prefers-reduced-motion: reduce) {
  .ss-img.kb1, .ss-img.kb2, .ss-img.kb3, .ss-img.kb4 { animation: none !important; }
  .ss-layer { transition: none; }
}
.ss-paused {
  position: absolute; top: 18px; left: 50%;
  transform: translateX(-50%);
  color: #fff; background: rgba(0,0,0,.6);
  border: 1px solid rgba(255,255,255,.25);
  font-size: 13px; letter-spacing: .1em; text-transform: uppercase;
  padding: 6px 14px; border-radius: 999px;
  pointer-events: none;
}
.ss-controls {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(0,0,0,.75), rgba(0,0,0,0));
}
.ss-btn {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.08); color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.ss-btn svg { width: 20px; height: 20px; }
.ss-btn:active { background: rgba(255,255,255,.2); }
.ss-count { color: rgba(255,255,255,.85); font-size: 13px; min-width: 64px; text-align: center; }
.ss-segs { display: flex; gap: 6px; margin-left: auto; }
.ss-seg {
  border: 1px solid rgba(255,255,255,.3);
  background: transparent; color: rgba(255,255,255,.8);
  font-size: 12px; padding: 8px 12px; border-radius: 999px;
  cursor: pointer;
}
.ss-seg.active { background: #fff; color: #000; border-color: #fff; }
.ss-close { margin-left: 4px; }

/* ---------- 3. Timeline scrubber ---------- */
.ts-rail {
  position: absolute; top: 0; bottom: 0; right: 0;
  width: 34px; z-index: 30;
  touch-action: none;          /* drag owns touch on the rail only */
  cursor: ns-resize;
  background: linear-gradient(to left, rgba(0,0,0,.28), rgba(0,0,0,0));
}
.ts-tick {
  position: absolute; right: 0;
  width: 34px; height: 0;
  border-top: 1px solid rgba(255,255,255,.35);
}
.ts-tick-label {
  position: absolute; right: 6px; top: -8px;
  font-size: 9px; line-height: 1;
  color: rgba(255,255,255,.75);
  text-shadow: 0 1px 3px rgba(0,0,0,.8);
  pointer-events: none;
  writing-mode: horizontal-tb;
}
.ts-bubble {
  position: absolute; right: 40px; z-index: 31;
  background: rgba(20,20,26,.92);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff; font-size: 15px; font-weight: 600;
  padding: 8px 14px; border-radius: 10px;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(0,0,0,.5);
}
.ts-rail:focus-visible { outline: 2px solid #8ecae6; outline-offset: -2px; }
/* Play buttons added to the lightbox top bar and the library header. */
.lb-play {
  background: transparent; border: none; color: #fff;
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.lb-play svg { width: 20px; height: 20px; }
.lb-play:active { background: rgba(255,255,255,.15); }
#lib-play { margin-left: auto; }
.pagetitle { display: flex; align-items: center; gap: 10px; }
