/*
 * registration_form.php
 * Moved out of the view's <style> block. The view links this file at the
 * same spot the block sat, so the cascade order is unchanged.
 */

:root {
	--primary: #1a56db;
	--primary-dk: #1040b0;
	--accent: #f59e0b;
	--surface: #f8fafc;
	--border: #e2e8f0;
	--text: #0f172a;
	--muted: #64748b;
	--danger: #dc2626;
	--section-bg: #fff;
	--header-bg: #0f2457;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
	background: var(--surface);
	color: var(--text);
	margin: 0;
}

.reg-wrap {
	max-width: 1120px;
	margin: 0 auto;
	padding: 0 0 48px;
}

/* ── LETTERHEAD: full-width, no height cap ── */
.reg-banner {
	width: 100%;
	display: block;
	background: #fff;
	border-bottom: 1px solid #dbe4f0;
}

.letterhead-box {
	width: 100%;
	background: #fff;
	padding: 0;
	text-align: center;
	line-height: 0;
}

.letterhead-box img {
	width: 100%;
	height: auto;
	max-height: none;
	display: block;
	object-fit: cover;
}

/* ── PRINT/DOWNLOAD LEGEND NOTICE ── */
.reg-legend-notice {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
	background: #eff6ff;
	border: 1.5px solid #bfdbfe;
	border-radius: 10px;
	margin: 16px 16px 0;
	padding: 13px 18px;
}

.reg-legend-icon {
	font-size: 22px;
	flex-shrink: 0;
}

.reg-legend-text {
	flex: 1;
	font-size: 13px;
	color: #1e40af;
	line-height: 1.5;
}

.reg-legend-text strong {
	font-weight: 700;
}

.reg-legend-actions {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.btn-legend-print,
.btn-legend-pdf {
	border-radius: 7px;
	padding: 7px 16px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .4px;
	cursor: pointer;
	border: none;
	white-space: nowrap;
	transition: opacity .15s, background .15s;
}

.btn-legend-print {
	background: #fff;
	border: 1.5px solid #1a56db;
	color: #1a56db;
}

.btn-legend-print:hover {
	background: #eff6ff;
}

.btn-legend-pdf {
	background: #1a56db;
	color: #fff;
}

.btn-legend-pdf:hover {
	background: #1040b0;
}

/* ── FORM SECTIONS ── */
.reg-section {
	background: var(--section-bg);
	border: 1px solid var(--border);
	border-radius: 12px;
	margin: 20px 16px;
	overflow: hidden;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
}

.reg-section-head {
	background: var(--header-bg);
	color: #fff;
	padding: 12px 20px;
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: 'DM Serif Display', serif;
	font-size: 15px;
	letter-spacing: .5px;
}

.reg-section-body {
	padding: 20px 20px 8px;
}

.reg-row {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin-bottom: 10px;
}

.reg-col {
	flex: 1 1 200px;
	min-width: 0;
}

.reg-col-sm {
	flex: 0 0 140px;
}

.reg-col-xs {
	flex: 0 0 100px;
}

.reg-col-lg {
	flex: 2 1 280px;
}

.reg-col-full {
	flex: 1 1 100%;
}

.reg-label {
	display: block;
	font-size: 11.5px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .6px;
	color: var(--muted);
	margin-bottom: 5px;
}

.req-star {
	color: var(--danger);
	margin-left: 2px;
}

.form-control {
	width: 100%;
	height: 38px;
	padding: 0 10px;
	border: 1.5px solid var(--border);
	border-radius: 7px;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
	font-size: 13.5px;
	color: var(--text);
	background: #fff;
	transition: border-color .15s, box-shadow .15s;
	text-transform: uppercase;
}

.form-control:focus {
	outline: none;
	border-color: var(--primary);
	box-shadow: 0 0 0 3px rgba(26, 86, 219, .12);
}

select.form-control {
	cursor: pointer;
}

.select2-container {
	width: 100% !important;
}

.select2-container .select2-selection--single {
	height: 38px;
	border: 1.5px solid var(--border);
	border-radius: 7px;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
	font-size: 13.5px;
	color: var(--text);
	background: #fff;
	transition: border-color .15s, box-shadow .15s;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
	border-color: var(--primary);
	box-shadow: 0 0 0 3px rgba(26, 86, 219, .12);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
	line-height: 35px;
	padding-left: 10px;
	padding-right: 28px;
	color: var(--text);
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
	color: #6c757d;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
	height: 36px;
	right: 6px;
}

.select2-dropdown {
	border: 1.5px solid var(--border);
	border-radius: 7px;
	overflow: hidden;
}

.select2-search--dropdown .select2-search__field {
	border: 1px solid var(--border);
	border-radius: 6px;
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
	font-size: 13px;
	text-transform: none;
}

.reg-help {
	display: block;
	margin-top: 6px;
	font-size: 11.5px;
	color: var(--muted);
}

.reg-help.is-error {
	color: #b91c1c;
}

.reg-help.is-success {
	color: #15803d;
}

.reg-help.is-checking {
	color: #1d4ed8;
}

input[type="email"].form-control,
input[type="date"].form-control {
	text-transform: none;
}

.sub-head {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--primary);
	border-bottom: 2px solid var(--primary);
	padding-bottom: 4px;
	margin: 16px 0 12px;
}

