/* =====================================================
   MIND LABS Assessment Platform – Step 2
   Premium SaaS Design System
   ===================================================== */

:root {
	--mlap-primary: #2563eb;
	--mlap-primary-dark: #1e40af;
	--mlap-accent: #3b82f6;
	--mlap-bg: #0f172a;
	--mlap-card: #1e293b;
	--mlap-card-hover: #273549;
	--mlap-text: #f1f5f9;
	--mlap-muted: #94a3b8;
	--mlap-border: #334155;
	--mlap-success: #22c55e;
	--mlap-radius: 18px;
	--mlap-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
	--mlap-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Container */
.mlap-premium-container {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", sans-serif;
	max-width: 960px;
	margin: 40px auto;
	padding: 20px;
	color: var(--mlap-text);
	background: linear-gradient(160deg, #0f172a 0%, #1e293b 100%);
	border-radius: 28px;
	box-shadow: var(--mlap-shadow);
	border: 1px solid var(--mlap-border);
	min-height: 520px;
}

/* Card */
.mlap-card {
	background: var(--mlap-card);
	border-radius: var(--mlap-radius);
	padding: 40px 36px;
	border: 1px solid var(--mlap-border);
	box-shadow: 0 10px 15px -3px rgba(0,0,0,0.2);
}

.mlap-card h2 {
	font-size: 28px;
	font-weight: 800;
	margin: 0 0 10px;
	text-align: center;
	letter-spacing: -0.02em;
}

.mlap-card .subtitle {
	text-align: center;
	color: var(--mlap-muted);
	font-size: 16px;
	margin-bottom: 36px;
}

/* Language Grid */
.mlap-language-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 16px;
}

.mlap-lang-card {
	background: #0f172a;
	border: 2px solid var(--mlap-border);
	border-radius: 16px;
	padding: 26px 16px;
	text-align: center;
	cursor: pointer;
	transition: var(--mlap-transition);
	position: relative;
	overflow: hidden;
}

.mlap-lang-card:hover {
	border-color: var(--mlap-primary);
	transform: translateY(-5px);
	background: var(--mlap-card-hover);
	box-shadow: 0 0 0 1px var(--mlap-primary);
}

.mlap-lang-card.selected {
	border-color: var(--mlap-primary);
	background: linear-gradient(145deg, #1e3a8a, #1e40af);
	box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.25);
}

.mlap-lang-card .flag {
	font-size: 48px;
	display: block;
	margin-bottom: 14px;
	transition: transform 0.3s ease;
}

.mlap-lang-card.selected .flag {
	transform: scale(1.12);
}

.mlap-lang-card .native {
	font-size: 18px;
	font-weight: 700;
	margin-bottom: 4px;
}

.mlap-lang-card .english {
	font-size: 13px;
	color: var(--mlap-muted);
}

/* Selected checkmark */
.mlap-lang-card.selected::after {
	content: "✓";
	position: absolute;
	top: 10px;
	right: 12px;
	background: var(--mlap-success);
	color: white;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	font-size: 13px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Loading / Spinner */
.mlap-loading {
	text-align: center;
	padding: 80px 20px;
}

.mlap-spinner {
	width: 48px;
	height: 48px;
	border: 4px solid var(--mlap-border);
	border-top-color: var(--mlap-primary);
	border-radius: 50%;
	animation: mlap-spin 0.9s linear infinite;
	margin: 0 auto 20px;
}

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

/* Temporary next-step message */
.mlap-next-step {
	text-align: center;
	padding: 40px 20px;
}

.mlap-next-step h3 {
	font-size: 22px;
	margin-bottom: 12px;
}

.mlap-btn {
	display: inline-block;
	background: linear-gradient(145deg, var(--mlap-primary), var(--mlap-accent));
	color: white;
	border: none;
	padding: 14px 36px;
	font-size: 16px;
	font-weight: 700;
	border-radius: 9999px;
	cursor: pointer;
	transition: var(--mlap-transition);
	box-shadow: 0 8px 20px -4px rgba(37, 99, 235, 0.4);
	margin-top: 24px;
}

.mlap-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 25px -4px rgba(37, 99, 235, 0.5);
}

/* Responsive */
@media (max-width: 640px) {
	.mlap-premium-container {
		margin: 16px 10px;
		padding: 12px;
		border-radius: 20px;
	}
	.mlap-card {
		padding: 28px 18px;
	}
	.mlap-language-grid {
		grid-template-columns: 1fr 1fr;
		gap: 12px;
	}
	.mlap-lang-card {
		padding: 20px 12px;
	}
	.mlap-lang-card .flag {
		font-size: 38px;
	}
}

/* =====================================================
   Step 3 – Form & Option Cards
   ===================================================== */

.mlap-option-card {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	background: #0f172a;
	border: 2px solid var(--mlap-border);
	border-radius: 14px;
	padding: 18px 20px;
	margin-bottom: 12px;
	cursor: pointer;
	transition: var(--mlap-transition);
}

.mlap-option-card:hover {
	border-color: var(--mlap-primary);
	background: var(--mlap-card-hover);
}

.mlap-option-card input[type="checkbox"] {
	margin-top: 4px;
	transform: scale(1.25);
	accent-color: var(--mlap-primary);
}

.mlap-input {
	width: 100%;
	padding: 14px 16px;
	border: 2px solid var(--mlap-border);
	border-radius: 12px;
	background: #0f172a;
	color: var(--mlap-text);
	font-size: 15px;
	transition: border-color 0.2s ease;
	box-sizing: border-box;
}

.mlap-input:focus {
	outline: none;
	border-color: var(--mlap-primary);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.mlap-input::placeholder {
	color: #64748b;
}

/* =====================================================
   Step 4 – Progress Bar & Question Styles
   ===================================================== */

.mlap-progress {
	background: #0f172a;
	padding: 18px 22px;
	border-radius: 14px;
	margin-bottom: 28px;
	border: 1px solid var(--mlap-border);
}

.mlap-progress-bar {
	height: 8px;
	background: #334155;
	border-radius: 9999px;
	overflow: hidden;
}

.mlap-progress-fill {
	height: 100%;
	background: linear-gradient(to right, var(--mlap-primary), #60a5fa);
	transition: width 0.45s ease;
}

.mlap-question {
	font-size: 22px;
	font-weight: 700;
	text-align: center;
	margin: 20px 0 12px;
	line-height: 1.4;
}

.mlap-options {
	display: grid;
	gap: 12px;
	max-width: 580px;
	margin: 0 auto;
}

.mlap-option-card.selected {
	border-color: var(--mlap-primary);
	background: linear-gradient(145deg, #1e3a8a, #1e40af);
}

/* Step 5 – Results refinements */
.mlap-results {
	text-align: center;
}
.mlap-chart-container {
	position: relative;
}

/* ===== Interface Fix: Whole option card clickable ===== */
.mlap-option-card {
	cursor: pointer;
	user-select: none;
	position: relative;
}
.mlap-option-card input[type="checkbox"],
.mlap-option-card input[type="radio"] {
	pointer-events: none; /* clicks go to the label/card */
	margin-top: 3px;
}
.mlap-option-card.selected {
	border-color: var(--mlap-primary) !important;
	background: linear-gradient(145deg, #1e3a8a, #1e40af) !important;
}


/* ===== Personality Likert colour scale ===== */
.mlap-option-card.mlap-likert {
	justify-content: center;
	text-align: center;
	font-weight: 700;
	border-width: 2px;
}
.mlap-option-card.mlap-likert .mlap-likert-label {
	width: 100%;
	text-align: center;
	/* Black outline so text stays readable on all colours */
	text-shadow:
		-1px -1px 0 #000,
		 1px -1px 0 #000,
		-1px  1px 0 #000,
		 1px  1px 0 #000,
		 0   -1px 0 #000,
		 0    1px 0 #000,
		-1px  0   0 #000,
		 1px  0   0 #000;
	font-weight: 700;
	font-size: 15px;
	line-height: 1.35;
}
/* 5 = Agree strongly — full green */
.mlap-option-card.mlap-likert-5 {
	background: #16a34a !important;
	border-color: #15803d !important;
	color: #ffffff !important;
}
.mlap-option-card.mlap-likert-5:hover,
.mlap-option-card.mlap-likert-5.selected {
	background: #15803d !important;
	border-color: #14532d !important;
	box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.45);
}
/* 4 = Agree — light green */
.mlap-option-card.mlap-likert-4 {
	background: #86efac !important;
	border-color: #4ade80 !important;
	color: #052e16 !important;
}
.mlap-option-card.mlap-likert-4:hover,
.mlap-option-card.mlap-likert-4.selected {
	background: #4ade80 !important;
	border-color: #22c55e !important;
	box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.4);
}
/* 3 = Neutral — pale yellow */
.mlap-option-card.mlap-likert-3 {
	background: #fef08a !important;
	border-color: #fde047 !important;
	color: #422006 !important;
}
.mlap-option-card.mlap-likert-3:hover,
.mlap-option-card.mlap-likert-3.selected {
	background: #fde047 !important;
	border-color: #eab308 !important;
	box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.45);
}
/* 2 = Disagree — light red */
.mlap-option-card.mlap-likert-2 {
	background: #fca5a5 !important;
	border-color: #f87171 !important;
	color: #450a0a !important;
}
.mlap-option-card.mlap-likert-2:hover,
.mlap-option-card.mlap-likert-2.selected {
	background: #f87171 !important;
	border-color: #ef4444 !important;
	box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.4);
}
/* 1 = Disagree strongly — full red, white text */
.mlap-option-card.mlap-likert-1 {
	background: #dc2626 !important;
	border-color: #b91c1c !important;
	color: #ffffff !important;
}
.mlap-option-card.mlap-likert-1:hover,
.mlap-option-card.mlap-likert-1.selected {
	background: #b91c1c !important;
	border-color: #991b1b !important;
	box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.45);
}
.mlap-option-card.mlap-likert input[type="radio"] {
	accent-color: #0f172a;
	filter: drop-shadow(0 0 1px #000);
}
