/**
 * CSS für Digitaler Selbsttest Formular
 * Styling für das OSINT-Selbsttest-Formular
 */

/* ====================================
   Root Variablen & Grundstile
   ==================================== */

.dst-selbsttest-form-wrapper {
	max-width: 600px;
	margin: 2rem auto;
	padding: 2rem;
	background-color: #ffffff;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	color: #333333;
}

/* ====================================
   Formular Container
   ==================================== */

#dst-selbsttest-form {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

/* ====================================
   Alerts & Messages
   ==================================== */

.dst-form-alert {
	padding: 1rem;
	margin-bottom: 1rem;
	border-radius: 6px;
	font-size: 14px;
	line-height: 1.5;
}

.dst-form-alert-error {
	background-color: #fee;
	color: #c33;
	border: 1px solid #fcc;
}

.dst-form-alert-success {
	background-color: #efe;
	color: #3c3;
	border: 1px solid #cfc;
}

/* ====================================
   Fieldsets & Gruppierung
   ==================================== */

.dst-form-fieldset {
	border: 1px solid #e5e5e5;
	border-radius: 6px;
	padding: 1.5rem;
	margin: 0;
}

.dst-form-fieldset legend {
	padding: 0 0.5rem;
	font-size: 16px;
	font-weight: 600;
	color: #222;
	margin-left: -0.5rem;
}

.dst-form-fieldset .dst-form-group {
	margin-bottom: 1.5rem;
}

.dst-form-fieldset .dst-form-group:last-child {
	margin-bottom: 0;
}

/* ====================================
   Form Groups
   ==================================== */

