/* Divi theme overrides on verification page */
body.apmc-verification-page .site-content,
body.apmc-verification-page .content-area,
body.apmc-verification-page .entry-content,
body.apmc-verification-page .page-content,
body.apmc-verification-page #main-content,
body.apmc-verification-page #main-content .container,
body.apmc-verification-page .et_pb_row,
body.apmc-verification-page .elementor-section-wrap {
	max-width: none !important;
}

body.apmc-verification-page .entry-content,
body.apmc-verification-page .page-content {
	padding-left: 0 !important;
	padding-right: 0 !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

.apmc-portal {
	--apmc-blue: #0c3c60;
	--apmc-blue-dark: #082a42;
	--apmc-blue-light: #e8f1f8;
	--apmc-text: #1a202c;
	--apmc-muted: #64748b;
	--apmc-border: #e2e8f0;
	--apmc-bg: #f1f5f9;
	--apmc-white: #ffffff;
	--apmc-radius: 14px;
	--apmc-shadow: 0 12px 40px rgba(12, 60, 96, 0.08);

	width: 100vw;
	max-width: 100vw;
	position: relative;
	left: 50%;
	right: 50%;
	margin-left: -50vw;
	margin-right: -50vw;
	margin-top: 0;
	background: var(--apmc-bg);
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	color: var(--apmc-text);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

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

/* Reset theme typography inside portal */
.apmc-portal h1,
.apmc-portal h2,
.apmc-portal h3,
.apmc-portal h4,
.apmc-portal p,
.apmc-portal label,
.apmc-portal button,
.apmc-portal input,
.apmc-portal a {
	font-family: inherit;
}

.apmc-portal h1,
.apmc-portal h2,
.apmc-portal h3,
.apmc-portal h4 {
	line-height: 1.25;
	font-weight: 700;
	color: var(--apmc-blue);
}

.apmc-portal p {
	margin: 0;
}

.apmc-portal a {
	color: var(--apmc-blue);
	text-decoration: none;
}

.apmc-portal a:hover {
	text-decoration: underline;
}

/* Banner */
.apmc-portal-banner {
	background: linear-gradient(135deg, var(--apmc-blue) 0%, var(--apmc-blue-dark) 100%);
	color: var(--apmc-white);
	padding: 14px 20px;
	text-align: center;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.02em;
	line-height: 1.45;
}

.apmc-banner-mobile {
	display: none;
}

/* Layout */
.apmc-portal-inner {
	max-width: 1140px;
	margin: 0 auto;
	padding: 32px 20px 0;
}

.apmc-portal-layout {
	display: grid;
	grid-template-columns: minmax(300px, 380px) 1fr;
	gap: 32px;
	align-items: start;
}

/* Form panel — shown first in DOM for mobile priority */
.apmc-portal-form-panel {
	background: var(--apmc-white);
	border: 1px solid var(--apmc-border);
	border-radius: var(--apmc-radius);
	box-shadow: var(--apmc-shadow);
	padding: 28px 24px 32px;
	position: sticky;
	top: 24px;
}

.apmc-form-header {
	text-align: center;
	margin-bottom: 24px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--apmc-border);
}

.apmc-form-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	margin: 0 auto 12px;
	background: var(--apmc-blue-light);
	border-radius: 50%;
}

.apmc-form-title {
	font-size: 1.35rem;
	margin: 0 0 6px;
}

.apmc-form-subtitle {
	font-size: 0.875rem;
	color: var(--apmc-muted);
}

.apmc-disclaimer {
	margin-bottom: 20px;
	padding: 14px 16px;
	background: #fffbeb;
	border: 1px solid #fcd34d;
	border-left: 4px solid #f59e0b;
	border-radius: 10px;
	font-size: 0.8125rem;
	color: #92400e;
	line-height: 1.55;
	text-align: left;
}

.apmc-disclaimer strong {
	color: #78350f;
}

.apmc-disclaimer p {
	margin: 0 0 8px;
}

.apmc-disclaimer p:last-child {
	margin-bottom: 0;
}

.apmc-field {
	margin-bottom: 18px;
}

