/* Rótulos de rollos — vista previa e impresión */

.logistica-roll-label {
	background: #ffffff;
	border: 0.4cqw solid #111827;
	box-sizing: border-box;
	color: #111827;
	container-type: size;
	display: flex;
	flex-direction: column;
	font-family: Arial, Helvetica, sans-serif;
	height: 140mm;
	overflow: hidden;
	width: 216mm;
	-webkit-print-color-adjust: exact;
	print-color-adjust: exact;
}

.logistica-roll-label__block {
	border-bottom: 0.35cqw solid #111827;
	display: flex;
	flex-direction: column;
	min-height: 0;
}

.logistica-roll-label__block:last-child {
	border-bottom: 0;
}

.logistica-roll-label__block--ancho {
	flex: 1.15 1 auto;
}

.logistica-roll-label__split {
	display: flex;
	flex: 1 1 auto;
	min-height: 0;
}

.logistica-roll-label__block--half {
	border-right: 0.35cqw solid #111827;
	flex: 1 1 50%;
	min-width: 0;
}

.logistica-roll-label__block--half:last-child {
	border-right: 0;
}

.logistica-roll-label__block--gramaje {
	flex: 0.85 0 auto;
}

.logistica-roll-label__head {
	color: #111827;
	flex-shrink: 0;
	font-size: 4.8cqw;
	font-weight: 800;
	letter-spacing: 0.05em;
	line-height: 1.05;
	padding: 2.8cqh 2cqw;
	text-align: center;
	text-transform: uppercase;
	-webkit-print-color-adjust: exact;
	print-color-adjust: exact;
}

.logistica-roll-label__value {
	align-items: center;
	background: #ffffff;
	box-sizing: border-box;
	display: flex;
	flex: 1 1 auto;
	font-size: 10.5cqw;
	font-weight: 800;
	justify-content: center;
	line-height: 1;
	min-height: 0;
	overflow: hidden;
	padding: 1.8cqh 1.5cqw;
	text-align: center;
	width: 100%;
	word-break: break-word;
}

.logistica-roll-label__block--half .logistica-roll-label__value {
	font-size: 8.8cqw;
}

.logistica-roll-label__block--gramaje .logistica-roll-label__value {
	font-size: 11.2cqw;
}

.logistica-roll-label__value--ancho {
	font-size: 8.2cqw;
	flex-wrap: wrap;
	gap: 1.2cqw;
}

.logistica-roll-label__ancho-prefix {
	white-space: nowrap;
}

.logistica-roll-label__ancho-size {
	border: 0.15cqw solid rgba(17, 24, 39, 0.35);
	border-radius: 0.8cqw;
	color: #111827;
	display: inline-block;
	font-size: 1em;
	font-weight: 800;
	padding: 1.2cqh 2.2cqw;
	white-space: nowrap;
	-webkit-print-color-adjust: exact;
	print-color-adjust: exact;
}

/* Vista previa: encaja en el contenedor gris sin invadir el formulario */
.logistica-roll-label-preview-scaler {
	aspect-ratio: var(--roll-preview-w, 216) / var(--roll-preview-h, 140);
	display: block;
	margin: 0 auto;
	max-width: min(100%, 580px);
	position: relative;
	width: 100%;
}

.logistica-roll-label-preview-scaler > .logistica-roll-label,
.logistica-roll-label-preview-scaler > .logistica-roll-label.is-preview {
	height: 100% !important;
	inset: 0;
	margin: 0;
	max-height: none !important;
	max-width: none !important;
	min-height: 0 !important;
	position: absolute !important;
	transform: none !important;
	width: 100% !important;
}

.logistica-roll-label.is-preview {
	height: 100% !important;
	width: 100% !important;
}

.logistica-roll-label-preview-wrap {
	background: #e2e8f0;
	border: 1px solid #cbd5e1;
	border-radius: 10px;
	min-height: 400px;
	overflow: auto;
	padding: 12px;
}

.logistica-roll-label-preview-wrap [data-rotulo-visual-preview-mount] {
	display: block;
	flex-shrink: 0;
	overflow: hidden;
	width: 100%;
}

@media print {
	.logistica-roll-label-print-doc {
		background: #ffffff !important;
	}

	.logistica-roll-label-print-page {
		break-after: page;
		page-break-after: always;
	}

	.logistica-roll-label-print-page:last-child {
		break-after: auto;
		page-break-after: auto;
	}

	.logistica-roll-label {
		break-after: auto;
		break-inside: avoid;
		page-break-after: auto;
		page-break-inside: avoid;
	}

	.logistica-roll-label,
	.logistica-roll-label__head,
	.logistica-roll-label__ancho-size {
		-webkit-print-color-adjust: exact !important;
		print-color-adjust: exact !important;
	}
}
