.boton-camara {
  align-items: center;
  background-color: #46a33b;
  border: 0;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  display: flex;
  font-size: 16px;
  justify-content: center;
  margin: 20px auto;
  min-height: 48px;
  padding: 14px 22px;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}

.boton-camara:hover {
  background-color: #39892c;
}

.boton-camara:disabled,
#contenedor-camara button:disabled {
  cursor: wait;
  opacity: 0.55;
}

#contenedor-camara {
  align-items: center;
  background: rgba(0, 0, 0, 0.88);
  flex-direction: column;
  height: 100%;
  justify-content: center;
  left: 0;
  padding: 20px;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 10000;
}

#video-container {
  max-width: 680px;
  position: relative;
  width: min(95vw, 680px);
}

#video {
  border-radius: 10px;
  display: block;
  height: auto;
  max-height: 75vh;
  object-fit: contain;
  width: 100%;
}

#marco {
  border: 4px solid rgba(77, 209, 85, 0.9);
  border-radius: 15px;
  box-sizing: border-box;
  height: 78%;
  left: 50%;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 86%;
}

#contenedor-camara button {
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  margin: 16px 6px 0;
  min-height: 46px;
  padding: 10px 20px;
}

#boton-capturar {
  background-color: #28a745;
  color: #fff;
}

#boton-cancelar {
  background-color: #dc3545;
  color: #fff;
}

#loading {
  background: rgba(0, 0, 0, 0.92);
  border-radius: 10px;
  color: #fff;
  font-size: 16px;
  left: 50%;
  max-width: min(88vw, 430px);
  padding: 18px 24px;
  position: fixed;
  text-align: center;
  top: 50%;
  transform: translate(-50%, -50%);
  width: max-content;
  z-index: 10002;
}

.toast-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(92vw, 420px);
  position: fixed;
  right: 20px;
  top: 20px;
  z-index: 10003;
}

.toast {
  align-items: center;
  background: rgba(0, 0, 0, 0.9);
  border-radius: 7px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  color: #fff;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  min-width: 260px;
  opacity: 0;
  padding: 14px 16px;
  transform: translateX(110%);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.toast-success { background-color: #22863a; }
.toast-error { background-color: #c82333; }
.toast-warning { background-color: #ffc107; color: #212529; }
.toast-info { background-color: #117a8b; }
.toast.show { opacity: 1; transform: translateX(0); }
.toast.hide { opacity: 0; transform: translateX(110%); }

.toast .close-btn {
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
  padding: 3px;
}

.btn-siguiente-validar button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

@media (max-width: 768px) {
  #contenedor-camara {
    padding: 10px;
  }

  #marco {
    height: 88%;
    width: 90%;
  }

  .toast-container {
    left: 12px;
    right: 12px;
    top: 12px;
  }

  .toast {
    min-width: 0;
    width: 100%;
  }

}

@media (prefers-reduced-motion: reduce) {
  .boton-camara,
  .toast {
    transition: none;
  }
}