.apmc-field label {
	display: block;
	font-size: 0.75rem;
	font-weight: 700;
	color: #475569;
	margin-bottom: 6px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.apmc-field input {
	display: block;
	width: 100%;
	min-height: 48px;
	padding: 12px 14px;
	border: 1.5px solid #cbd5e1;
	border-radius: 10px;
	font-size: 1rem;
	color: var(--apmc-text);
	background: var(--apmc-white);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.apmc-field input:focus {
	outline: none;
	border-color: var(--apmc-blue);
	box-shadow: 0 0 0 3px rgba(12, 60, 96, 0.12);
}

.apmc-submit-btn {
	display: block;
	width: 100%;
	min-height: 50px;
	margin-top: 4px;
	padding: 14px 20px;
	border: none;
	border-radius: 10px;
	background: var(--apmc-blue);
	color: var(--apmc-white);
	font-size: 0.9375rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.15s ease;
	box-shadow: 0 6px 16px rgba(12, 60, 96, 0.22);
}

.apmc-submit-btn:hover {
	background: var(--apmc-blue-dark);
}

.apmc-submit-btn:active {
	transform: scale(0.98);
}

/* Loading */
.apmc-loading {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	padding: 24px 0 8px;
	color: var(--apmc-muted);
	font-size: 0.875rem;
}

.apmc-loading[hidden] {
	display: none !important;
}

.apmc-spinner {
	width: 28px;
	height: 28px;
	border: 3px solid var(--apmc-border);
	border-top-color: var(--apmc-blue);
	border-radius: 50%;
	animation: apmc-spin 0.7s linear infinite;
}

@keyframes apmc-spin {
	to { transform: rotate(360deg); }
}

/* Error */
.apmc-error {
	margin-top: 20px;
	padding: 16px;
	border-radius: 10px;
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #991b1b;
	font-size: 0.875rem;
	line-height: 1.55;
}

.apmc-error[hidden] {
	display: none !important;
}

.apmc-error strong {
	display: block;
	margin-bottom: 6px;
	font-size: 0.9375rem;
}

.apmc-error-message {
	margin-bottom: 12px;
}

.apmc-contact-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 14px;
}

.apmc-contact-links a {
	color: #b91c1c;
	font-weight: 600;
	font-size: 0.8125rem;
}

/* Result */
.apmc-result {
	margin-top: 20px;
}

.apmc-result[hidden] {
	display: none !important;
}

.apmc-result-card {
	background: #f8fafc;
	border: 1px solid var(--apmc-border);
	border-radius: 10px;
	padding: 16px;
}

.apmc-result-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	margin-bottom: 14px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--apmc-border);
}

.apmc-result-header h4 {
	margin: 0;
	font-size: 0.8125rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.apmc-verified-tag {
	flex-shrink: 0;
	font-size: 0.6875rem;
	background: #dbeafe;
	color: #1e40af;
	padding: 4px 8px;
	border-radius: 999px;
	font-weight: 700;
}

.apmc-result-list {
	margin: 0;
}

.apmc-result-item {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px 12px;
	padding: 10px 0;
	border-bottom: 1px solid #edf2f7;
}

.apmc-result-item:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.apmc-result-item dt {
	margin: 0;
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--apmc-muted);
}

.apmc-result-item dd {
	margin: 0;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--apmc-text);
	text-align: right;
	word-break: break-word;
}

.apmc-result-item-comments dd {
	text-align: left;
	white-space: pre-wrap;
	line-height: 1.5;
	font-weight: 500;
}

.apmc-result-item-status dd {
	text-align: right;
}

.apmc-result .apmc-status-badge {
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 700;
	padding: 5px 12px;
	border-radius: 6px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.apmc-result .apmc-status-badge.is-fit {
	background: #d1fae5;
	color: #065f46;
}

.apmc-result .apmc-status-badge.is-unfit {
	background: #fee2e2;
	color: #991b1b;
}

/* Info column */
.apmc-portal-kicker {
	display: block;
	font-size: 0.6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	color: var(--apmc-blue);
	margin-bottom: 10px;
}

.apmc-portal-title {
	font-size: clamp(1.75rem, 4vw, 2.25rem);
	margin: 0 0 14px;
	font-weight: 800;
}

.apmc-portal-lead {
	font-size: 1rem;
	color: #475569;
	line-height: 1.65;
	margin-bottom: 28px;
	max-width: 56ch;
}

.apmc-portal-card {
	background: var(--apmc-white);
	border: 1px solid var(--apmc-border);
	border-radius: var(--apmc-radius);
	padding: 24px;
	margin-bottom: 24px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.apmc-section-title {
	font-size: 1.125rem;
	margin: 0 0 18px;
}

.apmc-steps {
	list-style: none;
	margin: 0;
	padding: 0;
}

.apmc-step {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	padding: 14px 0;
	border-bottom: 1px solid #f1f5f9;
}

.apmc-step:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.apmc-step-number {
	flex-shrink: 0;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--apmc-blue-light);
	color: var(--apmc-blue);
	font-size: 0.875rem;
	font-weight: 700;
	border-radius: 50%;
}

.apmc-step-body strong {
	display: block;
	color: #334155;
	font-size: 0.9375rem;
	margin-bottom: 4px;
}

.apmc-step-body span {
	display: block;
	color: var(--apmc-muted);
	font-size: 0.875rem;
	line-height: 1.5;
}

/* FAQ accordion */
.apmc-portal-faq {
	margin-bottom: 8px;
}

.apmc-faq-item {
	background: var(--apmc-white);
	border: 1px solid var(--apmc-border);
	border-radius: 10px;
	margin-bottom: 10px;
	overflow: hidden;
}

.apmc-faq-item summary {
	padding: 14px 16px;
	font-size: 0.9375rem;
	font-weight: 600;
	color: #334155;
	cursor: pointer;
	list-style: none;
}

.apmc-faq-item summary::-webkit-details-marker {
	display: none;
}

.apmc-faq-item summary::after {
	content: '+';
	float: right;
	font-weight: 700;
	color: var(--apmc-blue);
}

.apmc-faq-item[open] summary::after {
	content: '−';
}

.apmc-faq-item p {
	padding: 0 16px 14px;
	font-size: 0.875rem;
	color: var(--apmc-muted);
	line-height: 1.55;
}

/* Credentials */
.apmc-credentials {
	background: var(--apmc-white);
	border: 1px solid var(--apmc-border);
	border-radius: var(--apmc-radius);
	padding: 32px 28px;
	margin-top: 8px;
	margin-bottom: 0;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
	text-align: center !important;
}

.apmc-credentials .apmc-section-title {
	text-align: center !important;
	margin-bottom: 16px;
}

.apmc-credentials-copy {
	max-width: 620px;
	margin: 0 auto 28px;
	text-align: left !important;
}

.apmc-credentials-lead {
	font-size: 0.9375rem;
	color: #475569;
	line-height: 1.75;
	margin: 0;
	text-align: left !important;
	text-wrap: pretty;
}

.apmc-credentials-lead strong {
	color: var(--apmc-blue);
	font-weight: 700;
}

.apmc-credentials-logos {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
	max-width: 720px;
	margin: 0 auto;
}

.apmc-credential-item {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px 16px;
	background: #fafbfc;
	border: 1px solid #edf2f7;
	border-radius: 12px;
	min-height: 112px;
}

.apmc-credential-item img {
	display: block;
	max-width: 100%;
	max-height: 76px;
	width: auto;
	height: auto;
	object-fit: contain;
}

/* Footer — flush against theme copyright bar */
.apmc-portal-footer {
	background: linear-gradient(160deg, var(--apmc-blue-dark) 0%, var(--apmc-blue) 55%, #0e4a72 100%);
	color: var(--apmc-white);
	padding: 40px 20px 36px;
	margin-bottom: 0;
	border-top: 3px solid rgba(255, 255, 255, 0.08);
}

.apmc-footer-inner {
	max-width: 960px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 28px;
	text-align: center;
}

.apmc-footer-brand {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
}

.apmc-footer-brand img {
	width: 56px;
	height: 56px;
	object-fit: contain;
	filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

.apmc-footer-brand p {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--apmc-white);
	line-height: 1.4;
	letter-spacing: 0.01em;
}

.apmc-footer-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 14px;
	width: 100%;
}

.apmc-footer-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 16px 12px;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 12px;
	text-align: center;
	transition: background 0.2s ease;
}

