/* Lector de códigos ([lector_codigos]) y panel post-OCR */

.lc-flash {
	margin: 1rem 0;
}

.lc-formulario label {
	display: inline-block;
	margin-top: 0.5rem;
}

.lc-formulario input[type="file"],
.lc-formulario input[type="date"] {
	max-width: 100%;
}

/* Subida + escaneo: estado de espera */
.lc-upload-block {
	position: relative;
}

.lc-upload-overlay {
	display: none;
	position: absolute;
	inset: 0;
	z-index: 5;
	align-items: center;
	justify-content: center;
	padding: 1.25rem;
	box-sizing: border-box;
	background: rgba(255, 255, 255, 0.88);
	backdrop-filter: blur(2px);
	border-radius: 4px;
	text-align: center;
}

.lc-upload-block.is-processing .lc-upload-overlay {
	display: flex;
}

.lc-upload-overlay-inner {
	max-width: 22rem;
}

.lc-upload-msg {
	margin: 0 0 0.5rem;
	font-size: 1rem;
	font-weight: 600;
	color: #111827;
	line-height: 1.35;
}

.lc-upload-hint {
	margin: 0;
	font-size: 0.875rem;
	color: #4b5563;
	line-height: 1.4;
}

.lc-upload-spinner {
	display: block;
	width: 2.5rem;
	height: 2.5rem;
	margin: 0 auto 1rem;
	border: 3px solid #e5e7eb;
	border-top-color: #83bc2f;
	border-radius: 50%;
	animation: lc-upload-spin 0.75s linear infinite;
}

@media (prefers-reduced-motion: reduce) {
	.lc-upload-spinner {
		animation: none;
		border-top-color: #83bc2f;
		opacity: 0.85;
	}
}

@keyframes lc-upload-spin {
	to {
		transform: rotate(360deg);
	}
}

.lc-upload-block.is-processing .lc-upload-form {
	pointer-events: none;
	user-select: none;
}

.lc-upload-block.is-processing .lc-upload-submit:disabled {
	opacity: 0.65;
	cursor: wait;
}

@media (max-width: 480px) {
	.lc-upload-overlay {
		position: fixed;
		inset: 0;
		z-index: 100000;
		border-radius: 0;
		padding: 1.5rem;
	}
}

.codigos {
	clear: both;
}

.codigos .detectados {
	text-align: center;
	margin: 12px 0;
}

.codigos .detectados a {
	display: inline-block;
}

.codigos .detectados img.img-thumb {
	display: block;
	margin: 0 auto;
	max-width: 100%;
	height: auto;
}

/* Lightbox básico centrado */
.img-lightbox {
	position: fixed;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.85);
	z-index: 9999;
}

.img-lightbox:target {
	display: flex;
}

.img-lightbox img {
	max-width: 95vw;
	max-height: 95vh;
}

.lc-opciones .lc-hoja {
	margin-left: 10px;
	margin-bottom: 10px;
	font-weight: bold;
}

.lc-opciones form {
	margin-bottom: 1rem;
}

.lc-aceptar-form {
	margin-top: 10px;
	margin-left: 10px;
}

.lc-btn-aceptar.button {
	background-color: #83bc2f;
	border-color: #6a9a26;
	color: #fff;
}

.lc-btn-aceptar.button:hover,
.lc-btn-aceptar.button:focus {
	background-color: #6a9a26;
	border-color: #557d1f;
	color: #fff;
}

@media (max-width: 600px) {
	.lc-opciones input[type="text"],
	.lc-opciones input[type="date"] {
		width: 100%;
		box-sizing: border-box;
	}
}
