/* Kostenlose SEO-Analyse */

@property --sal-score {
	syntax: '<number>';
	inherits: false;
	initial-value: 0;
}

.sal-app {
	--sal-primary: #2563eb;
	--sal-text: #111827;
	--sal-muted: #6b7280;
	--sal-border: #e5e7eb;
	--sal-surface: #ffffff;
	--sal-subtle: #f9fafb;
	--sal-critical: #dc2626;
	--sal-critical-bg: #fef2f2;
	--sal-warning: #b45309;
	--sal-warning-bg: #fffbeb;
	--sal-notice: #1d4ed8;
	--sal-notice-bg: #eff6ff;
	--sal-good: #16a34a;
	--sal-radius: 14px;
	box-sizing: border-box;
	max-width: 920px;
	margin: 0 auto;
	color: var(--sal-text);
	font-size: 16px;
	line-height: 1.55;
}

.sal-app *, .sal-app *::before, .sal-app *::after { box-sizing: border-box; }

.sal-sr-only {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Eingabe ---------- */
.sal-hero {
	background: var(--sal-surface);
	border: 1px solid var(--sal-border);
	border-radius: var(--sal-radius);
	padding: 32px;
	text-align: center;
	box-shadow: 0 1px 3px rgba(17, 24, 39, .06);
}
.sal-admin-wrap .sal-hero { text-align: left; padding: 20px; }
.sal-hero-title { margin: 0 0 6px; font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.2; color: var(--sal-text); }
.sal-hero-subtitle { margin: 0 0 22px; color: var(--sal-muted); }

.sal-scan-form { display: flex; gap: 10px; max-width: 640px; margin: 0 auto; }
.sal-admin-wrap .sal-scan-form { margin: 0; }
.sal-url-input {
	flex: 1; min-width: 0;
	height: 52px; padding: 0 16px !important;
	border: 2px solid var(--sal-border) !important; border-radius: 10px !important;
	font-size: 16px !important; background: #fff !important; color: var(--sal-text) !important;
	box-shadow: none !important;
}
.sal-url-input:focus { outline: none; border-color: var(--sal-primary) !important; }

.sal-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	height: 52px; padding: 0 24px;
	border: 0; border-radius: 10px; cursor: pointer;
	font-size: 16px; font-weight: 600; line-height: 1; text-decoration: none;
	transition: filter .15s, transform .15s;
}
.sal-btn-primary { background: var(--sal-primary); color: #fff; }
.sal-btn-primary:hover { filter: brightness(1.08); color: #fff; }
.sal-btn-primary:active { transform: translateY(1px); }
.sal-btn:disabled { opacity: .65; cursor: wait; }
.sal-btn-block { width: 100%; }
.sal-btn.sal-is-loading::after {
	content: ''; width: 16px; height: 16px; border-radius: 50%;
	border: 2px solid rgba(255,255,255,.5); border-top-color: #fff;
	animation: sal-spin .7s linear infinite;
}

.sal-form-error {
	margin: 12px 0 0; padding: 10px 14px;
	background: var(--sal-critical-bg); color: var(--sal-critical);
	border-radius: 8px; font-size: 14px; text-align: left;
}
.sal-form-error[hidden] { display: none; }

/* ---------- Laden ---------- */
.sal-loading { padding: 40px 20px; text-align: center; }
.sal-loading[hidden] { display: none; }
.sal-spinner {
	width: 44px; height: 44px; margin: 0 auto 14px; border-radius: 50%;
	border: 4px solid var(--sal-border); border-top-color: var(--sal-primary);
	animation: sal-spin .8s linear infinite;
}
.sal-loading-text { margin: 0 0 14px; color: var(--sal-muted); font-weight: 500; }
.sal-progress { max-width: 360px; height: 6px; margin: 0 auto; background: var(--sal-border); border-radius: 99px; overflow: hidden; }
.sal-progress span { display: block; height: 100%; width: 0; background: var(--sal-primary); transition: width 1.6s ease; }
@keyframes sal-spin { to { transform: rotate(360deg); } }

/* ---------- Bericht ---------- */
.sal-result:not(:empty) { margin-top: 28px; scroll-margin-top: 80px; }

.sal-summary {
	display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center;
	padding: 28px; background: var(--sal-surface);
	border: 1px solid var(--sal-border); border-radius: var(--sal-radius);
	box-shadow: 0 1px 3px rgba(17, 24, 39, .06);
}
.sal-score {
	--sal-ring: var(--sal-critical);
	width: 132px; height: 132px; border-radius: 50%;
	display: grid; place-items: center;
	background: conic-gradient(var(--sal-ring) calc(var(--sal-score) * 1%), var(--sal-border) 0);
	transition: --sal-score 1.4s cubic-bezier(.2,.8,.2,1);
}
.sal-score-medium { --sal-ring: #f59e0b; }
.sal-score-good { --sal-ring: var(--sal-good); }
.sal-score-inner {
	width: 108px; height: 108px; border-radius: 50%; background: var(--sal-surface);
	display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.sal-score-value { font-size: 40px; font-weight: 800; line-height: 1; }
.sal-score-max { font-size: 13px; color: var(--sal-muted); }

.sal-eyebrow { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--sal-muted); }
.sal-summary-host { margin: 2px 0 2px; font-size: 1.4rem; line-height: 1.25; word-break: break-all; }
.sal-summary-label { margin: 0 0 12px; font-weight: 700; }
.sal-text-bad { color: var(--sal-critical); }
.sal-text-medium { color: var(--sal-warning); }
.sal-text-good { color: var(--sal-good); }

.sal-counts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sal-count { margin: 0; padding: 4px 12px; border-radius: 99px; font-size: 14px; background: var(--sal-subtle); }
.sal-count strong { margin-right: 2px; }
.sal-count-critical { background: var(--sal-critical-bg); color: var(--sal-critical); }
.sal-count-warning { background: var(--sal-warning-bg); color: var(--sal-warning); }
.sal-count-notice { background: var(--sal-notice-bg); color: var(--sal-notice); }
.sal-count-passed { background: #f0fdf4; color: var(--sal-good); }

.sal-stats { margin: 0; display: grid; gap: 10px; min-width: 130px; }
.sal-stats div { padding: 8px 12px; background: var(--sal-subtle); border-radius: 8px; }
.sal-stats dt { font-size: 12px; color: var(--sal-muted); }
.sal-stats dd { margin: 0; font-weight: 700; }

.sal-section-title { margin: 32px 0 14px; font-size: 1.2rem; }

.sal-issues { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.sal-issue {
	margin: 0; padding: 18px 20px;
	background: var(--sal-surface); border: 1px solid var(--sal-border);
	border-left: 5px solid var(--sal-notice); border-radius: 10px;
}
.sal-issue-critical { border-left-color: var(--sal-critical); }
.sal-issue-warning { border-left-color: #f59e0b; }
.sal-issue-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.sal-issue-category { font-size: 13px; color: var(--sal-muted); }
.sal-issue-title { margin: 0 0 4px; font-size: 1.05rem; line-height: 1.35; color: var(--sal-text); }
.sal-issue-desc { margin: 0 0 8px; color: #374151; font-size: 15px; }
.sal-issue-rec { margin: 0; padding: 8px 12px; background: var(--sal-subtle); border-radius: 6px; font-size: 14px; }
.sal-issue-details { margin: 10px 0 0; padding: 0 0 0 18px; font-size: 13px; color: var(--sal-muted); word-break: break-all; }

.sal-badge {
	display: inline-block; padding: 2px 10px; border-radius: 99px;
	font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}
.sal-badge-critical { background: var(--sal-critical-bg); color: var(--sal-critical); }
.sal-badge-warning { background: var(--sal-warning-bg); color: var(--sal-warning); }
.sal-badge-notice { background: var(--sal-notice-bg); color: var(--sal-notice); }

/* ---------- Gesperrter Bereich ---------- */
.sal-locked { position: relative; margin-top: 12px; min-height: 300px; }
.sal-issues-blurred { filter: blur(5px); user-select: none; pointer-events: none; opacity: .85; }
.sal-placeholder .sal-bar { display: block; height: 14px; border-radius: 4px; background: #d1d5db; }
.sal-placeholder .sal-issue-head .sal-bar { height: 16px; background: #9ca3af; }
.sal-placeholder .sal-bar-thin { height: 10px; margin-top: 10px; background: #e5e7eb; }

.sal-lock-overlay {
	position: absolute; inset: 0;
	display: flex; align-items: center; justify-content: center; padding: 16px;
	background: linear-gradient(180deg, rgba(255,255,255,.15), rgba(255,255,255,.75) 35%, rgba(255,255,255,.75));
}
.sal-lock-card {
	max-width: 440px; padding: 28px; text-align: center;
	background: var(--sal-surface); border: 1px solid var(--sal-border); border-radius: var(--sal-radius);
	box-shadow: 0 20px 45px -12px rgba(17, 24, 39, .25);
}
.sal-lock-icon {
	display: inline-grid; place-items: center; width: 56px; height: 56px; margin-bottom: 10px;
	border-radius: 50%; color: var(--sal-primary);
	background: color-mix(in srgb, var(--sal-primary) 12%, transparent);
}
.sal-lock-title { margin: 0 0 10px; font-size: 1.25rem; font-weight: 800; }
.sal-lock-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0 0 18px; padding: 0; list-style: none; }
.sal-lock-chips li { margin: 0; }

/* ---------- Kontakt ---------- */
.sal-contact {
	display: grid; grid-template-columns: 1fr 1.2fr; gap: 32px;
	margin-top: 28px; padding: 32px; scroll-margin-top: 80px;
	background: var(--sal-surface); border: 2px solid var(--sal-primary); border-radius: var(--sal-radius);
	box-shadow: 0 10px 30px -10px color-mix(in srgb, var(--sal-primary) 35%, transparent);
	transition: box-shadow .3s;
}
.sal-contact.sal-highlight { box-shadow: 0 0 0 6px color-mix(in srgb, var(--sal-primary) 25%, transparent); }
.sal-contact-intro h4 { margin: 0 0 10px; font-size: 1.35rem; line-height: 1.3; }
.sal-contact-intro p { margin: 0 0 16px; color: #374151; }
.sal-benefits { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.sal-benefits li { position: relative; margin: 0; padding-left: 28px; font-size: 15px; }
.sal-benefits li::before {
	content: '✓'; position: absolute; left: 0; top: 1px;
	width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
	background: var(--sal-good); color: #fff; font-size: 12px; font-weight: 700;
}

.sal-contact-form { display: grid; gap: 14px; }
.sal-contact-form[hidden] { display: none; }
.sal-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sal-field label { display: block; margin-bottom: 4px; font-size: 14px; font-weight: 600; }
.sal-field input, .sal-field textarea {
	width: 100%; padding: 11px 13px !important;
	border: 1px solid #d1d5db !important; border-radius: 8px !important;
	background: #fff !important; color: var(--sal-text) !important;
	font-size: 15px !important; box-shadow: none !important;
}
.sal-field input[readonly] { background: var(--sal-subtle) !important; color: var(--sal-muted) !important; }
.sal-field input:focus, .sal-field textarea:focus { outline: none; border-color: var(--sal-primary) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--sal-primary) 18%, transparent) !important; }
.sal-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--sal-muted); cursor: pointer; }
.sal-consent input { margin-top: 3px; flex: none; }
.sal-consent a { color: var(--sal-primary); }
.sal-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.sal-success { text-align: center; padding: 30px 10px; align-self: center; }
.sal-success[hidden] { display: none; }
.sal-success-icon {
	display: inline-grid; place-items: center; width: 64px; height: 64px; margin-bottom: 12px;
	border-radius: 50%; background: #dcfce7; color: var(--sal-good);
}
.sal-success p { margin: 0; font-size: 1.05rem; font-weight: 600; }

/* ---------- Bestanden ---------- */
.sal-passed { margin-top: 20px; padding: 14px 18px; background: #f0fdf4; border-radius: 10px; }
.sal-passed summary { cursor: pointer; font-weight: 600; color: var(--sal-good); }
.sal-passed ul { margin: 12px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.sal-passed li { position: relative; margin: 0; padding-left: 22px; font-size: 14px; }
.sal-passed li::before { content: '✓'; position: absolute; left: 0; color: var(--sal-good); font-weight: 700; }

.sal-empty { margin-top: 24px; padding: 24px; text-align: center; background: #f0fdf4; border-radius: var(--sal-radius); }
.sal-empty h4 { margin: 0 0 6px; color: var(--sal-good); }

.sal-admin-report { max-width: none; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
	.sal-hero { padding: 22px 16px; }
	.sal-scan-form { flex-direction: column; }
	.sal-url-input { flex: none; width: 100%; }
	.sal-scan-form .sal-btn { width: 100%; }
	.sal-summary { grid-template-columns: 1fr; text-align: center; padding: 22px 16px; gap: 18px; }
	.sal-score { margin: 0 auto; }
	.sal-counts { justify-content: center; }
	.sal-stats { grid-template-columns: repeat(3, 1fr); }
	.sal-contact { grid-template-columns: 1fr; padding: 22px 16px; gap: 20px; }
	.sal-field-row { grid-template-columns: 1fr; }
	.sal-issue { padding: 14px 14px; }
	.sal-lock-card { padding: 20px 16px; }
}

@media (prefers-reduced-motion: reduce) {
	.sal-score, .sal-progress span { transition: none; }
}
