/* Prévia: a "tela da urna" com o canvas e a barra de ajuste das fotos. */

.stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.screen {
  display: inline-block;
  max-width: 100%;
  background: var(--bezel);
  border-radius: 16px;
  padding: 12px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 12px 30px rgba(10, 20, 30, 0.18);
  transition: box-shadow 0.15s;
}

.screen.drop {
  box-shadow:
    inset 0 0 0 3px var(--confirma),
    0 12px 30px rgba(10, 20, 30, 0.18);
}

#cv {
  display: block;
  max-width: 100%;
  max-height: min(50vh, 560px);
  width: auto;
  height: auto;
  border-radius: 6px;
  background: #3a3e44;
  touch-action: manipulation;
  cursor: pointer;
}

#cv.has-photo {
  touch-action: none;
  cursor: grab;
}

#cv.has-photo:active {
  cursor: grabbing;
}

@media (min-width: 900px) {
  #cv {
    max-height: calc(100vh - 210px);
  }
}

/* barra de ajuste: zoom e centralizar da foto selecionada */
.adjust {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  font-size: 14px;
}

.zoom {
  flex: 1;
  min-width: 140px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.zoom input {
  flex: 1;
  accent-color: var(--confirma);
}

.adjust-hint {
  flex-basis: 100%;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.adjust.empty .zoom,
.adjust.empty .btn-corrige {
  display: none;
}

@media (max-width: 520px) {
  .adjust .zoom {
    min-width: 0;
    flex: 1 1 120px;
  }
}