.top-bar {
	display: flex;
	justify-content: flex-end;
	padding: 12px 20px 0;
}

.btn-print {
	background: #fff;
	border: 1.5px solid var(--border);
	border-radius: 7px;
	padding: 6px 16px;
	font-size: 12px;
	font-weight: 600;
	color: var(--muted);
	cursor: pointer;
	text-transform: uppercase;
	letter-spacing: .5px;
	transition: border-color .15s, color .15s;
}

.btn-print:hover {
	border-color: var(--primary);
	color: var(--primary);
}

.btn-submit {
	background: var(--primary);
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 12px 32px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .4px;
	text-transform: uppercase;
	cursor: pointer;
	transition: background .15s, opacity .15s;
	margin-top: 4px;
}

.btn-submit:disabled {
	opacity: .45;
	cursor: not-allowed;
}

.btn-submit:not(:disabled):hover {
	background: var(--primary-dk);
}

.dp-card {
	border: 1.5px solid var(--border);
	border-radius: 10px;
	padding: 16px 18px;
	margin: 16px 0 10px;
	background: #f0f6ff;
}

.dp-card-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 12px;
}

.dp-title {
	font-weight: 700;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: .5px;
	color: var(--header-bg);
}

.dp-sub {
	font-size: 12px;
	color: var(--muted);
	margin-top: 2px;
}

.btn-dp-read {
	background: #fff;
	border: 1.5px solid var(--primary);
	color: var(--primary);
	border-radius: 7px;
	padding: 6px 14px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .4px;
	cursor: pointer;
	white-space: nowrap;
}

.dp-check-label {
	font-size: 13px;
	font-weight: 600;
	color: var(--text);
}

.g-recaptcha {
	margin: 14px 0 8px;
}

.flash-wrap {
	margin: 12px 16px 0;
}

.print-only-block {
	display: none;
}

.print-section {
	border: 1px solid #d7dbe3;
	border-radius: 10px;
	padding: 14px 16px;
	margin: 12px 16px 0;
	background: #fff;
}

.print-section-title {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .5px;
	text-transform: uppercase;
	margin-bottom: 8px;
	color: #0f2457;
}

.print-privacy-text {
	font-size: 12.5px;
	line-height: 1.7;
	text-align: justify;
	color: #172033;
}

.print-privacy-text h6 {
	font-size: 12.5px;
	font-weight: 700;
	margin: 10px 0 4px;
}

.print-privacy-text ul {
	margin: 0 0 6px 18px;
	padding: 0;
}

