/* PDKS-specific layout, camera verification & table helpers */

.pdks-main {
  max-width: 520px;
}

.pdks-main-nav {
  padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)) !important;
}

.pdks-clock {
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.pdks-records {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pdks-records li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

.pdks-records li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

/* Camera verification frame — sized to fit cleanly on mobile viewports */
.cam {
  position: relative;
  border-radius: 0.875rem;
  overflow: hidden;
  background: #000000;
  border: 1px solid var(--border);
  height: 52vh;
  max-height: 440px;
  min-height: 260px;
}

.cam video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.cam video.no-mirror {
  transform: none;
}

.pdks-cam-select {
  max-width: 210px;
}

.oval {
  position: absolute;
  inset: 11% 20% 20%;
  border: 2px dashed rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  pointer-events: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.oval.step-turn_left {
  border-left: 4px solid var(--brand-focus);
  box-shadow: -8px 0 24px rgba(105, 165, 58, 0.45);
}

.oval.step-turn_right {
  border-right: 4px solid var(--brand-focus);
  box-shadow: 8px 0 24px rgba(105, 165, 58, 0.45);
}

.oval.step-look_up {
  border-top: 4px solid var(--brand-focus);
  box-shadow: 0 -8px 24px rgba(105, 165, 58, 0.45);
}

.oval.step-look_down {
  border-bottom: 4px solid var(--brand-focus);
  box-shadow: 0 8px 24px rgba(105, 165, 58, 0.45);
}

.oval.is-match {
  border: 3px solid #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.25);
}

.cam-cue {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  color: #ffffff;
  background: rgba(9, 9, 11, 0.72);
  border: 2px solid var(--brand-focus);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.cam-cue.is-match {
  background: rgba(34, 197, 94, 0.92);
  border-color: #ffffff;
}

.cam-cue.cue-turn_left {
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  animation: pdksNudgeLeft 1s ease-in-out infinite;
}

.cam-cue.cue-turn_right {
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  animation: pdksNudgeRight 1s ease-in-out infinite;
}

.cam-cue.cue-look_up {
  top: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  animation: pdksNudgeUp 1s ease-in-out infinite;
}

.cam-cue.cue-look_down {
  bottom: 3.75rem;
  left: 50%;
  transform: translateX(-50%);
  animation: pdksNudgeDown 1s ease-in-out infinite;
}

.cam-cue.cue-neutral {
  top: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
}

@keyframes pdksNudgeLeft {
  0%, 100% { transform: translate(0, -50%); }
  50% { transform: translate(-6px, -50%); }
}

@keyframes pdksNudgeRight {
  0%, 100% { transform: translate(0, -50%); }
  50% { transform: translate(6px, -50%); }
}

@keyframes pdksNudgeUp {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, -6px); }
}

@keyframes pdksNudgeDown {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 6px); }
}

.instruction {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1rem;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(transparent, rgba(9, 9, 11, 0.88));
}

.steps {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.steps span {
  width: 2.25rem;
  height: 0.375rem;
  border-radius: 9999px;
  background: var(--border);
  transition: background-color 150ms ease;
}

.steps span.done {
  background: var(--brand);
}

.steps span.cur {
  background: var(--brand-focus);
}

/* Admin helpers */
.kpi-val {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  cursor: pointer;
}

.flags-col {
  font-size: 0.75rem;
  color: var(--warn-fg);
  min-width: 180px;
  max-width: 320px;
}

.detail-wrap {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  word-break: break-word;
  min-width: 220px;
  max-width: 380px;
}
