/* Demo Page Styles */

/* Demo Features Grid */
.demo-features-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 2rem;
	margin-top: 3rem;
}

.demo-feature {
	background: var(--surface);
	border: 2px solid color-mix(in srgb, var(--muted) 15%, transparent);
	border-radius: 16px;
	padding: 2rem;
	text-align: center;
	transition: all 0.3s ease;
}

.demo-feature:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 30px rgba(0,0,0,0.1);
	border-color: color-mix(in srgb, var(--brand) 30%, transparent);
}

.feature-icon {
	width: 64px;
	height: 64px;
	background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 80%, #7c3aed));
	border-radius: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 1.5rem auto;
	color: white;
}

.demo-feature h3 {
	font-size: 1.25rem;
	font-weight: 700;
	margin-bottom: 1rem;
	color: var(--txt);
}

.demo-feature p {
	color: color-mix(in srgb, var(--txt) 75%, var(--muted));
	line-height: 1.6;
	margin: 0;
}

/* Testimonials */
.testimonials-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 2rem;
	margin-top: 3rem;
}

.testimonial {
	background: var(--surface);
	border: 2px solid color-mix(in srgb, var(--muted) 15%, transparent);
	border-radius: 16px;
	padding: 2rem;
	position: relative;
}

.testimonial::before {
	content: '"';
	position: absolute;
	top: -10px;
	left: 20px;
	font-size: 4rem;
	color: var(--brand);
	font-weight: bold;
}

.testimonial-content p {
	font-style: italic;
	color: var(--txt);
	line-height: 1.6;
	margin-bottom: 1.5rem;
	margin-top: 1rem;
}

.testimonial-author strong {
	display: block;
	font-weight: 600;
	color: var(--txt);
	margin-bottom: 0.25rem;
}

.testimonial-author span {
	color: color-mix(in srgb, var(--txt) 70%, var(--muted));
	font-size: 0.9rem;
}

/* Test Info Section Styles */
.test-info {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 1.5rem;
	margin: 2rem 0;
	padding: 2rem;
	background: color-mix(in srgb, var(--brand) 3%, transparent);
	border-radius: 16px;
	border: 2px solid color-mix(in srgb, var(--brand) 10%, transparent);
}

.test-info-item {
	display: flex;
	align-items: center;
	gap: 1rem;
}

.test-info-item svg {
	color: var(--brand);
	flex-shrink: 0;
}

.test-info-item span {
	color: var(--txt);
	font-weight: 500;
}

/* Form Header Styles */
.form-header {
	margin-bottom: 2rem;
	text-align: center;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid color-mix(in srgb, var(--muted) 20%, transparent);
}

