/* ==========================================================================
   Web Audit – Frontend-Styles (aktualisiert für Global Kit v0.4)
   - Fonts & Farben: Rubik / Plus Jakarta Sans, Farben & Buttons aus Global Kit
   - Button-Radius: 12px, Button-Padding: 18px 28px (wie Kit)
   ========================================================================== */

/* --------------------------------------------------------------------------
   0) Theme-Variablen (aus Global Kit)
   -------------------------------------------------------------------------- */
.wa-widget {
	/* Brandable Variables */
	--wa-primary:     #FC6203;      /* Accent (CTA-Orange) */
	--wa-accent:      #E31FD0;      /* Hover/Accent (Magenta) */
	--wa-bg:          transparent;   /* Transparent Background */
	--wa-text:        #374151E3;    /* Body Text */
 
	/* Typography */
	--wa-font-body:   "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--wa-font-head:   "Rubik", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
 
	/* Buttons / Radius / Spacing */
	--wa-radius:      12px;          /* Button Radius */
	--wa-btn-pad:     18px 28px;     /* Button Padding */
 
	/* Additional Tokens */
	--wa-muted:       #6B7280;       /* Neutral muted color */
	--wa-border:      #E6E9EF;
	--wa-surface:     #FFFFFF;       /* Inner Card Background */
	--wa-shadow:      0 1px 2px rgba(15,23,42,.05), 0 10px 30px rgba(15,23,42,.07);
 
	position: relative;
	z-index: 1;
	display: block;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	margin: 0 auto 48px;
	padding: 0;
	border-radius: var(--wa-radius);
	overflow-x: clip;
	scroll-margin-top: 90px;
 
	background: var(--wa-bg); /* Set to transparent */
	color: var(--wa-text);
	font-family: var(--wa-font-body);
	font-size: 16px;
	line-height: 1.6;
	text-align: left;
	-webkit-font-smoothing: antialiased;
	overflow-wrap: break-word;
	word-wrap: break-word;
}

/* Schrift im gesamten Widget: Body / Head-Fallbacks */
.wa-widget,
.wa-widget * { font-family: var(--wa-font-body); }

/* Box-Modell & Reset für alle Kind-Elemente */
.wa-widget *,
.wa-widget *::before,
.wa-widget *::after { box-sizing: border-box; }

/* Häufig „leakende“ Theme-Stile neutralisieren */
.wa-widget h1,
.wa-widget h2,
.wa-widget h3,
.wa-widget h4,
.wa-widget h5,
.wa-widget h6,
.wa-widget p { margin: 0; padding: 0; font-weight: inherit; letter-spacing: normal; text-transform: none; }
.wa-widget h1, .wa-widget h2, .wa-widget h3, .wa-widget h4, .wa-widget h5, .wa-widget h6 {
	font-family: var(--wa-font-head);
	color: #111827; /* Kit h1/h2/h3 color */
}

/* Heading-Sizes (Global Kit typography values) */
.wa-widget h1 { font-size: 64px; line-height: 1.1; font-weight: 600; }
@media (max-width:1024px) { .wa-widget h1 { font-size: 56px; } }
@media (max-width:600px)  { .wa-widget h1 { font-size: 50px; } }

.wa-widget h2 { font-size: 48px; line-height: 1.2; font-weight: 600; }
@media (max-width:1024px) { .wa-widget h2 { font-size: 45px; } }
@media (max-width:600px)  { .wa-widget h2 { font-size: 40px; } }

.wa-widget h3 { font-size: 24px; line-height: 1.4; font-weight: 600; }
@media (max-width:600px)  { .wa-widget h3 { font-size: 22px; } }

.wa-widget h4 { font-size: 24px; line-height: 1.2; font-weight: 500; }
@media (max-width:600px)  { .wa-widget h4 { font-size: 22px; } }

.wa-widget h5 { font-size: 22px; line-height: 1.2; font-weight: 500; }
.wa-widget h6 { font-size: 18px; line-height: 1.2; font-weight: 500; }

.wa-widget p { color: var(--wa-text); font-family: var(--wa-font-body); }

/* Lists, links, images, buttons reset */
.wa-widget ul,
.wa-widget li { margin: 0; padding: 0; list-style: none; }
.wa-widget a { text-decoration: none; color: var(--wa-primary); transition: color .12s; }
.wa-widget a:hover { color: var(--wa-accent); }
.wa-widget button { font-family: inherit; }
.wa-widget img { max-width: 100%; height: auto; display: block; }

