th, td {
	white-space: initial;
}

.tablaafip {
	width: 100%;
	line-height: 1;
	table-layout: initial;
	border-collapse: collapse;
}

.tablaafip td, .original, .tipof {
	border: 1px solid #000;
}

.original {
	font-weight: bold;
	padding: 6px 0;
	font-size: 24px;
	text-align: center;
}

.tipof {
	font-weight: bold;
	padding-top: 10px;
	line-height: 15px;
	text-align: center;
	font-size: 42px;
	max-width: 60px;
	min-width: 60px;
}

.nombre .nombre50 {
	font-size: 16px;
	text-align: center;
	width: 100%;
	font-weight: bold;
	text-transform: uppercase;
	padding-left: 20px;
}

.nombretd {
	font-size: 1rem;
	text-align: center;
	width: 100%;
	font-weight: bold;
	text-transform: uppercase;
	padding-left: 20px;
}

.logo50, .nombre50 {
	display: inline-block;
	float: left;
}

.otracolumna {
	width: 45%;
}

.codigof {
	font-size: 12px;
}

.divisor {
	clear: both;
	height: 1px;
}

.tabla2 {
	border-left: 1px solid #000;
	border-right: 1px solid #000;
	border-bottom: 1px solid #000;
	border-top: none;
	width: 100%;
	border-collapse: collapse;
}

.tabla2 td{
	font-size: 17px;
	border: 1px solid #000;
	border-top: none;
	width: 50%;
	padding-left: 12px;
	line-height: 2.2;
}

.datosdomicilio > div > span{
	font-weight: bold;
}

.productos {
	width: 100%;
	font-size: 14px;
	margin-top: 8px;
	border-collapse: collapse; /* Une bordes contiguos */
  }
  
  /* Borde exterior solo si está habilitado */
  .productos.show-lines {
	border: 1px solid #000; /* Borde exterior */
  }
  
  .productos thead tr {
	background: #ccc !important;
	-webkit-print-color-adjust: exact;
  }
  
  .productos th,
  .productos td {
	padding: 6px 8px;
	/*border-bottom: 1px solid #000;*/
  }
  
  /* Líneas divisorias - solo mostrar si está habilitado */
  .productos.show-lines th,
  .productos.show-lines td {
	border-right: 1px solid #000;
  }
  
  /* Quitar el borde derecho de la última columna */
  .productos.show-lines th:last-child,
  .productos.show-lines td:last-child {
	border-right: none;
  }
  
  /* Quitar el borde inferior de la última fila */
  .productos.show-lines tbody tr:last-child td {
	border-bottom: none;
  }

  .productos tfoot tr td {
	font-weight: bold;
	background-color: #eee;
  }
  
  /* Línea divisoria del total - solo si está habilitado */
  .productos.show-lines tfoot tr td {
	border-top: 1px solid #000;
  }
  
  /* CUANDO ESTÁ DESACTIVADO - Solo productos sin bordes, header y total con bordes */
  .productos:not(.show-lines) {
	border: none !important;
  }
  
  /* PRODUCTOS - Sin bordes cuando está desactivado */
  .productos:not(.show-lines) tbody tr td {
	border: none !important;
  }
  
  /* HEADER - Mantener bordes cuando está desactivado */
  .productos:not(.show-lines) thead tr th {
	border-right: 1px solid #000 !important;
	border-bottom: 1px solid #000 !important;
	border-top: 1px solid #000 !important;
	border-left: 1px solid #000 !important;
  }
  
  .productos:not(.show-lines) thead tr th:last-child {
	border-right: 1px solid #000 !important;
  }
  
  /* TOTAL - Recuadro completo sin líneas divisorias verticales cuando está desactivado */
  .productos:not(.show-lines) tfoot tr td {
	border-top: 1px solid #000 !important;
	border-left: 1px solid #000 !important;
	border-right: 1px solid #000 !important;
	border-bottom: 1px solid #000 !important;
  }
  
  /* Asegurar que el total tenga un recuadro completo */
  .productos:not(.show-lines) tfoot tr {
	border: 1px solid #000 !important;
  }
  
  /* FORZAR HEADER CON BORDES COMPLETOS cuando está desactivado */
  .productos:not(.show-lines) thead tr {
	border: 1px solid #000 !important;
  }
  
  
  .derecha {
	text-align: right;
  }
  

.derecha{
	text-align: right;
}

.preciofinal {
	width: 100%;
	border: 1px solid #000;
	font-weight: bold;
	white-space: nowrap;
	font-size: 17px;
}

.forzando{
	width: 100%;
}

.preciostitulo, .preciosnumeros{
	min-width: 150px;
}

