/* ============================================================
 * WLSM Bulk Student ID Cards — layout for the preview page
 * and the print iframe.
 *
 * Each .wlsm-print-id-card wrapper contains TWO .wlsm-pro-id-card
 * divs (front + back) produced by partials/id_card.php.
 * ============================================================ */

/* ── Screen: grid of card pairs ──────────────────────────── */
.wlsm-print-id-cards-container {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 16px;
	padding: 10px;
	width: 100%;
	box-sizing: border-box;
}

/* Each student's pair (front + back) kept together */
.wlsm-print-id-cards-container > .wlsm-print-id-card {
	display: flex;
	flex-direction: row;
	gap: 16px;
	page-break-inside: avoid;
	break-inside: avoid;
}

/* Remove the bottom margin the standalone card adds so the
   front/back pair don't push each other apart */
.wlsm-print-id-card .wlsm-pro-id-card {
	margin-bottom: 0;
}

/* ── Print overrides ─────────────────────────────────────── */
@media print {
	body {
		font-size: 6pt;
		margin: 0;
		padding: 0;
		color: #000;
	}

	.wlsm-font-bold {
		font-weight: 600;
	}

	.text-secondary {
		color: #6c757d !important;
	}

	.text-dark {
		color: #343a40 !important;
	}

	.table-responsive {
		display: table;
		overflow: unset;
	}

	/* Reset flex gap for print — use margins for precise control */
	.wlsm-print-id-cards-container {
		display: flex;
		flex-direction: column;
		align-items: center;
		width: 100%;
		margin: 0;
		padding: 10px 0 0 0;
	}

	.wlsm-print-id-cards-container > .wlsm-print-id-card {
		display: flex;
		flex-direction: row;
		justify-content: center;
		gap: 30px;
		vertical-align: top;
		margin-bottom: 18px;
		page-break-inside: avoid;
		break-inside: avoid;
	}

	/* Suppress screen-only chrome inside the print iframe */
	.wlsm-print-id-card .wlsm-pro-id-card {
		margin-bottom: 0;
		box-shadow: none;
	}

	@page {
		size: A4 portrait;
	}
}
