/**
 * Assessment Access – Suretek
 * Scoped Frontend Styles for the [npo_assessment_access] shortcode & page.
 */

:root {
	--npo-aa-primary: #0ea5e9;
	--npo-aa-primary-hover: #0284c7;
	--npo-aa-primary-focus-ring: rgba(14, 165, 233, 0.22);
	--npo-aa-primary-shadow: rgba(14, 165, 233, 0.28);
	--npo-aa-bg-card: #ffffff;
	--npo-aa-text-main: #0f172a;
	--npo-aa-text-muted: #64748b;
	--npo-aa-border: #e2e8f0;
	--npo-aa-border-focus: #0ea5e9;
	--npo-aa-error-bg: #fef2f2;
	--npo-aa-error-border: #fecaca;
	--npo-aa-error-text: #991b1b;
	--npo-aa-info-bg: #f0fdf4;
	--npo-aa-info-border: #bbf7d0;
	--npo-aa-info-text: #166534;
}

/* Full-Width & Centered Layout Override for Themes with Empty Sidebars */
body.npo-aa-page #main,
body.page-id-1004 #main,
body:has(.npo-aa-outer-wrap) #main {
	float: none !important;
	width: 100% !important;
	max-width: 100% !important;
	margin-left: auto !important;
	margin-right: auto !important;
}

body.npo-aa-page #sidebar,
body.page-id-1004 #sidebar,
body:has(.npo-aa-outer-wrap) #sidebar {
	display: none !important;
	width: 0 !important;
	margin: 0 !important;
}

body.npo-aa-page .inner.right_sidebar,
body.npo-aa-page .inner.left_sidebar,
body.page-id-1004 .inner.right_sidebar,
body.page-id-1004 .inner.left_sidebar,
body:has(.npo-aa-outer-wrap) .inner.right_sidebar,
body:has(.npo-aa-outer-wrap) .inner.left_sidebar {
	width: 100% !important;
}

body.npo-aa-page .entry.content,
body.page-id-1004 .entry.content,
body:has(.npo-aa-outer-wrap) .entry.content {
	width: 100% !important;
	max-width: 100% !important;
	margin-left: auto !important;
	margin-right: auto !important;
}

/* Outer Full-Width Centering Wrapper */
.npo-aa-outer-wrap {
	width: 100%;
	display: flex;
	justify-content: center;
	align-items: flex-start;
	margin: 0 auto;
	padding: 20px 0 48px;
	box-sizing: border-box;
	clear: both;
}

/* Container */
.npo-aa-container {
	width: 100%;
	max-width: 540px;
	margin: 0 auto !important;
	padding: 0 16px;
	box-sizing: border-box;
	display: block;
}

/* Main Card */
.npo-aa-card {
	width: 100%;
	margin: 0 auto;
	background: var(--npo-aa-bg-card);
	border: 1px solid var(--npo-aa-border);
	border-radius: 16px;
	box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
	overflow: hidden;
	transition: box-shadow 0.2s ease, border-color 0.2s ease;
	font-family: inherit;
}

/* Card Header */
.npo-aa-card-header {
	padding: 36px 32px 20px;
	text-align: center;
	box-sizing: border-box;
}

.npo-aa-header-badge {
	width: 56px;
	height: 56px;
	border-radius: 14px;
	background: #e0f2fe;
	color: var(--npo-aa-primary-hover);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 16px;
	box-shadow: 0 2px 6px rgba(14, 165, 233, 0.15);
}

.npo-aa-header-badge svg {
	width: 28px;
	height: 28px;
}

.npo-aa-badge-lock {
	background: #f1f5f9;
	color: #475569;
	box-shadow: none;
}

.npo-aa-title {
	font-size: 24px;
	font-weight: 700;
	color: var(--npo-aa-text-main);
	margin: 0 0 10px;
	line-height: 1.3;
	letter-spacing: -0.015em;
}

.npo-aa-subtitle {
	font-size: 15px;
	line-height: 1.55;
	color: var(--npo-aa-text-muted);
	margin: 0 auto;
	max-width: 440px;
}

/* Card Body */
.npo-aa-card-body {
	padding: 0 32px 32px;
	box-sizing: border-box;
}

/* Alerts */
.npo-aa-alert {
	border-radius: 10px;
	padding: 14px 16px;
	margin-bottom: 22px;
	font-size: 14px;
	line-height: 1.5;
	display: flex;
	align-items: flex-start;
	gap: 12px;
	box-sizing: border-box;
}

.npo-aa-alert-icon {
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	margin-top: 1px;
}

.npo-aa-alert-content {
	flex: 1;
}

.npo-aa-alert-error {
	background: var(--npo-aa-error-bg);
	border: 1px solid var(--npo-aa-error-border);
	color: var(--npo-aa-error-text);
}

.npo-aa-alert-error .npo-aa-alert-icon {
	color: #ef4444;
}

.npo-aa-alert-info {
	background: var(--npo-aa-info-bg);
	border: 1px solid var(--npo-aa-info-border);
	color: var(--npo-aa-info-text);
}

.npo-aa-alert-info .npo-aa-alert-icon {
	color: #10b981;
}

.npo-aa-alert-content strong {
	display: block;
	font-weight: 600;
	margin-bottom: 2px;
}

.npo-aa-alert-content p {
	margin: 0 0 6px;
}

.npo-aa-alert-link {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-weight: 600;
	color: #15803d;
	text-decoration: underline;
	transition: color 0.15s ease;
}