.apmc-footer-card:hover {
	background: rgba(255, 255, 255, 0.12);
}

.apmc-footer-label {
	font-size: 0.625rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: rgba(255, 255, 255, 0.55);
}

.apmc-footer-card a,
.apmc-footer-value {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--apmc-white);
	line-height: 1.4;
	word-break: break-word;
}

.apmc-portal-footer a {
	text-decoration: none;
}

.apmc-portal-footer a:hover {
	color: #bfdbfe;
	text-decoration: none;
}

/* Tablet */
@media (max-width: 960px) {
	.apmc-portal-layout {
		grid-template-columns: 1fr;
		gap: 28px;
	}

	.apmc-portal-form-panel {
		position: static;
		order: -1;
	}

	.apmc-portal-info {
		order: 1;
	}
}

/* Mobile */
@media (max-width: 640px) {
	.apmc-portal-inner {
		padding: 20px 14px 36px;
	}

	.apmc-portal-banner {
		font-size: 12px;
		padding: 12px 14px;
	}

	.apmc-banner-desktop {
		display: none;
	}

	.apmc-banner-mobile {
		display: block;
	}

	.apmc-portal-form-panel {
		padding: 22px 18px 26px;
		border-radius: 12px;
	}

	.apmc-portal-title {
		font-size: 1.625rem;
	}

	.apmc-portal-lead {
		font-size: 0.9375rem;
		margin-bottom: 22px;
	}

	.apmc-portal-card {
		padding: 18px 16px;
	}

	.apmc-result-item {
		grid-template-columns: 1fr;
		gap: 4px;
	}

	.apmc-result-item dd {
		text-align: left;
	}

	.apmc-result-item-status dd {
		text-align: left;
	}

	.apmc-result-header {
		flex-direction: column;
		align-items: flex-start;
	}

	.apmc-contact-links {
		flex-direction: column;
		gap: 6px;
	}

	.apmc-field input {
		font-size: 16px; /* prevents iOS zoom on focus */
	}

	.apmc-footer-inner {
		gap: 22px;
	}

	.apmc-footer-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
	}

	.apmc-footer-brand p {
		font-size: 1rem;
	}

	.apmc-credentials {
		padding: 24px 18px;
	}

	.apmc-credentials-copy {
		max-width: 100%;
	}

	.apmc-credentials-logos {
		grid-template-columns: 1fr;
		max-width: 280px;
	}
}

@media (max-width: 480px) {
	.apmc-footer-grid {
		grid-template-columns: 1fr;
	}

	.apmc-portal-footer {
		padding: 32px 16px 28px;
	}
}

@media (max-width: 380px) {
	.apmc-submit-btn {
		font-size: 0.8125rem;
		letter-spacing: 0.02em;
	}
}
