/* ============================================
   Diagnostic Wizard Modal Styles
   30-second matching app selector UI
   ============================================ */

.wizard-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
}

.wizard-modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	animation: fadeIn 0.2s ease;
}

.wizard-modal-content {
	position: relative;
	background: white;
	border-radius: 12px;
	padding: 32px 24px;
	max-width: 500px;
	width: 90%;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

@keyframes slideUp {
	from {
		transform: translateY(30px);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

/* Close button */
.wizard-close {
	position: absolute;
	top: 12px;
	right: 12px;
	background: none;
	border: none;
	font-size: 28px;
	cursor: pointer;
	color: #999;
	padding: 0;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: color 0.3s ease;
}

.wizard-close:hover {
	color: #8B1E3F;
}

/* Progress bar */
.wizard-progress {
	width: 100%;
	height: 4px;
	background: #eeeeee;
	border-radius: 2px;
	margin-bottom: 32px;
	overflow: hidden;
	margin-top: 20px;
}

.wizard-progress-bar {
	height: 100%;
	background: linear-gradient(90deg, #8B1E3F, #D4A74B);
	width: 33.33%;
	transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	border-radius: 2px;
}

/* Questions & Results */
.wizard-question,
.wizard-result {
	display: none;
	animation: fadeIn 0.3s ease;
}

.wizard-question.active,
.wizard-result.active {
	display: block;
}

.wizard-question h3,
.wizard-result h3 {
	margin-top: 0;
	margin-bottom: 24px;
	font-size: 20px;
	font-weight: 700;
	font-family: 'Noto Serif JP', serif;
	color: #1a1a1a;
	line-height: 1.5;
}

/* Options grid */
.wizard-options {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	margin-bottom: 16px;
}

.wizard-option {
	background: #fdfbf7;
	border: 2px solid #eeeeee;
	border-radius: 8px;
	padding: 12px 16px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	font-family: 'Noto Sans JP', sans-serif;
	transition: all 0.25s ease;
	text-align: center;
	color: #1a1a1a;
}

.wizard-option:hover {
	border-color: #D4A74B;
	background: #ffffff;
	transform: translateY(-2px);
}

.wizard-option.selected {
	background: #8B1E3F;
	color: white;
	border-color: #8B1E3F;
	box-shadow: 0 4px 12px rgba(139, 30, 63, 0.2);
}

/* Result cards (now anchor) */
.result-card {
	display: block;
	position: relative;
	background: #fdfbf7;
	border: 2px solid #D4A74B;
	border-radius: 8px;
	padding: 16px 14px 14px;
	margin-bottom: 12px;
	font-size: 14px;
	line-height: 1.55;
	color: #1a1a1a;
	text-decoration: none;
	transition: all 0.25s ease;
}

.result-card:hover {
	border-color: #8B1E3F;
	background: #ffffff;
	box-shadow: 0 6px 18px rgba(139, 30, 63, 0.14);
	transform: translateY(-1px);
}

.result-card:focus-visible {
	outline: 3px solid rgba(212, 167, 75, 0.45);
	outline-offset: 2px;
}

.result-card strong {
	color: #8B1E3F;
	font-weight: 700;
	display: block;
	margin-bottom: 4px;
	font-size: 16px;
}

.result-card-tagline {
	display: block;
	font-size: 12.5px;
	color: #4a4a4a;
	margin-bottom: 8px;
	letter-spacing: 0.02em;
}

.result-card-badge {
	display: inline-block;
	font-size: 10.5px;
	letter-spacing: 0.05em;
	padding: 2px 8px;
	border-radius: 999px;
	background: rgba(212, 167, 75, 0.18);
	color: #8a6a1f;
	margin-bottom: 8px;
	font-weight: 600;
}

.result-card-badge--partner {
	background: rgba(139, 30, 63, 0.10);
	color: #8B1E3F;
}

.result-card-cta {
	display: block;
	margin-top: 4px;
	font-size: 12.5px;
	font-weight: 600;
	color: #8B1E3F;
}

/* Result section layout */
.wizard-result {
	text-align: center;
}

.wizard-result-lead {
	font-size: 13px;
	color: #555;
	margin: -6px 0 14px;
	line-height: 1.55;
}

.wizard-result-actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 18px;
}

.wizard-result-primary {
	width: 100%;
	background: #D4A74B;
	color: white;
	border: none;
	padding: 14px 24px;
	border-radius: 6px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.25s ease;
}

.wizard-result-primary:hover {
	background: #c49641;
	transform: translateY(-2px);
	box-shadow: 0 8px 16px rgba(212, 167, 75, 0.3);
}

.wizard-result-secondary {
	width: 100%;
	background: transparent;
	color: #666;
	border: 1px solid #d8d8d8;
	padding: 10px 20px;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.25s ease;
}

.wizard-result-secondary:hover {
	color: #8B1E3F;
	border-color: #8B1E3F;
	background: rgba(139, 30, 63, 0.04);
}

/* Single column on mobile */
@media (max-width: 768px) {
	.wizard-modal-content {
		padding: 24px 16px;
		max-width: 100%;
		border-radius: 0;
		max-height: 100vh;
	}

	.wizard-options {
		grid-template-columns: 1fr;
		gap: 10px;
	}

	.wizard-option {
		padding: 14px 16px;
		font-size: 13px;
	}

	.wizard-question h3,
	.wizard-result h3 {
		font-size: 18px;
	}

	.result-card {
		padding: 12px;
		font-size: 13px;
	}

	.wizard-result button {
		padding: 12px 20px;
		font-size: 14px;
	}
}

@media (max-width: 480px) {
	.wizard-modal-content {
		padding: 20px 12px;
	}

	.wizard-question h3,
	.wizard-result h3 {
		font-size: 16px;
		margin-bottom: 16px;
	}

	.wizard-progress {
		margin-bottom: 20px;
	}
}
