/* AA Psychometrics Frontend Styles */

/* ═══════════════════════════════════════════════════════════════════════
   PREVIEW / CONSENT PAGE — full-page background image layout
   ═══════════════════════════════════════════════════════════════════════ */

.aa-psych-preview-page {
	min-height: 100vh;
	padding: 20px 20px 40px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	position: relative;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	background-attachment: fixed;
}

.aa-psych-preview-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 60, 82, 0.85);
	z-index: 0;
}

.aa-psych-preview-container {
	max-width: 900px;
	margin: 0 auto;
	position: relative;
	z-index: 1;
}

/* Header: title + meta bar */
.aa-psych-preview-header {
	text-align: center;
	color: #fff;
	margin-bottom: 30px;
}

.aa-psych-preview-title {
	font-size: 1.5rem;
	font-weight: 700;
	color: #fff;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
	margin-bottom: 15px;
}

.aa-psych-preview-meta {
	display: flex;
	justify-content: center;
	gap: 30px;
	margin-top: 20px;
	flex-wrap: wrap;
}

.aa-psych-meta-item {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.aa-psych-meta-label {
	font-size: 0.85rem;
	color: rgba(255, 255, 255, 0.8);
	font-weight: 500;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.aa-psych-meta-value {
	font-size: 1rem;
	font-weight: 700;
	color: #fff;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* White card containing description + consent */
.aa-psych-preview-form {
	padding: 30px;
	background: rgba(255, 255, 255, 0.98);
	border-radius: 16px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
	backdrop-filter: blur(10px);
	margin-bottom: 20px;
}

.aa-psych-preview-description {
	font-size: 1rem;
	line-height: 1.6;
	color: #333;
	margin-bottom: 0;
	text-align: left;
}

/* Consent section — neutral grey */
.aa-psych-consent-section {
	background: #f8f9fa;
	border: 1px solid #dee2e6;
	border-radius: 8px;
	padding: 24px;
	margin: 24px 0;
}

.aa-psych-consent-section h3 {
	margin: 0 0 8px;
	font-size: 18px;
	color: #333;
}

.aa-psych-consent-intro {
	color: #666;
	margin-bottom: 20px;
	font-size: 14px;
}

.aa-psych-consent-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.aa-psych-consent-item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	cursor: pointer;
	padding: 12px;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	transition: all 0.2s;
}

.aa-psych-consent-item:hover {
	border-color: #ccc;
}

.aa-psych-consent-item input[type="checkbox"] {
	width: 20px;
	height: 20px;
	margin-top: 2px;
	flex-shrink: 0;
	cursor: pointer;
	accent-color: #28a745;
}

.aa-psych-consent-item span {
	color: #333;
	line-height: 1.5;
}

/* Begin button */
.aa-psych-preview-actions {
	display: flex;
	justify-content: center;
	align-items: center;
	margin-top: 30px;
	padding-top: 30px;
	border-top: 1px solid #e9ecef;
}

.aa-psych-btn-begin {
	display: inline-block;
	padding: 14px 48px;
	border-radius: 6px;
	text-decoration: none;
	font-weight: 600;
	font-size: 16px;
	cursor: pointer;
	text-align: center;
	transition: all 0.3s ease;
	background: #fff;
	color: #0073aa;
	border: 1px solid #0073aa;
}

.aa-psych-btn-begin:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
	color: #0073aa;
}

.aa-psych-btn-begin.disabled {
	opacity: 0.5;
	cursor: not-allowed;
	pointer-events: none;
}


/* ═══════════════════════════════════════════════════════════════════════
   STEPS PAGE — full-page background with progress dots
   ═══════════════════════════════════════════════════════════════════════ */

.aa-psych-steps-page {
	min-height: 100vh;
	padding: 20px 20px 40px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	position: relative;
	background-size: cover;
	background-position: center;
	background-attachment: fixed;
	display: flex;
	align-items: center;
	justify-content: center;
}

.aa-psych-steps-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.7);
	z-index: 0;
}

