/*
 * Entradas (pex) — estilos estructurales mínimos.
 * El diseño final se hace desde el tema o Elementor con estas clases:
 *   .pex-comprar, .pex-comprar__form, .pex-comprar__tipos, .pex-comprar__boton,
 *   .pex-tipo (--abierto | --agotado), .pex-tipo__nombre, __precio, __cantidad, __ultimas,
 *   .pex-badge (--a_la_venta | --agotado | --venta_cerrada | --proximamente | --cancelado | --finalizado),
 *   .pex-asistentes, .pex-asistente, .pex-asistente__titulo.
 */

.pex-comprar__tipos {
	list-style: none;
	margin: 0 0 1em;
	padding: 0;
}

.pex-tipo {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: .5em 1em;
	padding: .75em 0;
	border-bottom: 1px solid rgba(0, 0, 0, .1);
}

.pex-tipo__info {
	display: flex;
	flex-direction: column;
	flex: 1 1 12em;
}

.pex-tipo__nombre {
	font-weight: 600;
}

.pex-tipo__accion {
	display: flex;
	align-items: center;
	gap: .5em;
}

.pex-tipo__cantidad {
	min-width: 4.5em;
	min-height: 44px; /* Objetivo táctil cómodo en móvil. */
}

.pex-tipo--agotado {
	opacity: .6;
}

.pex-badge {
	display: inline-block;
	padding: .2em .6em;
	border-radius: 3px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .03em;
}

.pex-comprar__boton {
	min-height: 44px;
	width: 100%;
}

/* ---- Checkout: bloques de asistentes (móvil primero) ---- */

.pex-asistentes {
	clear: both;
	margin: 1.5em 0;
}

.pex-asistente {
	margin: 0 0 1em;
	padding: 1em;
	border: 1px solid rgba(0, 0, 0, .15);
	border-radius: 4px;
}

.pex-asistente__titulo {
	display: flex;
	flex-direction: column;
	padding: 0 .25em;
}

.pex-asistente__numero {
	font-weight: 700;
}

.pex-asistente__detalle {
	font-size: .875em;
	opacity: .8;
}

.pex-asistente .form-row input,
.pex-asistente .form-row select {
	min-height: 44px;
	font-size: 16px; /* Evita el zoom automático de iOS al enfocar. */
}

@media (max-width: 600px) {
	.pex-asistente .form-row-first,
	.pex-asistente .form-row-last {
		float: none;
		width: 100%;
	}
}

.pex-asistente::after {
	content: "";
	display: table;
	clear: both;
}

/* ---- Entradas con QR: pedido recibido y Mi cuenta ---- */

.pex-entradas {
	clear: both;
	margin: 2em 0;
}

.pex-entradas__intro {
	max-width: 60ch;
}

.pex-entradas__lista {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
	gap: 1em;
	margin: 1em 0;
	padding: 0;
	list-style: none;
}

.pex-entrada {
	display: flex;
	align-items: center;
	gap: 1em;
	margin: 0;
	padding: 1em;
	border: 1px solid rgba(0, 0, 0, .15);
	border-radius: 8px;
	background: #fff;
	color: #000;
	break-inside: avoid;
}

.pex-entrada__qr {
	flex: none;
	width: 140px;
}

.pex-entrada__qr svg {
	display: block;
	width: 100%;
	height: auto;
}

.pex-entrada__sin-qr {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1;
	padding: .5em;
	border: 1px dashed rgba(0, 0, 0, .3);
	font-size: .875em;
	text-align: center;
}

.pex-entrada__datos {
	min-width: 0;
}

.pex-entrada__datos p {
	margin: 0 0 .2em;
}

.pex-entrada__nombre {
	font-size: 1.1em;
	font-weight: 700;
	overflow-wrap: anywhere;
}

.pex-entrada__meta,
.pex-entrada__fecha,
.pex-entrada__estado {
	font-size: .9em;
	color: #5c5c5c;
}

.pex-entrada--usada {
	opacity: .65;
}

@media (max-width: 420px) {
	.pex-entrada {
		flex-direction: column;
		text-align: center;
	}

	.pex-entrada__qr {
		width: min(240px, 70vw); /* QR grande en el móvil: se lee mejor en la puerta. */
	}
}

@media print {
	.pex-entradas__acciones {
		display: none;
	}

	.pex-entrada {
		border-color: #000;
	}
}