.print-privacy-text ul li {
	margin-bottom: 2px;
}

.requirements-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 10px;
}

.requirement-item {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 13px;
	line-height: 1.55;
	color: #172033;
}

.requirement-box {
	width: 16px;
	height: 16px;
	border: 1.5px solid #111827;
	border-radius: 2px;
	flex: 0 0 16px;
	margin-top: 2px;
}

.requirement-name {
	font-weight: 700;
}

.requirement-desc {
	font-weight: 400;
}

.signature-wrap {
	display: flex;
	justify-content: flex-end;
	margin-top: 40px;
}

.signature-box {
	width: 320px;
	max-width: 100%;
	text-align: center;
}

.signature-line {
	border-top: 1px solid #111827;
	margin-bottom: 8px;
}

.signature-label {
	font-size: 12px;
	font-weight: 600;
	color: #111827;
}

.credentials-popup {
	padding: 24px 28px 28px !important;
	border-radius: 18px !important;
}

.credentials-modal .modal-content {
	border: none;
	border-radius: 18px;
	overflow: hidden;
}

.credentials-modal .modal-body {
	padding: 28px 32px 32px;
}

.credentials-card {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
	text-align: center;
	color: #111827;
}

.credentials-avatar {
	width: 104px;
	height: 104px;
	margin: 0 auto 18px;
	border-radius: 999px;
	background: linear-gradient(180deg, #e5e7eb 0%, #d1d5db 100%);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 48px;
	color: #9ca3af;
}

.credentials-name {
	font-size: 24px;
	font-weight: 600;
	color: #2563eb;
	margin-bottom: 20px;
}

.credentials-row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	flex-wrap: wrap;
	font-size: 16px;
	margin-bottom: 12px;
}

.credentials-row span:first-child {
	color: #4b5563;
}

.credentials-row strong {
	font-size: 18px;
	font-weight: 700;
	color: #111827;
	word-break: break-word;
}

.credentials-password-wrap {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.credentials-toggle {
	border: none;
	background: transparent;
	color: #9ca3af;
	font-size: 18px;
	cursor: pointer;
	padding: 0;
}

.credentials-note {
	margin-top: 16px;
	font-size: 13px;
	line-height: 1.6;
	color: #4b5563;
}

.credentials-actions {
	display: flex;
	justify-content: center;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 24px;
}

.credentials-action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	border: 1px solid #cbd5e1;
	padding: 10px 18px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .4px;
	text-transform: uppercase;
	text-decoration: none !important;
	cursor: pointer;
	transition: background .15s, color .15s, border-color .15s;
}

.credentials-action.secondary {
	background: #fff;
	color: #1d4ed8;
	border-color: #93c5fd;
}

.credentials-action.secondary:hover {
	background: #eff6ff;
}

.credentials-action.primary {
	background: #1d4ed8;
	color: #fff;
	border-color: #1d4ed8;
}

.credentials-action.primary:hover {
	background: #1e40af;
	color: #fff;
}

.credentials-action.disabled,
.credentials-action.disabled:hover {
	background: #cbd5e1;
	color: #64748b;
	border-color: #cbd5e1;
	cursor: not-allowed;
	pointer-events: none;
}

@media print {
	#spouseSection {
		display: block !important;
	}
}

/* ── PRINT STYLES ── */
@media (max-width: 640px) {

	.reg-col-sm,
	.reg-col-xs {
		flex: 1 1 120px;
	}
}