.aa-psych-steps-container {
	position: relative;
	z-index: 1;
	max-width: 800px;
	width: 100%;
	margin: 0 auto;
}

/* Header: title + instructions */
.aa-psych-steps-header {
	text-align: center;
	color: #fff;
	margin-bottom: 15px;
}

.aa-psych-steps-title {
	font-size: 1.5rem;
	font-weight: 700;
	color: #fff;
	text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.aa-psych-steps-instructions {
	font-size: 0.9rem;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.95);
	margin: 0 auto;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Progress pill */
.aa-psych-progress-wrapper {
	text-align: center;
	margin-bottom: 15px;
}

.aa-psych-progress-text-pill {
	display: inline-block;
	background: rgba(255, 255, 255, 0.15);
	backdrop-filter: blur(10px);
	padding: 8px 20px;
	border-radius: 20px;
	color: #fff;
	font-weight: 600;
	font-size: 0.9rem;
}

/* Progress dots */
.aa-psych-dots-container {
	margin-bottom: 30px;
}

.aa-psych-progress-dots {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	max-width: 100%;
	overflow: visible;
	padding: 10px 0;
}

.aa-psych-dot {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.2);
	border: 2px solid rgba(255, 255, 255, 0.3);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.3s ease;
	position: relative;
	color: #fff;
	font-size: 0.65rem;
	font-weight: 600;
	flex-shrink: 0;
}

.aa-psych-dot:hover {
	background: rgba(255, 255, 255, 0.3);
	border-color: rgba(255, 255, 255, 0.5);
	transform: scale(1.1);
}

.aa-psych-dot.active {
	background: #fff;
	border-color: #fff;
	color: #003c52;
	transform: scale(1.1);
	box-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

.aa-psych-dot.completed {
	background: rgba(40, 167, 69, 0.9);
	border-color: rgba(40, 167, 69, 1);
	color: #fff;
}

.aa-psych-dot-number {
	display: inline-block;
}

.aa-psych-dot.completed .aa-psych-dot-number {
	display: none;
}

.aa-psych-dot-check {
	display: none;
}

.aa-psych-dot.completed .aa-psych-dot-check {
	display: inline-block;
	font-size: 0.7rem;
	color: #fff;
}

/* White form card */
.aa-psych-form-card {
	background: rgba(255, 255, 255, 0.98);
	border-radius: 16px;
	padding: 40px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	backdrop-filter: blur(10px);
}

.aa-psych-question-header {
	margin-bottom: 25px;
}

.aa-psych-question-title {
	font-size: 1.3rem;
	margin-bottom: 10px;
	font-weight: 600;
	line-height: 1.4;
	width: 100%;
	text-align: center;
	color: #1d2327;
}

.aa-psych-question-prompt {
	color: #666;
	font-size: 0.95rem;
	line-height: 1.5;
	margin-bottom: 0;
	text-align: center;
}

/* Likert scale — horizontal layout matching metrics */
.aa-psych-likert-scale {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	gap: 15px;
	margin: 30px 0;
	align-items: flex-start;
}

.aa-psych-likert-option {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	cursor: pointer;
	flex: 1;
	min-width: 0;
	text-align: center;
	position: relative;
}

.aa-psych-likert-option input[type="radio"] {
	appearance: none;
	-webkit-appearance: none;
	width: 35px;
	height: 35px;
	border: 3px solid #ddd;
	border-radius: 50%;
	cursor: pointer;
	position: relative;
	transition: all 0.3s ease;
	margin: 0 0 10px 0;
	background: #fff;
}

.aa-psych-likert-option input[type="radio"]:hover {
	transform: scale(1.1);
	border-color: #999;
}

.aa-psych-likert-option input[type="radio"]:checked {
	background: #003c52;
	border-color: #003c52;
}

.aa-psych-likert-option input[type="radio"]:checked::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #fff;
}