.quehace{
	width: 100%;
	text-align: center;
	margin-top: 3px;
	border: 1px solid #000;
	height: 30px;
}

.codigos{
	width: 100%;
	margin-top: 3px;
}

.codigos tbody tr td{
	width: auto;
	text-align: left;
	padding: 0 15px;
}

.codigos tbody tr td span{
	font-weight: bold;
}

.nombrefactura{
	padding-left: 20px;

}

.cliente{
	width: 100%;
	border: 1px solid #000;
	margin-top: 8px;
	margin-bottom: 8px;
}

.cliente tr td {
	width: 50%;
	padding-left: 12px;
	line-height: 2.2;
	font-size: 17px;
}

.cliente tr td span {
	font-weight: bold;
}

.marginout{
	min-height: 120px;
	height: auto;
}

.nofactura {
	max-width: 100px;
}

.nofacturadiv{
	position: absolute;
	text-align: center;
	width: 100%;
	top: 90px;
	z-index: -1;
	margin-left: -30px;
}

.onlyprintOk {
	display: none;
}

/* Estilos para versión compacta (letra más pequeña) */
.invoice-compact {
	font-size: 12px !important;
}

.invoice-compact .tabla2 td {
	font-size: 12px !important;
	line-height: 1.6 !important;
}

.invoice-compact .cliente tr td {
	font-size: 12px !important;
	line-height: 1.6 !important;
}

.invoice-compact .productos {
	font-size: 11px !important;
}

.invoice-compact .productos td, .invoice-compact .productos th {
	padding: 3px 5px !important;
	font-size: 11px !important;
}

.invoice-compact .preciofinal {
	font-size: 12px !important;
}

.invoice-compact .preciostitulo, .invoice-compact .preciosnumeros {
	min-width: 100px !important;
	font-size: 12px !important;
}

.invoice-compact .datosdomicilio > div {
	font-size: 12px !important;
}

.invoice-compact .datosdomicilio > div > span {
	font-size: 12px !important;
}

/* Estilos para versión legible (letra más grande) - actual */
.invoice-readable {
	font-size: 16px !important;
}

.invoice-readable .tabla2 td {
	font-size: 16px !important;
	line-height: 2.2 !important;
}

.invoice-readable .cliente tr td {
	font-size: 16px !important;
	line-height: 2.2 !important;
}

.invoice-readable .productos {
	font-size: 14px !important;
}

.invoice-readable .productos td, .invoice-readable .productos th {
	padding: 6px 8px !important;
	font-size: 14px !important;
}

.invoice-readable .preciofinal {
	font-size: 16px !important;
}

.invoice-readable .preciostitulo, .invoice-readable .preciosnumeros {
	min-width: 150px !important;
	font-size: 16px !important;
}

.invoice-readable .datosdomicilio > div {
	font-size: 16px !important;
}

.invoice-readable .datosdomicilio > div > span {
	font-size: 16px !important;
}

@media print {
	.nombre50{
		font-size: 28px;
	}

	*{
		color: black;
	}

	.col-6 {
		float: left!important;
		width: 50% !important;
	}
	.logo50 img{
		width: auto;
		height: auto;
		max-height: 150px;
		max-width: 150px;
		margin-left: 10px;
		margin-top: 3px;
	}

	.nofacturadiv, .hideprint {
		display: none !important;
	}

	.onlyprintOk {
		display: table-row;
	}

	.print12 {
		width: 100% !important;
		display: block !important;
		max-width: 100% !important;
		min-width: 100%;
		flex: none  !important;
	}

	.marginout{
		display: none;
	}
	.tawkchat-minified-wrapper{
		display: none;
	}

	.divspecialabajo {
		position: fixed;
		bottom: 0;
		width: 100%;
	}

	tr {
		page-break-inside: avoid;
	}

	html, body {
		width: 210mm;
		height: 297mm;
	}

	.divspecialabajo:not(:last-of-type) {
		display: none !important;
	}

	body{
		font-size: 20px !important;
	}

	.divspecialabajono {
		margin-top: 15px;
	}
}

@media screen and (max-width: 991px) {
	.preciostitulo, .preciosnumeros, .preciostitulo, .preciosnumeros{
		min-width: 160px !important;
	}

	.forzando{
		width: auto;
	}

	.print12{
		padding: 0px;
		margin: 0px;
	}
}

.title-center {
	margin: 0 auto;
	position: absolute;
	top: 30%;
	font-size: 28px;
}

.title-center2 {
	word-break: break-word;
	font-size: 18px;
	margin: 0 auto;
	position: absolute;
	top: 20%;
	padding: 0 4px;
}

@media (max-width: 768px) {
	#tutorial-sells-responsive {
		display: none;
	}
}