.form-header h3 {
	font-size: 1.3rem;
	font-weight: 700;
	color: var(--txt);
	margin-bottom: 0.75rem;
	background: linear-gradient(135deg, var(--txt), color-mix(in srgb, var(--txt) 70%, var(--brand)));
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.form-header p {
	color: color-mix(in srgb, var(--txt) 80%, var(--muted));
	line-height: 1.5;
	font-size: 0.95rem;
	margin: 0;
}

/* Side-by-Side Layout for Registration Form and Process */
.test-registration-container {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 3rem;
	align-items: stretch;
	margin-top: 2rem;
	min-height: 500px;
}

.test-registration-form {
	background: var(--surface);
	border: 2px solid color-mix(in srgb, var(--muted) 15%, transparent);
	border-radius: 16px;
	padding: 2rem;
	box-shadow: 0 4px 20px rgba(0,0,0,0.05);
	display: flex;
	flex-direction: column;
	height: 100%;
}

.test-registration-form form {
	display: flex;
	flex-direction: column;
	height: 100%;
	flex: 1;
}

.test-process-side {
	background: linear-gradient(135deg, 
		color-mix(in srgb, var(--brand) 4%, white) 0%, 
		white 50%, 
		color-mix(in srgb, var(--brand) 6%, white) 100%);
	border: 2px solid color-mix(in srgb, var(--brand) 12%, transparent);
	border-radius: 16px;
	padding: 2rem;
	position: relative;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	height: 100%;
}

.test-process-side::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: linear-gradient(90deg, var(--brand), color-mix(in srgb, var(--brand) 60%, #7c3aed), var(--brand));
}

.test-process-side h3 {
	font-size: 1.1rem;
	font-weight: 700;
	background: linear-gradient(135deg, #0f172a, color-mix(in srgb, #0f172a 70%, var(--brand)));
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	margin-bottom: 1.5rem;
}

.process-steps-vertical {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	flex: 1;
	justify-content: space-evenly;
}

.process-step-side {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	padding: 1rem;
	border-radius: 8px;
	background: color-mix(in srgb, var(--brand) 3%, transparent);
	border: 1px solid color-mix(in srgb, var(--brand) 8%, transparent);
	transition: all 0.3s ease;
}

.process-step-side:hover {
	transform: translateX(4px);
	background: color-mix(in srgb, var(--brand) 6%, transparent);
}

.process-step-side .step-number {
	width: 28px;
	height: 28px;
	background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 80%, #7c3aed));
	color: white;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 0.8rem;
	flex-shrink: 0;
}

.process-step-side .step-content {
	flex: 1;
}

.process-step-side .step-content strong {
	display: block;
	font-size: 0.9rem;
	font-weight: 600;
	color: #0f172a;
	margin-bottom: 0.2rem;
}

.process-step-side .step-content p {
	font-size: 0.8rem;
	color: #475569;
	line-height: 1.3;
	margin: 0;
}

.process-connector {
	text-align: center;
	color: var(--brand);
	font-size: 1.2rem;
	font-weight: bold;
	margin: 0.5rem 0;
}

/* Mobile Layout: Stack vertically */
@media (max-width: 768px) {
	.test-registration-container {
		grid-template-columns: 1fr;
		gap: 2rem;
	}
	
	.test-process-side {
		order: 2;
	}
	
	.test-registration-form {
		order: 1;
	}
	
	.demo-features-grid {
		grid-template-columns: 1fr;
	}
	
	.testimonials-grid {
		grid-template-columns: 1fr;
	}
	
	.test-info {
		grid-template-columns: 1fr;
	}
	
	.test-info-item, .process-step {
		flex-direction: column;
		text-align: center;
		gap: 0.5rem;
	}
}

/* Fix für Datenschutzlink in Checkbox */
.checkbox-label a {
	color: var(--brand) !important;
	text-decoration: underline !important;
}

.checkbox-label a:hover {
	color: var(--brand-700) !important;
}

/* Testversion Button - größer und volle Breite */
#test-submit-btn {
	width: 100%;
	padding: 1.2rem 2rem;
	font-size: 1.1rem;
	font-weight: 700;
	border-radius: 12px;
	margin-top: 1rem;
	transition: all 0.3s ease;
}

/* Field Error Styles */
.field-error {
	display: none;
	color: #dc2626;
	font-size: 0.875rem;
	margin-top: 4px;
}

.field-error.show {
	display: block;
}

/* Input Field Error State */
input.invalid,
select.invalid,
textarea.invalid {
	border-color: #dc2626 !important;
	background-color: color-mix(in srgb, #dc2626 5%, var(--surface)) !important;
}

input.invalid:focus,
select.invalid:focus,
textarea.invalid:focus {
	outline: 2px solid #dc2626;
	outline-offset: 2px;
}

/* Checkbox Error State */
.checkbox-wrapper.invalid {
	outline: 2px solid #dc2626;
	outline-offset: 2px;
	border-radius: 4px;
	padding: 2px;
}


/* Loading state */
.btn.is-loading {
	opacity: .88;
	cursor: progress;
	position: relative;
}

	/* Spinner (with broad browser fallback) */
	.btn.is-loading .spinner {
		display: inline-block;
		width: 1rem;
		height: 1rem;
		margin-right: .55rem;
		box-sizing: border-box;
		border: .22rem solid var(--primary, #0d9488);
		/* Fallback: three sides primary, one transparent for rotation illusion */
		border-color: var(--primary, #0d9488) var(--primary, #0d9488) var(--primary, #0d9488) transparent;
		/* If color-mix supported, enhance tone */
		border-left-color: color-mix(in srgb, var(--primary) 65%, transparent);
		border-top-color: var(--primary, #0d9488);
		border-radius: 50%;
		animation: btn-spin .7s linear infinite;
		vertical-align: -2px;
		position: relative;
		z-index: 1;
	}

@keyframes btn-spin {
	from {
		transform: rotate(0deg);
	}

	to {
		transform: rotate(360deg);
	}
}

/* Pulse overlay kept but moved behind content so spinner stays visible */
.btn.is-loading::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: radial-gradient(circle at 35% 35%, color-mix(in srgb, var(--primary) 32%, transparent), transparent 70%);
	animation: btn-pulse 2.4s ease-in-out infinite;
	pointer-events: none;
	z-index: 0; /* ensure spinner (z-index:1) stays visible */
}

@keyframes btn-pulse {
	0%,100% {
		opacity: .33;
		transform: scale(1);
	}

	50% {
		opacity: .55;
		transform: scale(1.045);
	}
}