/*
 * Single player page print form (/player/{registration number}):
 * the Print button's screen styles (styled like the theme button) plus the
 * A4 player-profile document — display: none on screen, and the ONLY thing
 * shown in print output. Enqueued with the player-profile assets only.
 */

/* ---------- Print button (screen, styled like .nc-profile__back) ---------- */
.nc-profile__head {
	position: relative;
}
.nc-profile__print {
	appearance: none;
	background-color: rgba(0, 0, 0, 0.05);
	display: inline-flex;
	align-items: center;
	gap: 6px;
	border: 0;
	cursor: pointer;
	color: #888;
	padding: 6px 15px;
	border-radius: 5px;
	font-family: inherit;
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	text-transform: uppercase;
	position: absolute;
	right: 4px;
	top: 4px;
}

.nc-profile__print:hover,
.nc-profile__print:focus {
	background-color: rgba(0, 0, 0, 0.05);
	color: var(--dl-primary-color, #ac0f18);
}

.nc-profile__print:focus-visible {
	outline: none;
	box-shadow: var(--nc-focus-ring, 0 0 0 3px var(--nc-primary-100, #d1fae5));
}

.nc-profile__print svg {
	width: 14px;
	height: 14px;
}

/* ---------- The document: hidden on screen ---------- */

.nc-print-form {
	display: none;
}

/* ---------- Print output ---------- */

/* Zero page margins so the browser's own header/footer (date, page title,
 * URL and page number) has no margin area to draw in — the spacing now
 * lives in the print container's own padding below. */
@page {
	size: A4 portrait;
	margin: 0;
}

@media print {

	/* Only the profile document prints: header, footer, nav, screen layout,
	 * buttons and everything else is hidden. */
	.main-header,
	.footer-section,
	.skip-link,
	.screen-reader-text,
	.btn-wrap,
	.nc-profile,
	.nc-profile__print,
	#wpadminbar {
		display: none !important;
	}

	html,
	body {
		background: #ffffff !important;
		margin: 0 !important;
		padding: 0 !important;
		color: #000000;
	}

	#page,
	.content-area,
	.site-main,
	.nc-profile-wrap,
	.container {
		width: auto !important;
		max-width: none !important;
		margin: 0 !important;
		padding: 0 !important;
		background: transparent !important;
		box-shadow: none !important;
	}

	.nc-print-form {
		display: block !important;
		background: #ffffff;
		color: #000000;

		/* Full A4 sheet with the page spacing moved in-flow (box-sizing keeps
		 * it exactly 210mm x 297mm so no blank second page is created). */
		box-sizing: border-box;
		width: 210mm;
		min-height: 297mm;
		margin: 0;
		padding: 12mm 14mm 16mm;
	}
}

/* ---------- The profile document (printed only; the form is display:none
 * on screen, so these rules never affect the screen layout) ---------- */

.nc-print__doc {
	color: #000000;
	background: #ffffff;
	font-family: "Inter", "Noto Serif Bengali", "Noto Sans Bengali", Kalpurush, SolaimanLipi, Georgia, serif;
	font-size: 10.5pt;
	line-height: 1.4;
	-webkit-print-color-adjust: exact;
	print-color-adjust: exact;
}

/* ---------- Centered profile header ---------- */

.nc-print__identity {
	text-align: center;
	padding: 4mm 0 3mm;
	border-bottom: 1px solid #ddd;
	page-break-inside: avoid;
	break-inside: avoid;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.nc-print__photo {
	display: block;
	box-sizing: border-box;
	width: 25mm;
	height: 30mm;
	border: 1px solid #ddd;
	background: #ffffff;
	object-fit: cover;
	object-position: center top;
}

.nc-print__photo--empty {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16pt;
	color: #999999;
}

.nc-print__identity-meta-wrap{
	text-align: left;
}

.nc-print__name {
	margin: 0;
	font-size: 14pt;
	font-weight: 700;
	letter-spacing: 0.02em;
	overflow-wrap: anywhere;
}

.nc-print__identity-meta {
	margin: 1mm 0 0;
	font-size: 10.5pt;
	color: #222222;
}

/* ---------- Sections ---------- */

.nc-print__section {
	margin-top: 4mm;
	page-break-inside: auto;
}

.nc-print__sect-title {
	margin: 0 0 2mm;
	padding-bottom: 1.2mm;
	border-bottom: 1px solid #ddd;
	font-size: 11pt;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #0b1220;
	page-break-after: avoid;
	break-after: avoid;
	page-break-inside: avoid;
	break-inside: avoid;
}

.nc-print__table {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
}

.nc-print__trow {
	border-bottom: 1px dotted #ddd;
}

.nc-print__trow:last-child {
	border-bottom: 0;
}

/* Each row never splits across two pages. */
.nc-print__tl,
.nc-print__tv {
	padding: 1.6mm 2mm 1.6mm 0;
	vertical-align: top;
	page-break-inside: avoid;
	break-inside: avoid;
	overflow-wrap: anywhere;
	word-break: break-word;
	hyphens: auto;
}

.nc-print__tl {
	width: 32%;
	font-weight: 700;
	font-size: 10pt;
	color: #222222;
}

.nc-print__tv {
	font-size: 10.5pt;
	color: #000000;
}

/* ---------- Footer ---------- */

.nc-print__footer {
	margin-top: 5mm;
	padding-top: 2mm;
	border-top: 1px solid #ddd;
	text-align: center;
	page-break-inside: avoid;
	break-inside: avoid;
}

.nc-print__footer-text {
	margin: 0;
	font-size: 9pt;
	color: #555555;
}

/* Multi-page safety: pure white background no matter what, keep headings
 * with their content, and let further pages flow naturally. */
@media print {

	.nc-print__doc,
	.nc-print__table,
	.nc-print__section {
		background: #ffffff !important;
	}

	.nc-print__sect-title,
	.nc-print__identity,
	.nc-print__brand {
		page-break-inside: avoid;
		break-inside: avoid;
	}
}