/* SVG/Icon handling (keeps outline icons) */
.wa-widget svg { fill: none !important; stroke: currentColor; display: inline-block; vertical-align: middle; }
.wa-widget .wa-field__icon svg { width: 18px; height: 18px; stroke-width: 2; }
.wa-widget .wa-btn svg        { width: 18px; height: 18px; flex: none; }
.wa-widget .wa-find-group__title svg { width: 16px; height: 16px; flex: none; }
.wa-widget .wa-finding__icon svg     { width: 13px; height: 13px; }
.wa-widget .wa-confirm__check svg    { width: 28px; height: 28px; }
.wa-widget .wa-cta__spark svg { width: 30px; height: 30px; fill: currentColor !important; stroke: none; }

/* --------------------------------------------------------------------------
   2) Innen-Wrapper
   -------------------------------------------------------------------------- */
.wa-inner { max-width: 920px; margin: 0 auto; padding: 6px; }

/* --------------------------------------------------------------------------
   3) Landing / Hero
   -------------------------------------------------------------------------- */
.wa-hero {
	background: var(--wa-surface);
	border: 1px solid var(--wa-border);
	border-radius: var(--wa-radius);
	padding: 40px 34px;
}
.wa-hero__eyebrow {
	display: inline-block;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #111827;
	background: var(--wa-primary);
	padding: 5px 12px;
	border-radius: 999px;
	margin: 0 0 16px;
}
.wa-hero h2 {
	font-size: clamp(24px, 4vw, 33px);
	line-height: 1.18;
	margin: 0 0 10px;
	letter-spacing: -0.01em;
	font-family: var(--wa-font-head);
}
.wa-hero p.wa-sub {
	font-size: 17px;
	color: var(--wa-muted);
	margin: 0 0 26px;
	max-width: 58ch;
	font-family: var(--wa-font-body);
}

/* Form / Input */
.wa-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: stretch; }
.wa-field { flex: 1 1 320px; position: relative; display: flex; align-items: center; }
.wa-field__icon { position: absolute; left: 15px; width: 18px; height: 18px; color: var(--wa-muted); pointer-events: none; display: flex; align-items: center; justify-content: center; }
.wa-input {
	width: 100%;
	font-size: 16px;
	line-height: 1.6;
	padding: 15px 16px 15px 44px;
	border: 1px solid var(--wa-border);
	border-radius: calc(var(--wa-radius) - 4px);
	background: #fff;
	color: var(--wa-text);
	outline: none;
	transition: border-color .15s, box-shadow .15s;
	-webkit-appearance: none;
	appearance: none;
	font-family: var(--wa-font-body);
}
.wa-input:focus {
	border-color: var(--wa-primary);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--wa-primary) 55%, transparent);
}
.wa-input::placeholder { color: #97a1b0; }

/* Buttons (Kit colors & spacing) */
.wa-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-size: 16px;
	font-weight: 500; /* Kit button weight */
	line-height: 1;
	padding: 18px 28px; /* Kit */
	border: 0;
	border-radius: var(--wa-radius);
	background: var(--wa-primary);
	color: var(--wa-primary-ink);
	cursor: pointer;
	transition: background .12s, transform .02s, filter .12s;
	white-space: nowrap;
	text-decoration: none;
	font-family: var(--wa-font-head);
}
.wa-btn:hover { background: var(--wa-accent); }
.wa-btn:active { transform: translateY(1px); }
.wa-btn:disabled { opacity: .6; cursor: not-allowed; }
.wa-btn--lg { padding: 20px 32px; font-size: 18px; }
.wa-btn--block { width: 100%; }
.wa-btn--ghost {
	background: #fff;
	color: var(--wa-text);
	border: 1px solid var(--wa-border);
}
.wa-btn--ghost:hover { background: var(--wa-surface); color: var(--wa-accent); }

/* Hints & Errors */
.wa-form__hint { margin: 14px 2px 0; font-size: 13px; color: var(--wa-muted); }
.wa-error {
	margin-top: 14px;
	padding: 12px 14px;
	border-radius: 10px;
	background: #fef2f2;
	border: 1px solid #fbcaca;
	color: #991b1b;
	font-size: 14px;
}

