/* Shared camera stage: switch button + freeze reveal (palm + hong-heng) */

.cam-stage {
  position: relative;
}

.cam-stage video,
.cam-stage .cam-freeze,
.cam-stage .cam-overlay {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cam-stage .cam-freeze,
.cam-stage .cam-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cam-stage .cam-freeze[hidden] {
  display: none !important;
}

.cam-stage.is-frozen video {
  opacity: 0;
  visibility: hidden;
}

.cam-switch-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 2px solid #f0d878;
  background: #0b1026;
  color: #f0d878;
  font-family: var(--font-display, "Chakra Petch", sans-serif);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.62);
  cursor: pointer;
}

.cam-switch-btn[hidden] {
  display: none !important;
}

.cam-switch-btn:hover:not(:disabled),
.cam-switch-btn:focus-visible {
  background: #141b33;
  color: #fff4c8;
  outline: 2px solid #f0d878;
  outline-offset: 2px;
}

.cam-switch-btn:disabled {
  cursor: not-allowed;
  color: #c8cdd6;
  border-color: #8b929e;
  background: rgba(11, 16, 38, 0.88);
  opacity: 0.92;
}

.cam-switch-btn svg {
  flex-shrink: 0;
}

.cam-reveal-live {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  z-index: 4;
  max-height: 38%;
  overflow: auto;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(240, 216, 120, 0.45);
  background: rgba(7, 11, 24, 0.88);
  color: #f3ede0;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.cam-reveal-live[hidden] {
  display: none !important;
}

.cam-reveal-live .cam-reveal-kicker {
  margin: 0 0 0.25rem;
  color: #f0d878;
  font-family: var(--font-display, "Chakra Petch", sans-serif);
  font-weight: 700;
  font-size: 0.92rem;
}

.cam-reveal-live p {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
}

.result-list .cam-line-in {
  animation: cam-line-in 0.45s ease both;
}

@keyframes cam-line-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .result-list .cam-line-in,
  .cam-reveal-live {
    animation: none !important;
    transform: none !important;
  }
}

@media print {
  html.samta-camera-page .cam-stage,
  html.samta-camera-page .cam-switch-btn,
  html.samta-camera-page .cam-reveal-live,
  html.samta-camera-page video,
  html.samta-camera-page canvas {
    visibility: hidden !important;
  }
}

@media (max-width: 400px) {
  .cam-switch-btn {
    font-size: 0.78rem;
    padding: 0.38rem 0.6rem;
  }

  .cam-reveal-live {
    font-size: 0.82rem;
    padding: 0.55rem 0.65rem;
    max-height: 36%;
  }

  .cam-reveal-live p {
    font-size: 0.82rem;
  }
}