.dst-form-group {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

/* ====================================
   Labels
   ==================================== */

.dst-form-label {
	font-size: 14px;
	font-weight: 500;
	color: #333;
	display: flex;
	gap: 0.25rem;
	align-items: center;
}

.dst-required {
	color: #d32f2f;
	font-weight: 600;
}

.dst-form-hint {
	display: block;
	font-size: 12px;
	color: #666;
	margin-top: 0.25rem;
}

/* ====================================
   Input-Felder
   ==================================== */

.dst-form-input {
	padding: 0.75rem;
	font-size: 14px;
	border: 1px solid #ddd;
	border-radius: 4px;
	transition: all 0.2s ease;
	font-family: inherit;
	width: 100%;
	box-sizing: border-box;
}

.dst-form-input:focus {
	outline: none;
	border-color: #0066cc;
	box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.dst-form-input:disabled {
	background-color: #f5f5f5;
	color: #999;
	cursor: not-allowed;
}

.dst-form-input.error {
	border-color: #d32f2f;
	background-color: #fafafa;
}

/* ====================================
   Checkboxen
   ==================================== */

.dst-form-checkbox-group {
	gap: 1rem;
}

.dst-form-checkbox-label {
	display: flex;
	gap: 0.75rem;
	cursor: pointer;
	align-items: flex-start;
	font-size: 13px;
	line-height: 1.6;
	color: #333;
}

.dst-form-checkbox-label:hover .dst-form-checkbox {
	border-color: #0066cc;
}

.dst-form-checkbox {
	width: 20px;
	height: 20px;
	min-width: 20px;
	min-height: 20px;
	margin-top: 2px;
	border: 1px solid #ddd;
	border-radius: 4px;
	cursor: pointer;
	accent-color: #0066cc;
	transition: all 0.2s ease;
}

.dst-form-checkbox:focus {
	outline: none;
	border-color: #0066cc;
	box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.dst-form-checkbox:checked {
	background-color: #0066cc;
	border-color: #0066cc;
}

.dst-consent-text {
	flex: 1;
}

.dst-consent-text a {
	color: #0066cc;
	text-decoration: none;
}

.dst-consent-text a:hover {
	text-decoration: underline;
}

/* ====================================
   Fehlerbehandlung
   ==================================== */

.dst-form-error {
	display: none;
	font-size: 12px;
	color: #d32f2f;
	margin-top: 0.25rem;
}

.dst-form-error.show {
	display: block;
}

/* ====================================
   Preis-Information
   ==================================== */

.dst-price-info {
	background-color: #f9f9f9;
	border: 1px solid #e5e5e5;
	border-radius: 6px;
	padding: 1rem;
	text-align: center;
}

.dst-price-text {
	margin: 0;
	font-size: 16px;
	color: #333;
}

.dst-price-amount {
	font-size: 24px;
	color: #0066cc;
	display: block;
	margin: 0.5rem 0 0;
}

.dst-price-description {
	margin: 0.75rem 0 0;
	font-size: 12px;
	color: #666;
}

/* ====================================
   Submit Button
   ==================================== */

.dst-form-submit {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin-top: 1rem;
}

.dst-form-button {
	padding: 0.875rem 1.5rem;
	font-size: 16px;
	font-weight: 600;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.2s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.75rem;
	width: 100%;
	box-sizing: border-box;
}

.dst-btn-primary {
	background-color: #0066cc;
	color: white;
}

.dst-btn-primary:hover:not(:disabled) {
	background-color: #0052a3;
	box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.dst-btn-primary:active:not(:disabled) {
	background-color: #003d7a;
	transform: scale(0.98);
}

.dst-btn-primary:disabled {
	background-color: #ccc;
	cursor: not-allowed;
	opacity: 0.6;
}

.dst-btn-text {
	display: inline-block;
}

.dst-btn-spinner {
	display: inline-block;
	width: 16px;
	height: 16px;
}

.dst-spinner {
	display: inline-block;
	width: 100%;
	height: 100%;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top-color: white;
	border-radius: 50%;
	animation: dst-spin 0.8s linear infinite;
}

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

.dst-form-disclaimer {
	margin: 0;
	font-size: 12px;
	color: #666;
	text-align: center;
}

/* ====================================
   Responsive Design
   ==================================== */

@media (max-width: 600px) {
	.dst-selbsttest-form-wrapper {
		margin: 1rem;
		padding: 1.5rem;
	}

	.dst-form-fieldset {
		padding: 1rem;
	}

	.dst-form-label {
		font-size: 13px;
	}

	.dst-form-input {
		font-size: 16px; /* Verhindert Auto-Zoom auf iOS */
	}

	.dst-form-button {
		padding: 1rem;
		font-size: 15px;
	}

	.dst-price-amount {
		font-size: 20px;
	}
}

/* ====================================
   Accessibility
   ==================================== */

@media (prefers-reduced-motion: reduce) {
	.dst-form-input,
	.dst-form-button,
	.dst-spinner {
		transition: none;
		animation: none;
	}
}

/* High Contrast Mode Support */
@media (prefers-contrast: more) {
	.dst-form-input {
		border-width: 2px;
	}

	.dst-form-button {
		border: 2px solid currentColor;
	}
}

/* ====================================
   Result Pages (Success / Cancel)
   ==================================== */

.dst-result-page {
	text-align: center;
	padding: 3rem 2rem;
}

.dst-result-icon {
	margin-bottom: 1.5rem;
}

.dst-result-icon-success {
	color: #28a745;
}

.dst-result-icon-cancel {
	color: #dc3545;
}

.dst-result-title {
	font-size: 24px;
	font-weight: 700;
	margin: 0 0 1rem;
	color: #222;
}

.dst-result-description {
	font-size: 15px;
	color: #555;
	line-height: 1.7;
	margin: 0 0 2rem;
	max-width: 500px;
	margin-left: auto;
	margin-right: auto;
}

.dst-result-actions {
	display: flex;
	gap: 1rem;
	justify-content: center;
	flex-wrap: wrap;
	margin-top: 2rem;
}

.dst-result-actions .dst-form-button {
	width: auto;
	min-width: 180px;
	text-decoration: none;
	display: inline-flex;
}

.dst-btn-secondary {
	background-color: #f0f0f0;
	color: #333;
	border: 1px solid #ddd;
}

.dst-btn-secondary:hover {
	background-color: #e0e0e0;
}

/* ====================================
   Job Progress Tracker
   ==================================== */

.dst-job-tracker {
	margin: 2rem 0;
	padding: 1.5rem;
	background: #f9f9f9;
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	text-align: left;
}

.dst-tracker-title {
	font-size: 16px;
	font-weight: 600;
	margin: 0 0 1.5rem;
	color: #222;
}

.dst-progress-steps {
	display: flex;
	flex-direction: column;
	gap: 0;
	position: relative;
	padding-left: 1.5rem;
}

.dst-step {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.6rem 0;
	position: relative;
}

.dst-step::before {
	content: '';
	position: absolute;
	left: -1.5rem;
	top: 0;
	bottom: 0;
	width: 2px;
	background: #ddd;
}

.dst-step:first-child::before {
	top: 50%;
}

.dst-step:last-child::before {
	bottom: 50%;
}

.dst-step-indicator {
	width: 12px;
	height: 12px;
	min-width: 12px;
	border-radius: 50%;
	background: #ddd;
	border: 2px solid #ddd;
	position: absolute;
	left: -1.5rem;
	transform: translateX(-5px);
	z-index: 1;
}

.dst-step-label {
	font-size: 14px;
	color: #999;
}

.dst-step.completed .dst-step-indicator {
	background: #28a745;
	border-color: #28a745;
}

.dst-step.completed .dst-step-label {
	color: #333;
}

.dst-step.active .dst-step-indicator {
	background: #0066cc;
	border-color: #0066cc;
	box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.2);
}

.dst-step.active .dst-step-label {
	color: #0066cc;
	font-weight: 600;
}

.dst-status-message {
	margin: 1.5rem 0 0;
	padding: 0.75rem 1rem;
	background: #e8f4fd;
	border-radius: 6px;
	font-size: 14px;
	color: #0066cc;
	text-align: center;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
	.dst-selbsttest-form-wrapper {
		background-color: #1e1e1e;
		color: #e0e0e0;
		box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
	}

	.dst-form-fieldset {
		border-color: #444;
		background-color: #2a2a2a;
	}

	.dst-form-fieldset legend {
		color: #f0f0f0;
	}

	.dst-form-label {
		color: #e0e0e0;
	}

	.dst-form-input {
		background-color: #333;
		border-color: #555;
		color: #e0e0e0;
	}

	.dst-form-input:focus {
		border-color: #66b3ff;
		box-shadow: 0 0 0 3px rgba(102, 179, 255, 0.2);
	}

	.dst-form-checkbox {
		background-color: #333;
		border-color: #555;
	}

	.dst-price-info {
		background-color: #2a2a2a;
		border-color: #444;
	}

	.dst-price-description,
	.dst-form-hint,
	.dst-form-disclaimer {
		color: #aaa;
	}

	.dst-consent-text a {
		color: #66b3ff;
	}

	.dst-form-alert-error {
		background-color: #3a1a1a;
		color: #ff9999;
		border-color: #662222;
	}

	.dst-form-alert-success {
		background-color: #1a3a1a;
		color: #99ff99;
		border-color: #226622;
	}

	.dst-result-title {
		color: #f0f0f0;
	}

	.dst-result-description {
		color: #bbb;
	}

	.dst-btn-secondary {
		background-color: #333;
		color: #e0e0e0;
		border-color: #555;
	}

	.dst-btn-secondary:hover {
		background-color: #444;
	}

	.dst-job-tracker {
		background: #2a2a2a;
		border-color: #444;
	}

	.dst-tracker-title {
		color: #f0f0f0;
	}

	.dst-status-message {
		background: #1a2a3a;
		color: #66b3ff;
	}
}
