/* ============================================================
   DISPATCH — sequence.css
   Prefix: seq-
   Controls video/photo sequence player in the video panel
   ============================================================ */

/* ── Stage — full size container ─────────────────────── */
.seq-stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #1c1917;
}

/* ── Shared layer base ────────────────────────────────── */
.seq-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease;
}

/* ── Active layer — visible ───────────────────────────── */
.seq-layer.seq-active {
  opacity: 1;
}

/* ── Video specific ───────────────────────────────────── */
.seq-video {
  object-fit: cover;
  background: #000;
}

/* ── Photo specific ───────────────────────────────────── */
.seq-photo {
  object-fit: cover;
  object-position: center;
}

/* ── Dip to dark overlay — sits above stage ───────────── */
.seq-dip {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.seq-dip.seq-dip-active {
  opacity: 0.75;
}

/* ── Nav controls — bottom right ─────────────────────── */
.seq-controls {
  position: absolute;
  bottom: 18px;
  right: 24px;
  z-index: 6;
  display: flex;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* Show controls on panel hover or when seq-visible class set */
.video-panel:hover .seq-controls,
.seq-controls.seq-visible {
  opacity: 1;
}

/* ── Individual nav button ────────────────────────────── */
.seq-btn {
  width: 36px;
  height: 36px;
  background: rgba(17, 17, 17, 0.7);
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
  backdrop-filter: blur(4px);
}

.seq-btn:hover {
  background: var(--orange);
  border-color: var(--orange);
}

/* ── Countdown ring — optional photo timer indicator ─── */
.seq-countdown-ring {
  position: absolute;
  bottom: 22px;
  left: 32px;
  z-index: 6;
  width: 28px;
  height: 28px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.seq-countdown-ring.seq-visible {
  opacity: 1;
}

.seq-ring-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.15);
  stroke-width: 3;
}

.seq-ring-fill {
  fill: none;
  stroke: var(--orange);
  stroke-width: 3;
  stroke-linecap: butt;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  transition: stroke-dashoffset 1s linear;
}

/* ── Item counter — e.g. 2 / 4 ───────────────────────── */
.seq-counter {
  position: absolute;
  top: 18px;
  right: 24px;
  z-index: 6;
  font-family: var(--font-mono);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.45);
  letter-spacing: 2px;
}

/* ── Mute button — active state ───────────────────────── */
.seq-btn.seq-muted {
  background: rgba(255, 77, 28, 0.25);
  border-color: var(--orange);
}

/* ── Autoplay prompt overlay ──────────────────────────── */
.seq-autoplay-prompt {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: rgba(17, 17, 17, 0.75);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  backdrop-filter: blur(4px);
  cursor: pointer;
  transition: opacity 0.4s ease;
}

.seq-autoplay-prompt.seq-hidden {
  opacity: 0;
  pointer-events: none;
}

.seq-prompt-icon {
  width: 64px;
  height: 64px;
  background: var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 6px 6px 0 rgba(0,0,0,0.4);
}

.seq-prompt-text {
  font-family: var(--font-label);
  font-size: 10px;
  color: #ffffff;
  letter-spacing: 3px;
}

/* ── Volume group container ───────────────────────────── */
.seq-volume-group {
  position: relative;
  display: flex;
  align-items: center;
}

/* ── Volume popup — vertical slider above button ─────── */
.seq-volume-popup {
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  width: 36px;
  padding: 12px 0 10px;
  background: rgba(17, 17, 17, 0.92);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  transform: translateX(-50%) translateY(6px);
  z-index: 10;
}

.seq-volume-popup.seq-vol-open {
  opacity: 1;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

/* ── Percentage label ─────────────────────────────────── */
.seq-volume-pct {
  font-family: var(--font-mono);
  font-size: 9px;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 1px;
  user-select: none;
}

/* ── Vertical track ───────────────────────────────────── */
.seq-volume-track {
  width: 4px;
  height: 80px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  position: relative;
  cursor: pointer;
}

/* ── Fill — grows upward from bottom ─────────────────── */
.seq-volume-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0%;
  background: var(--orange);
  border-radius: 2px;
  transition: height 0.1s ease;
  pointer-events: none;
}

/* ── Draggable thumb ──────────────────────────────────── */
.seq-volume-thumb {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  background: #ffffff;
  border-radius: 50%;
  bottom: 0%;
  transition: bottom 0.1s ease;
  cursor: grab;
  box-shadow: 0 0 4px rgba(0,0,0,0.4);
}

.seq-volume-thumb:active {
  cursor: grabbing;
}

/* ── Fullscreen — keep controls and overlays working ─── */
.video-panel:-webkit-full-screen .seq-controls,
.video-panel:-moz-full-screen .seq-controls,
.video-panel:fullscreen .seq-controls {
  position: fixed;
  bottom: 18px;
  right: 24px;
  z-index: 2147483647;
}

.video-panel:-webkit-full-screen .vid-label,
.video-panel:-moz-full-screen .vid-label,
.video-panel:fullscreen .vid-label {
  position: fixed;
  bottom: 52px;
  left: 32px;
  z-index: 2147483647;
}

.video-panel:-webkit-full-screen .seq-countdown-ring,
.video-panel:-moz-full-screen .seq-countdown-ring,
.video-panel:fullscreen .seq-countdown-ring {
  position: fixed;
  bottom: 22px;
  left: 32px;
  z-index: 2147483647;
}

/* ── Start overlay ────────────────────────────────────── */
.seq-start-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  background: rgba(17, 17, 17, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: opacity 0.6s ease;
}

.seq-start-overlay.seq-hidden {
  opacity: 0;
  pointer-events: none;
}

.seq-start-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  background: transparent;
  border: 2px solid rgba(255,255,255,0.3);
  padding: 32px 48px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.seq-start-btn:hover {
  border-color: var(--orange);
  background: rgba(255, 77, 28, 0.15);
}

.seq-start-btn span {
  font-family: var(--font-label);
  font-size: 10px;
  color: #ffffff;
  letter-spacing: 3px;
}