/* --------------------------------------------------------------------------
   4) Loading
   -------------------------------------------------------------------------- */
.wa-loading {
	padding: 48px 32px;
	text-align: center;
	background: var(--wa-surface);
	border: 1px solid var(--wa-border);
	border-radius: var(--wa-radius);
}
.wa-spinner {
	width: 46px; height: 46px;
	margin: 0 auto 22px;
	border: 4px solid var(--wa-surface-2);
	border-top-color: var(--wa-primary);
	border-radius: 50%;
	animation: wa-spin .8s linear infinite;
}
@keyframes wa-spin { to { transform: rotate(360deg); } }
.wa-loading h3 { margin: 0 0 6px; font-size: 19px; font-family: var(--wa-font-head); }
.wa-loading p { margin: 0; color: var(--wa-muted); }

/* Steps */
.wa-steps { margin: 26px auto 0; max-width: 320px; text-align: left; }
.wa-steps li {
	display: flex; align-items: center; gap: 10px;
	padding: 7px 0; color: var(--wa-muted); font-size: 14px;
	transition: color .2s;
}
.wa-steps li.is-active { color: var(--wa-text); font-weight: 600; }
.wa-steps li.is-done { color: var(--wa-success); }
.wa-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--wa-border); flex: none; }
.wa-steps li.is-active .wa-dot { background: var(--wa-primary); }
.wa-steps li.is-done .wa-dot { background: var(--wa-success); }

/* --------------------------------------------------------------------------
   5) Ergebnisse
   -------------------------------------------------------------------------- */
.wa-summary {
	display: flex;
	align-items: center;
	gap: 26px;
	flex-wrap: wrap;
	padding: 26px 30px;
	border: 1px solid var(--wa-border);
	border-radius: var(--wa-radius);
	background: var(--wa-bg);
	box-shadow: var(--wa-shadow);
	margin-bottom: 16px;
}
.wa-summary__text { flex: 1 1 260px; min-width: 0; }
.wa-summary__text h2 { margin: 0 0 6px; font-size: 22px; line-height: 1.2; font-family: var(--wa-font-head); }
.wa-summary__url { font-size: 14px; color: var(--wa-muted); overflow-wrap: anywhere; word-break: break-word; margin: 0 0 8px; }
.wa-summary__meta { font-size: 13px; color: var(--wa-muted); }
.wa-summary__meta span { display: inline-block; margin-right: 16px; white-space: nowrap; }

/* Score-Ring (SVG) */
.wa-ring { flex: none; position: relative; line-height: 0; }
.wa-ring svg { display: block; transform: rotate(-90deg); fill: none !important; }
.wa-ring__track { stroke: var(--wa-surface-2); }
.wa-ring__val { transition: stroke-dashoffset 1s ease; }
.wa-ring__label {
	position: absolute; inset: 0;
	display: flex; flex-direction: column;
	align-items: center; justify-content: center;
	line-height: 1.1;
}
.wa-ring__num { font-size: 30px; font-weight: 700; }
.wa-ring__den { font-size: 12px; color: var(--wa-muted); margin-top: 2px; }

/* Kategorie-Karten */
.wa-cats { display: block; }
.wa-card {
	border: 1px solid var(--wa-border);
	border-radius: var(--wa-radius);
	background: var(--wa-bg);
	box-shadow: var(--wa-shadow);
	overflow: hidden;
	margin-bottom: 16px;
}
.wa-card__head {
	display: flex; align-items: center; gap: 14px;
	padding: 16px 22px;
	border-bottom: 1px solid var(--wa-border);
	background: var(--wa-surface);
}
.wa-card__head h3 { margin: 0; font-size: 18px; flex: 1; min-width: 0; font-family: var(--wa-font-head); }
.wa-mini-ring { flex: none; }
.wa-card__body { padding: 6px 22px 18px; }

.wa-find-group { margin-top: 14px; }
.wa-find-group__title {
	display: flex; align-items: center; gap: 8px;
	font-size: 13px; font-weight: 700;
	text-transform: uppercase; letter-spacing: .03em;
	margin: 6px 0 8px;
}
.wa-find-group--good .wa-find-group__title { color: var(--wa-success); }
.wa-find-group--bad  .wa-find-group__title { color: var(--wa-accent); }

