/* Session replay player */

.player-grid { display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 16px; align-items: start; }

/* The findings list runs long. Pin the player so you can read a finding and
   still see the moment it's describing. */
.player-grid > div:first-child { position: sticky; top: 70px; }

@media (max-width: 1100px) {
  .player-grid { grid-template-columns: 1fr; }
  .player-grid > div:first-child { position: static; }
}

.stage-wrap {
  background: #14161a;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
}

.stage {
  position: relative;
  height: 62vh;
  min-height: 400px;
  overflow: hidden;
  background: #0f1115;
}
.stage .replayer-wrapper { transform-origin: top left; position: absolute; top: 0; left: 0; }
.stage iframe { border: 0; background: #fff; }
.stage .replayer-mouse { z-index: 4; }
.stage-empty {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #7c828e; font-size: 14px; text-align: center; padding: 30px;
}

.gaze-layer { position: absolute; inset: 0; pointer-events: none; z-index: 6; }

/* Movable webcam overlay */
.face-overlay {
  position: absolute;
  right: 16px;
  bottom: 124px; /* clear of the transport bar, which is ~108px tall */
  width: 210px;
  z-index: 8;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.16);
  touch-action: none;
}
.face-overlay video { display: block; width: 100%; height: auto; }
.face-overlay .fbar {
  position: absolute; top: 0; left: 0; right: 0; height: 22px;
  background: linear-gradient(rgba(0,0,0,.6), transparent);
  cursor: grab; display: flex; align-items: center; gap: 6px; padding: 0 7px;
  font-size: 10.5px; color: rgba(255,255,255,.8); font-weight: 600; letter-spacing: .04em;
  opacity: 0; transition: opacity .15s;
}
.face-overlay:hover .fbar { opacity: 1; }
.face-overlay.dragging .fbar { opacity: 1; cursor: grabbing; }
.face-overlay .fresize {
  position: absolute; right: 0; bottom: 0; width: 16px; height: 16px; cursor: nwse-resize;
  background: linear-gradient(135deg, transparent 50%, rgba(255,255,255,.45) 50%);
}
.face-overlay .fhide { margin-left: auto; cursor: pointer; background: none; border: 0; color: #fff; padding: 0 2px; font-size: 12px; }
.face-missing { padding: 18px; color: #8b909a; font-size: 12.5px; text-align: center; }

/* Transport */
.transport { background: #1b1e24; padding: 10px 14px 12px; color: #e8eaed; }
.transport .row1 { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.transport button {
  background: rgba(255,255,255,.1); border: 0; color: #fff; border-radius: 8px;
  padding: 7px 12px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.transport button:hover { background: rgba(255,255,255,.18); }
.transport button.on { background: #f2544b; }
.transport .time { font-family: ui-monospace, monospace; font-size: 12.5px; color: #aeb4bf; min-width: 96px; }
.transport select { width: auto; background: rgba(255,255,255,.1); border: 0; color: #fff; padding: 6px 8px; font-size: 13px; }

.scrub { position: relative; height: 34px; cursor: pointer; user-select: none; }
.heat { position: absolute; left: 0; right: 0; top: 2px; height: 16px; border-radius: 4px; overflow: hidden; background: #2a2e36; display: flex; }
.heat i { display: block; height: 100%; flex: 1 1 0; }
.track { position: absolute; left: 0; right: 0; top: 22px; height: 4px; border-radius: 999px; background: #343943; }
.track .fill { position: absolute; left: 0; top: 0; bottom: 0; background: #f2544b; border-radius: 999px; }
.playhead { position: absolute; top: 0; width: 2px; height: 26px; background: #fff; box-shadow: 0 0 6px rgba(255,255,255,.7); pointer-events: none; }
.marks { position: absolute; left: 0; right: 0; top: 20px; height: 8px; pointer-events: none; }
.marks i { position: absolute; width: 6px; height: 6px; border-radius: 50%; transform: translateX(-3px); }
.taskband { position: absolute; left: 0; right: 0; top: 0; height: 2px; }
.taskband i { position: absolute; height: 100%; background: rgba(255,255,255,.5); }

/* Sidebar */
.side .panel { margin-bottom: 14px; }
.side .panel > header { padding: 11px 14px; }
.side .panel > .body { padding: 13px 14px; }

.attempt { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 9px; cursor: pointer; }
.attempt:hover { background: #fafbfc; }
.attempt.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.attempt .t { font-weight: 600; font-size: 14px; }
.attempt .m { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; display: flex; gap: 10px; flex-wrap: wrap; }

.ticker { max-height: 340px; overflow-y: auto; font-size: 13px; }
.ticker .ev { display: flex; gap: 9px; padding: 5px 14px; cursor: pointer; border-bottom: 1px solid #f4f5f6; }
.ticker .ev:hover { background: #f7f8fa; }
.ticker .ev.now { background: #fff4e8; }
.ticker .ev .ts { font-family: ui-monospace, monospace; font-size: 11.5px; color: var(--ink-3); min-width: 46px; }
/* Text labels, not emoji — plenty of Linux desktops have no emoji font and
   would render the whole column as tofu boxes. */
.ticker .ev .ic {
  width: 42px; text-align: right; font-size: 9.5px; font-weight: 700;
  letter-spacing: .05em; color: var(--ink-3); padding-top: 3px;
}
.ticker .ev.rage .ic { color: var(--bad); }
.ticker .ev.pause .ic { color: var(--warn); }
.ticker .ev .tx { flex: 1; min-width: 0; }
.ticker .ev.pause .tx { color: var(--warn); font-style: italic; }
.ticker .ev.rage .tx { color: var(--bad); font-weight: 600; }
.ticker .ev.dead .tx { color: var(--bad); }

.moment { border-left: 3px solid var(--line); padding: 3px 0 3px 12px; margin-bottom: 13px; cursor: pointer; }
.moment:hover .what { text-decoration: underline; }
.moment.high { border-left-color: var(--bad); }
.moment.medium { border-left-color: var(--warn); }
.moment.low { border-left-color: var(--ink-3); }
.moment .what { font-weight: 600; font-size: 13.5px; }
.moment .ev { color: var(--ink-3); font-size: 12.5px; margin-top: 2px; }
.moment .t { font-family: ui-monospace, monospace; font-size: 11.5px; color: var(--ink-3); }

.legend { display: flex; gap: 12px; font-size: 11.5px; color: var(--ink-3); margin-top: 8px; flex-wrap: wrap; }
.legend span { display: flex; align-items: center; gap: 4px; }
.legend i { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
