.camera-box {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  overflow: hidden;
  background: #111827;
}

#camera-video {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.camera-actions {
  margin-top: 10px;
}

.uploaded-thumbs {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
}

body.is-step-2 .uploaded-thumbs {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  padding-bottom: 4px;
  scroll-snap-type: x mandatory;
}

body.is-step-2 .uploaded-thumbs::-webkit-scrollbar {
  height: 6px;
}

body.is-step-2 .uploaded-thumbs li {
  flex: 0 0 min(68vw, 220px);
  scroll-snap-align: start;
}

.uploaded-thumbs li {
  border: 1px solid #d1d5db;
  border-radius: 12px;
  overflow: hidden;
  background: #f9fafb;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}

.uploaded-thumb-item {
  display: grid;
  grid-template-rows: auto auto;
}

.uploaded-thumbs img {
  width: 100%;
  height: 108px;
  object-fit: cover;
  display: block;
}

.uploaded-thumb-preview {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  display: block;
}

.uploaded-thumb-footer {
  display: grid;
  gap: 6px;
  padding: 8px;
  border-top: 1px solid #e5e7eb;
  background: #fff;
}

.uploaded-thumb-name {
  font-size: 12px;
  color: #334155;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.uploaded-thumb-delete {
  border: 0;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 12px;
  background: #ef4444;
  color: #fff;
  cursor: pointer;
  width: 100%;
}

.uploaded-thumb-delete:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.photo-modal[hidden] {
  display: none !important;
}

.photo-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
}

.photo-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
}

.photo-modal-dialog {
  position: relative;
  width: min(92vw, 620px);
  max-height: 90vh;
  border-radius: 16px;
  overflow: hidden;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 20px 40px rgba(2, 6, 23, 0.4);
}

.photo-modal-dialog img {
  width: 100%;
  max-height: 88vh;
  object-fit: contain;
  display: block;
}

.photo-modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  border: 0;
  border-radius: 999px;
  width: 38px;
  height: 38px;
  font-size: 26px;
  line-height: 1;
  background: rgba(15, 23, 42, 0.78);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.photo-modal-prev {
  left: 8px;
}

.photo-modal-next {
  right: 8px;
}

.photo-modal-nav[hidden] {
  display: none;
}

.photo-modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 0;
  border-radius: 999px;
  width: 34px;
  height: 34px;
  font-size: 24px;
  line-height: 1;
  background: rgba(15, 23, 42, 0.8);
  color: #fff;
  cursor: pointer;
}