.aa-psych-likert-label {
	font-size: 0.9rem;
	font-weight: 700;
	cursor: pointer;
	line-height: 1.3;
	color: #000;
	word-wrap: break-word;
	hyphens: auto;
	transition: all 0.3s ease;
}

/* Step navigation */
.aa-psych-step-nav {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0;
	margin-top: 30px;
}

.aa-psych-step-prev {
	background: transparent;
	color: #999;
	border: none;
	text-decoration: underline;
	cursor: pointer;
	font-size: 14px;
	font-weight: 400;
	padding: 0;
	transition: color 0.3s;
	order: 2;
	margin-top: 20px;
}

.aa-psych-step-prev:hover {
	color: #666;
}

.aa-psych-step-next {
	display: inline-block;
	padding: 14px 48px;
	border-radius: 6px;
	font-weight: 600;
	font-size: 16px;
	border: none;
	cursor: pointer;
	transition: all 0.3s ease;
	background: #003c52;
	color: #fff;
	text-decoration: none;
	text-align: center;
	order: 1;
}

.aa-psych-step-next:hover {
	background: #502a65;
	color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.aa-psych-step-next:disabled,
.aa-psych-step-next.disabled {
	background: #ccc;
	cursor: not-allowed;
	pointer-events: none;
	transform: none;
	box-shadow: none;
}


/* ═══════════════════════════════════════════════════════════════════════
   RESULTS PAGE
   ═══════════════════════════════════════════════════════════════════════ */

.aa-psych-results-page {
	min-height: 100vh;
	position: relative;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.aa-psych-results-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 60, 82, 0.5);
	z-index: 0;
	pointer-events: none;
}

.aa-psych-results-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 40px 20px;
	position: relative;
	z-index: 1;
}

.aa-psych-results-header {
	background: linear-gradient(135deg, #003c52 0%, #502a65 100%);
	color: #fff;
	padding: 40px 30px;
	border-radius: 12px;
	margin-bottom: 30px;
}

.aa-psych-results-header h1 {
	margin: 0;
	font-size: 32px;
	font-weight: 600;
	color: #fff;
}

.aa-psych-results-layout {
	display: flex;
	gap: 30px;
	align-items: flex-start;
}

/* Side Navigation */
.aa-psych-side-nav {
	width: 220px;
	flex-shrink: 0;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	padding: 15px 0;
	position: sticky;
	top: 100px;
}

.aa-psych-nav-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 20px;
	text-decoration: none;
	color: #555;
	font-weight: 500;
	font-size: 14px;
	transition: all 0.2s;
	border-left: 3px solid transparent;
}

.aa-psych-nav-item:hover {
	background: rgba(0, 60, 82, 0.06);
	color: #003c52;
}

.aa-psych-nav-item.active {
	background: rgba(0, 60, 82, 0.1);
	color: #003c52;
	border-left-color: #003c52;
}

.aa-psych-nav-group {
	margin: 10px 0;
	border-top: 1px solid #eee;
	padding-top: 10px;
}

.aa-psych-nav-group-header {
	padding: 10px 20px 6px;
	font-weight: 600;
	font-size: 12px;
	color: #888;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.aa-psych-nav-child {
	padding-left: 30px;
	font-size: 13px;
}

.aa-psych-nav-icon {
	font-size: 1.1em;
	min-width: 18px;
	text-align: center;
}

/* Content */
.aa-psych-results-content {
	flex: 1;
	min-width: 0;
}

.aa-psych-results-section {
	display: none;
	background: #fff;
	padding: 40px;
	border-radius: 12px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	margin-bottom: 30px;
	line-height: 1.7;
}

.aa-psych-results-section.active {
	display: block;
}

.aa-psych-results-section h2 {
	color: #003c52;
	margin: 0 0 20px;
	font-size: 24px;
}