@media print {
	@page {
		size: A4;
		margin: 10mm 10mm 10mm 10mm;
	}

	@page :first {
		margin-top: 10mm;
	}

	html,
	body {
		background: #fff !important;
		color: #000 !important;
		font-size: 12px;
	}

	/* Hide screen-only elements in print */
	.no-print,
	.g-recaptcha,
	.top-bar,
	.btn-print,
	.btn-submit,
	.btn-dp-read,
	.reg-help,
	.reg-legend-notice,
	.modal,
	.modal-backdrop,
	.select2-container .select2-selection__arrow,
	.select2-search,
	.select2-results__options {
		display: none !important;
	}

	.reg-wrap {
		max-width: 100% !important;
		padding: 0 !important;
		margin: 0 !important;
	}

	.reg-banner {
		border-bottom: none !important;
		margin-bottom: 6px !important;
	}

	/* Letterhead full width in print */
	.letterhead-box {
		padding: 0 !important;
		width: 100% !important;
	}

	.letterhead-box img {
		width: 100% !important;
		height: auto !important;
		max-height: none !important;
		display: block !important;
	}

	.reg-section {
		box-shadow: none !important;
		border: 1px solid #cfcfcf !important;
		border-radius: 8px !important;
		margin: 0 0 10px 0 !important;
		page-break-inside: avoid;
		break-inside: avoid;
	}

	.reg-section-head {
		background: #fff !important;
		color: #000 !important;
		border-bottom: 1px solid #d9d9d9 !important;
		font-family: Arial, sans-serif !important;
		font-size: 13px !important;
		font-weight: 700 !important;
		padding: 8px 12px !important;
		-webkit-print-color-adjust: exact;
	}

	.reg-section-body {
		padding: 10px 12px 6px !important;
	}

	.reg-row {
		gap: 8px !important;
		margin-bottom: 8px !important;
	}

	.reg-label {
		font-size: 10px !important;
		color: #000 !important;
		margin-bottom: 3px !important;
	}

	.req-star {
		color: #000 !important;
	}

	.form-control,
	select.form-control,
	.select2-container .select2-selection--single {
		height: 32px !important;
		min-height: 32px !important;
		border: 1px solid #000 !important;
		border-radius: 4px !important;
		background: #fff !important;
		color: #000 !important;
		box-shadow: none !important;
		padding: 4px 8px !important;
		font-size: 11px !important;
		-webkit-appearance: none !important;
		-moz-appearance: none !important;
		appearance: none !important;
	}

	/* ── Hide placeholder text in print ── */
	input::placeholder,
	textarea::placeholder {
		color: transparent !important;
	}

	/* ── Hide select dropdown displayed value (show blank box) ── */
	select.form-control {
		color: transparent !important;
	}

	.select2-container--default .select2-selection--single .select2-selection__rendered {
		color: transparent !important;
	}

	.sub-head {
		color: #000 !important;
		border-bottom: 1px solid #000 !important;
		font-size: 12px !important;
		margin: 10px 0 8px !important;
		padding-bottom: 5px !important;
	}

	/* ── Educational Background: force to page 2 ── */
	/* #educationalSection {
		page-break-before: always !important;
		break-before: page !important;
		margin-top: 0 !important;
	} */

	/* ── Special Status: always show type fields in print ── */
	#pwdTypeGroup,
	#ipTypeGroup,
	#singleParentChildGroup {
		display: block !important;
	}

	.print-only-block {
		display: block !important;
		page-break-inside: avoid;
		break-inside: avoid;
	}

	.print-section {
		border: 1px solid #cfcfcf !important;
		border-radius: 8px !important;
		padding: 10px 12px !important;
		margin: 0 0 10px 0 !important;
		page-break-inside: avoid;
		break-inside: avoid;
	}

	.print-section-title {
		color: #000 !important;
		font-size: 12px !important;
		margin-bottom: 6px !important;
	}

	.print-privacy-text {
		font-size: 10.5px !important;
		line-height: 1.5 !important;
		color: #000 !important;
	}

	.print-privacy-text h6 {
		font-size: 10.5px !important;
	}

	.requirement-item {
		font-size: 11px !important;
		line-height: 1.45 !important;
		color: #000 !important;
	}

	.requirement-box {
		border: 1px solid #000 !important;
	}

	.signature-wrap {
		margin-top: 28px !important;
	}

	.signature-label {
		font-size: 11px !important;
		color: #000 !important;
	}
}