.wa-finding {
	display: flex; gap: 12px;
	padding: 11px 0;
	border-top: 1px solid var(--wa-surface-2);
}
.wa-finding:first-child { border-top: 0; }
.wa-finding__icon {
	flex: none; width: 22px; height: 22px; margin-top: 1px;
	border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
}
.wa-finding--good .wa-finding__icon { background: var(--wa-success-bg); color: var(--wa-success); }
.wa-finding--bad  .wa-finding__icon { background: #fff0f6; color: var(--wa-accent); }
.wa-finding__body { min-width: 0; flex: 1; }
.wa-finding__title { font-weight: 600; font-size: 15px; line-height: 1.4; font-family: var(--wa-font-head); }
.wa-finding__detail { font-size: 14px; color: var(--wa-muted); margin-top: 3px; overflow-wrap: anywhere; }

/* --------------------------------------------------------------------------
   6) CTA + Lead-Formular + Bestätigung
   -------------------------------------------------------------------------- */
.wa-cta {
	margin-top: 0;
	padding: 32px 30px;
	text-align: center;
	border-radius: var(--wa-radius);
	color: var(--wa-primary-ink);
	background: var(--wa-primary);
	box-shadow: var(--wa-shadow);
}
.wa-cta__spark { display: inline-flex; color: var(--wa-primary-ink); opacity: .9; margin-bottom: 6px; }
.wa-cta h3 { margin: 0 0 8px; font-size: 22px; font-family: var(--wa-font-head); }
.wa-cta p { margin: 0 auto 20px; opacity: .95; max-width: 54ch; font-family: var(--wa-font-body); }
/* Dunkler Button auf CTA nicht nötig (Kit definiert weißen Text auf Accent) */
.wa-cta .wa-btn { background: var(--wa-primary); color: var(--wa-primary-ink); }
.wa-cta .wa-btn:hover { background: var(--wa-accent); }

.wa-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }

.wa-leadform {
	margin-top: 16px;
	padding: 28px 30px;
	border: 1px solid var(--wa-border);
	border-radius: var(--wa-radius);
	background: var(--wa-surface);
	box-shadow: var(--wa-shadow);
}
.wa-leadform h3 { margin: 0 0 4px; font-size: 21px; font-family: var(--wa-font-head); }
.wa-leadform > p { margin: 0 0 20px; color: var(--wa-muted); font-family: var(--wa-font-body); }