/* Overview row: spider chart (left) + scores & bars (right) */
.aa-psych-overview-row {
	display: flex;
	align-items: flex-start;
	gap: 20px;
	margin-bottom: 30px;
	padding: 20px;
	background: rgba(0, 60, 82, 0.04);
	border-radius: 12px;
}

.aa-psych-overview-chart {
	flex: 0 0 auto;
	width: 380px;
	min-width: 0;
}

.aa-psych-overview-chart svg {
	width: 100%;
	height: auto;
}

.aa-psych-overview-graph {
	flex: 1;
	min-width: 0;
}

.aa-psych-overview-graph svg {
	width: 100%;
	height: auto;
}

.aa-psych-overview-row > .aa-psych-overview-scores {
	flex: 0 0 160px;
	text-align: center;
}

.aa-psych-overview-scores {
	flex: 1;
	min-width: 0;
}

.aa-psych-overview-total {
	margin-bottom: 20px;
}

/* Dimension detail: spider + score side by side */
.aa-psych-insight-charts {
	display: flex;
	align-items: center;
	gap: 30px;
	margin-bottom: 30px;
	padding: 20px;
	background: rgba(0, 60, 82, 0.04);
	border-radius: 12px;
}

.aa-psych-insight-chart {
	flex: 1;
	min-width: 0;
	max-width: 350px;
}

.aa-psych-insight-chart svg {
	width: 100%;
	height: auto;
}

.aa-psych-insight-score {
	flex: 0 0 auto;
	text-align: center;
	padding: 20px;
}

/* Total Score */
.aa-psych-total-score {
	text-align: center;
	margin-bottom: 30px;
	padding: 30px 20px;
	background: rgba(0, 60, 82, 0.04);
	border-radius: 12px;
}

.aa-psych-total-value {
	font-size: 52px;
	font-weight: 700;
	color: #502a65;
}

.aa-psych-total-unit {
	font-size: 24px;
	color: #666;
}

.aa-psych-total-label {
	font-size: 14px;
	color: #666;
	margin-top: 4px;
}

.aa-psych-cutoff-badge {
	display: inline-block;
	margin-top: 12px;
	padding: 6px 16px;
	color: #fff;
	border-radius: 4px;
	font-weight: 600;
	font-size: 14px;
}

/* Summary Bars */
.aa-psych-summary-bars {
	margin-bottom: 30px;
}

.aa-psych-bar-row {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
}

.aa-psych-bar-icon {
	width: 20px;
	font-size: 14px;
	text-align: center;
	flex-shrink: 0;
}

.aa-psych-bar-label {
	width: 100px;
	font-size: 12px;
	color: #666;
	flex-shrink: 0;
}

.aa-psych-bar-track {
	flex: 1;
	background: #eee;
	border-radius: 4px;
	height: 10px;
	overflow: hidden;
	position: relative;
}

.aa-psych-bar-cutoff {
	position: absolute;
	top: 0;
	bottom: 0;
	opacity: 0.18;
	z-index: 1;
}

.aa-psych-bar-fill {
	height: 100%;
	border-radius: 4px;
	position: relative;
	z-index: 2;
	transition: width 0.3s ease;
}

.aa-psych-bar-value {
	width: 45px;
	text-align: right;
	font-size: 13px;
	font-weight: 600;
	flex-shrink: 0;
}

/* Dimension Score Block */
.aa-psych-dim-score-block {
	padding: 24px 0;
	margin-bottom: 20px;
}

.aa-psych-dim-score-value {
	font-size: 48px;
	font-weight: 700;
}

.aa-psych-dim-score-label {
	font-size: 14px;
	color: #666;
	margin-top: 4px;
}

.aa-psych-dim-description {
	margin-bottom: 20px;
	line-height: 1.6;
	color: #555;
}

/* Items List */
.aa-psych-items-list {
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid #eee;
}

.aa-psych-items-list h4 {
	margin: 0 0 15px;
	color: #003c52;
	font-size: 15px;
}

.aa-psych-item-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 0;
	border-bottom: 1px solid #f0f0f0;
}