.npo-aa-alert-link:hover {
	color: #166534;
}

/* Form Groups */
.npo-aa-form {
	margin: 0;
}

.npo-aa-field-group {
	margin-bottom: 24px;
}

.npo-aa-label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: #334155;
	margin-bottom: 8px;
	letter-spacing: -0.01em;
}

.npo-aa-input-wrapper {
	position: relative;
	width: 100%;
}

.npo-aa-input-prefix {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	color: #94a3b8;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}

.npo-aa-input-prefix svg {
	width: 20px;
	height: 20px;
}

.npo-aa-input {
	width: 100%;
	height: 52px;
	padding: 0 16px 0 44px;
	font-size: 16px;
	font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
	font-weight: 600;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	color: #1e293b;
	background: #f8fafc;
	border: 1.5px solid #cbd5e1;
	border-radius: 10px;
	box-sizing: border-box;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.npo-aa-input::placeholder {
	color: #94a3b8;
	font-weight: 400;
	letter-spacing: 0.5px;
	text-transform: none;
}

.npo-aa-input:hover {
	border-color: #94a3b8;
	background: #ffffff;
}

.npo-aa-input:focus {
	outline: none;
	border-color: var(--npo-aa-border-focus);
	background: #ffffff;
	box-shadow: 0 0 0 3px var(--npo-aa-primary-focus-ring);
}

.npo-aa-help-text {
	font-size: 13px;
	line-height: 1.45;
	color: var(--npo-aa-text-muted);
	margin: 8px 0 0;
}

/* Primary Button & Actions */
.npo-aa-actions {
	margin-top: 24px;
}

.npo-aa-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	height: 50px;
	padding: 0 16px;
	font-size: 15px;
	font-weight: 600;
	border-radius: 10px;
	cursor: pointer;
	box-sizing: border-box;
	text-decoration: none;
	transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease, opacity 0.15s ease;
}

.npo-aa-btn-primary {
	background: #6b7aaa;
	border: 1px solid #6b7aaa;
	color: #ffffff !important;
	box-shadow: 0 4px 6px -1px var(--npo-aa-primary-shadow);
}

.npo-aa-btn-primary:hover:not(:disabled) {
	background: #576aa9;
	border-color: #576aa9;
	transform: translateY(-1px);
	box-shadow: 0 6px 12px -2px var(--npo-aa-primary-shadow);
	color: #ffffff !important;
}

.npo-aa-btn-primary:active:not(:disabled) {
	transform: translateY(0);
	box-shadow: 0 2px 4px -1px var(--npo-aa-primary-shadow);
}

.npo-aa-btn-primary:focus-visible {
	outline: 2px solid var(--npo-aa-primary-hover);
	outline-offset: 2px;
}

.npo-aa-btn-secondary {
	background: #ffffff;
	border: 1.5px solid #cbd5e1;
	color: #334155 !important;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
	margin-top: 10px;
}

.npo-aa-btn-secondary:hover:not(:disabled) {
	background: #f8fafc;
	border-color: #94a3b8;
	color: #1e293b !important;
	transform: translateY(-1px);
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
}

.npo-aa-btn-secondary:active:not(:disabled) {
	transform: translateY(0);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.npo-aa-btn-secondary:focus-visible {
	outline: 2px solid var(--npo-aa-primary-hover);
	outline-offset: 2px;
}

/* Loading & Disabled States */
.npo-aa-btn:disabled,
.npo-aa-btn.npo-aa-loading {
	background: #94a3b8 !important;
	border-color: #94a3b8 !important;
	color: #ffffff !important;
	cursor: not-allowed !important;
	transform: none !important;
	box-shadow: none !important;
	opacity: 0.92;
}

.npo-aa-btn-arrow {
	transition: transform 0.15s ease;
}

.npo-aa-btn-primary:hover:not(:disabled) .npo-aa-btn-arrow {
	transform: translateX(3px);
}

/* Spinner */
.npo-aa-spinner {
	display: inline-block;
	width: 18px;
	height: 18px;
	border: 2.5px solid rgba(255, 255, 255, 0.35);
	border-radius: 50%;
	border-top-color: #ffffff;
	animation: npoAaSpin 0.7s linear infinite;
	flex-shrink: 0;
}

@keyframes npoAaSpin {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}

/* Card Footer */
.npo-aa-card-footer {
	background: #f8fafc;
	border-top: 1px solid #f1f5f9;
	padding: 16px 28px;
	font-size: 13px;
	color: var(--npo-aa-text-muted);
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
}

.npo-aa-footer-item {
	display: flex;
	align-items: center;
	gap: 8px;
	line-height: 1.4;
	text-align: center;
}

.npo-aa-footer-icon {
	width: 16px;
	height: 16px;
	color: #10b981;
	flex-shrink: 0;
}

/* Responsive adjustments */
@media (max-width: 600px) {
	.npo-aa-container {
		margin: 20px auto 36px;
		padding: 0 0px;
	}

	.npo-aa-card-header {
		padding: 28px 20px 16px;
	}

	.npo-aa-title {
		font-size: 21px;
	}

	.npo-aa-subtitle {
		font-size: 14px;
	}

	.npo-aa-card-body {
		padding: 0 15px 24px;
	}

	.npo-aa-card-footer {
		padding: 14px 20px;
		font-size: 12px;
	}

	.npo-aa-input {
		height: 48px;
		font-size: 15px;
	}

	.npo-aa-btn {
		height: 48px;
		font-size: 15px;
	}
}