.wa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.wa-grid .wa-col-2 { grid-column: 1 / -1; }
.wa-label { display: block; font-size: 16px; font-weight: 500; margin-bottom: 6px; font-family: var(--wa-font-head); color: #111827; }
.wa-label .wa-opt { color: var(--wa-muted); font-weight: 400; font-family: var(--wa-font-body); }

.wa-control {
	width: 100%;
	font-size: 16px;
	line-height: 1.6;
	padding: 12px 14px;
	border: 1px solid var(--wa-border);
	border-radius: calc(var(--wa-radius) - 6px);
	background: #fff;
	color: var(--wa-text);
	outline: none;
	transition: border-color .15s, box-shadow .15s;
	-webkit-appearance: none;
	appearance: none;
	font-family: var(--wa-font-body);
}
.wa-control:focus {
	border-color: var(--wa-primary);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--wa-primary) 55%, transparent);
}
textarea.wa-control { resize: vertical; min-height: 110px; }
.wa-control.is-invalid { border-color: var(--wa-danger); }
.wa-leadform__footer { margin-top: 18px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.wa-privacy { font-size: 12px; color: var(--wa-muted); flex: 1 1 240px; font-family: var(--wa-font-body); }

.wa-confirm {
	margin-top: 0;
	padding: 40px 32px;
	text-align: center;
	border: 1px solid var(--wa-success-border);
	border-radius: var(--wa-radius);
	background: var(--wa-success-bg);
}
.wa-confirm__check {
	width: 56px; height: 56px; margin: 0 auto 16px;
	border-radius: 50%;
	background: var(--wa-success); color: #fff;
	display: flex; align-items: center; justify-content: center;
}
.wa-confirm h3 { margin: 0 0 6px; font-size: 22px; color: #14532d; font-family: var(--wa-font-head); }
.wa-confirm p { margin: 0; color: #166534; font-family: var(--wa-font-body); }

/* --------------------------------------------------------------------------
   6b) Popup / Modal  (Overlay hängt an <body>, behält .wa-widget)
   -------------------------------------------------------------------------- */
.wa-widget.wa-modal {
	position: fixed;
	inset: 0;
	margin: 0;
	max-width: none;
	width: auto;
	z-index: 2147483000;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 24px 16px;
	background: rgba(15, 23, 42, .55);
	overflow-x: hidden;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	animation: wa-fade .2s ease;
}
.wa-modal__panel {
	position: relative;
	width: 100%;
	max-width: 880px;
	margin: auto;
	max-height: calc(100vh - 48px);
	display: flex;
	flex-direction: column;
	background: var(--wa-surface);
	border-radius: var(--wa-radius);
	box-shadow: 0 24px 70px rgba(2, 6, 23, .45);
	overflow: hidden;
}
.wa-modal__scroll {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 26px;
}
.wa-modal__close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 3;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: 1px solid var(--wa-border);
	background: #fff;
	color: var(--wa-muted);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .15s, color .15s;
}
.wa-modal__close:hover { background: var(--wa-surface-2); color: var(--wa-text); }
.wa-modal__close svg { width: 18px; height: 18px; }
.wa-modal__scroll > div > .wa-summary:first-child,
.wa-modal__scroll > .wa-summary:first-child { margin-top: 2px; }

@media (max-width: 600px) {
	.wa-widget.wa-modal { padding: 0; }
	.wa-modal__panel { max-height: 100vh; border-radius: 0; }
	.wa-modal__scroll { padding: 18px; }
	.wa-modal__close { top: 8px; right: 8px; }
}

/* --------------------------------------------------------------------------
   7) Footer-Hinweis + Hilfsklassen
   -------------------------------------------------------------------------- */
.wa-foot { margin: 20px 2px 0; font-size: 12px; color: var(--wa-muted); text-align: center; font-family: var(--wa-font-body); }
.wa-foot a { color: var(--wa-primary); text-decoration: underline; }

.wa-hidden { display: none !important; }
.wa-fade { animation: wa-fade .35s ease; }
@keyframes wa-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* --------------------------------------------------------------------------
   8) Mobile Anpassungen (Kit viewports: md=768, lg=1025)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
	.wa-widget { margin-bottom: 32px; font-size: 15px; line-height: 1.6; }
	.wa-hero { padding: 28px 20px; }
	.wa-summary { padding: 22px; gap: 18px; }
	.wa-card__head, .wa-card__body { padding-left: 16px; padding-right: 16px; }
	.wa-leadform, .wa-cta { padding-left: 20px; padding-right: 20px; }
	.wa-grid { grid-template-columns: 1fr; }
	.wa-btn, .wa-field { flex: 1 1 100%; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.wa-spinner { animation: none; }
	.wa-ring__val { transition: none; }
	.wa-fade { animation: none; }
}

/* Remove unnecessary backgrounds and styles */
.wa-widget, .wa-widget * {
	font-family: var(--wa-font-body);
	background: transparent !important; /* Ensure transparency */
	color: var(--wa-text); /* Use body text color */
}
 
.wa-widget .wa-hero,
.wa-widget .wa-card {
	background: var(--wa-surface); /* Inner card background */
	border: 1px solid var(--wa-border);
}
 
/* Button Styling Adjustments */
.wa-btn {
	background: var(--wa-primary) !important; /* Primary button color */
	color: #FFFFFF !important; /* White text for better contrast */
}
 
.wa-btn:hover {
	background: var(--wa-accent) !important; /* Hover color */
}
 
/* Close Button Visibility */
.wa-modal__close {
	background: #FFFFFF; /* White background */
	color: var(--wa-text); /* Text color */
	border: none; /* No border */
	border-radius: 50%;
}
 
.wa-modal__close:hover {
	background: var(--wa-muted); /* Change to muted color on hover */
	color: #FFFFFF; /* Change text color on hover */
}
 
/* Adjusting Call to Action Button Color */
.wa-cta {
	background: var(--wa-primary); /* Primary button background */
	color: #FFFFFF; /* Button text color */
}
 
.wa-cta__spark {
	color: var(--wa-primary-ink); /* Keep it consistent */
}
 
/* Other Adjustments for Text Visibility */
.wa-summary__text h2 {
	color: var(--wa-text); /* Ensure heading color is consistent */
}
 
/* Responsive Adjustments */
@media (max-width: 600px) {
	.wa-widget {
		margin-bottom: 32px;
		font-size: 15px;
		line-height: 1.6;
	}
}