.aa-psych-item-row:last-child {
	border-bottom: none;
}

.aa-psych-item-label {
	flex: 1;
	font-size: 14px;
	color: #555;
}

.aa-psych-item-score {
	font-size: 16px;
	font-weight: 600;
	margin-left: 20px;
	white-space: nowrap;
}

.aa-psych-item-response-label {
	font-size: 12px;
	color: #999;
	font-weight: 400;
	margin-right: 8px;
	white-space: nowrap;
}

.aa-psych-reverse-badge {
	display: inline-block;
	background: #e8f4f8;
	color: #2271b1;
	padding: 1px 5px;
	border-radius: 3px;
	font-size: 11px;
	font-weight: 700;
	margin-right: 4px;
}

.aa-psych-results-desc {
	margin-top: 30px;
	padding: 20px;
	background: #f9f9f9;
	border-radius: 8px;
	line-height: 1.6;
	color: #555;
}


/* ═══════════════════════════════════════════════════════════════════════
   DIMENSIONS LIST SHORTCODE
   ═══════════════════════════════════════════════════════════════════════ */

.aa-dimensions-list {
	list-style: none;
	margin: 16px 0 0 0;
	padding: 0 30px;
}

.aa-dimensions-list-item {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	margin: 0 0 12px 0;
}

.aa-dimensions-icon {
	font-size: 18px;
	min-width: 20px;
	text-align: center;
	align-self: flex-start;
	margin-top: 2px;
}

.aa-dimensions-text {
	line-height: 1.4;
	color: #555;
}

.aa-dimensions-title {
	font-weight: 600;
	color: #111;
}

.aa-dimensions-description {
	color: #555;
}


/* ═══════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
	/* Steps */
	.aa-psych-steps-page {
		padding: 20px 10px;
	}

	.aa-psych-form-card {
		padding: 30px 20px;
	}

	.aa-psych-likert-scale {
		flex-direction: column;
		gap: 15px;
	}

	.aa-psych-likert-option {
		flex-direction: row;
		justify-content: flex-start;
		align-items: center;
	}

	.aa-psych-likert-option input[type="radio"] {
		margin-right: 15px;
		margin-bottom: 0;
	}

	.aa-psych-likert-label {
		font-size: 1rem;
		text-align: left;
	}

	.aa-psych-progress-dots {
		gap: 10px;
	}

	.aa-psych-dot {
		width: 26px;
		height: 26px;
		font-size: 0.7rem;
	}

	.aa-psych-dot.completed .aa-psych-dot-check {
		font-size: 0.85rem;
	}

	.aa-psych-step-next {
		width: 100%;
		padding: 14px 32px;
	}

	/* Preview / Consent */
	.aa-psych-preview-header {
		padding: 20px;
	}

	.aa-psych-preview-title {
		font-size: 1.3rem;
	}

	.aa-psych-preview-form {
		padding: 20px;
	}

	.aa-psych-preview-actions {
		flex-direction: column;
		gap: 12px;
	}

	.aa-psych-btn-begin {
		width: 100%;
	}

	.aa-psych-preview-meta {
		gap: 15px;
	}

	/* Results */
	.aa-psych-overview-row {
		flex-direction: column;
	}

	.aa-psych-overview-chart {
		width: 100%;
		max-width: 300px;
		margin: 0 auto;
	}

	.aa-psych-insight-charts {
		flex-direction: column;
	}

	.aa-psych-insight-chart {
		max-width: 280px;
		margin: 0 auto;
	}

	.aa-psych-results-layout {
		flex-direction: column;
	}

	.aa-psych-side-nav {
		width: 100%;
		position: relative;
		top: 0;
	}

	.aa-psych-results-section {
		padding: 24px;
	}

	.aa-psych-bar-label {
		width: 70px;
	}

	.aa-psych-dim-score-value {
		font-size: 36px;
	}

	.aa-psych-total-value {
		font-size: 40px;
	}
}
