/* Joerrens SiteCheck - Frontend Styles */

/* --- Configuration --- */
:root {
	--jsc-primary:      #02aeea;
	--jsc-primary-dark: #0194c8;
	--jsc-ok:           #4da68b;
	--jsc-warning:      #cc8c32;
	--jsc-critical:     #ca5e4b;
	--jsc-bg:           #f0f5fa;
	--jsc-border:       #d4d8e0;
	--jsc-text:         #1e2027;
	--jsc-text-muted:   #56585d;
	--jsc-radius:       4px;
}
/* --- End Configuration --- */

.jsc-wrap {
	max-width: 860px;
	margin: 0 auto;
	font-family: inherit;
}

/* Search Box */
.jsc-search-box {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 12px;
}

.jsc-btn.jsc-submit-btn {
	display: none;
	background: var(--jsc-primary);
	color: #fff;
	border-color: var(--jsc-primary);
}

.jsc-btn.jsc-submit-btn:hover {
	background: transparent;
	color: #1e2027;
	border-color: #1e2027;
}

.jsc-url-input {
	width: 100%;
	max-width: 640px;
	padding: 16px 22px;
	font-size: 1.1rem;
	font-family: inherit;
	border: 1px solid var(--jsc-border);
	border-radius: 30px;
	outline: none;
	transition: border-color 0.2s, box-shadow 0.2s;
	background: #fff;
	color: var(--jsc-text);
	box-shadow: 0 2px 8px rgba(0,0,0,0.08);
	text-align: center;
}

.jsc-url-input:focus {
	border-color: var(--jsc-primary);
	box-shadow: 0 2px 12px rgba(2,174,234,0.15);
}

.jsc-pagespeed-loading {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 16px;
	color: var(--jsc-text-muted);
	font-size: 0.875rem;
}

.jsc-ps-spinner {
	width: 16px;
	height: 16px;
	border: 2px solid var(--jsc-border);
	border-top-color: var(--jsc-primary);
	border-radius: 50%;
	animation: jsc-spin 0.8s linear infinite;
	flex-shrink: 0;
}
.jsc-spinner {
	width: 48px;
	height: 48px;
	border: 4px solid var(--jsc-border);
	border-top-color: var(--jsc-primary);
	border-radius: 50%;
	animation: jsc-spin 0.8s linear infinite;
	margin: 0 auto 16px;
}

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

#jsc-loading {
	text-align: center;
	padding: 48px 0;
}

.jsc-loading-text {
	color: var(--jsc-text-muted);
	font-size: 1rem;
	margin: 0;
}

.jsc-error {
	margin-top: 10px;
	color: var(--jsc-critical);
	font-size: 0.9rem;
	text-align: center;
}

.jsc-search-box {
	flex-wrap: wrap;
}

#jsc-error {
	flex-basis: 100%;
}

/* Results */
.jsc-results {
	margin-top: 32px;
}

.jsc-result-header {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 16px;
	background: #fff;
	padding: 24px;
	margin-bottom: 20px;
}

.jsc-score-wrap {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.jsc-score-circle {
	display: block;
	margin: 0 auto;
}

.jsc-result-meta {
	width: 100%;
}

.jsc-result-title {
	font-size: 1.1rem;
	margin: 0 0 10px;
	overflow-wrap: break-word;
	word-break: break-word;
}

.jsc-result-title span,
.jsc-result-title .jsc-result-url {
	color: var(--jsc-text-muted);
	display: block;
	margin-top: 2px;
	font-size: 0.9rem;
	font-weight: 600;
}

.jsc-summary-pills {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 12px;
	justify-content: center;
}

.jsc-pill {
	padding: 4px 12px;
	border-radius: 20px;
	font-size: 0.82rem;
	font-weight: 600;
}

.jsc-pill-critical { background: #e06853; color: #8b3526; }
.jsc-pill-warning  { background: #f5c88a; color: #8a5a1a; }
.jsc-pill-ok       { background: #55b99a; color: #2d7a5e; }

/* Summary Bars (shared result pages only) */
.jsc-summary-bars {
	max-width: 680px;
	margin: 40px auto 8px;
	padding: 0 16px;
}

.jsc-wrap h2.jsc-section-title {
	font-size: 2rem !important;
	font-weight: 700 !important;
	font-family: 'Montserrat', sans-serif !important;
	line-height: 1.3 !important;
	letter-spacing: -0.02em !important;
	text-align: center !important;
	color: var(--jsc-text);
	margin: 0 0 16px;
}

.jsc-summary-bar-row {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 6px 0;
}

.jsc-summary-bar-label {
	flex: 0 0 200px;
	font-size: 0.875rem;
	font-weight: 700;
	color: var(--jsc-text);
	text-align: left;
}

.jsc-summary-bar-track {
	flex: 1;
	height: 8px;
	background: #e8ecf0;
	border-radius: 4px;
	overflow: hidden;
}

.jsc-summary-bar-fill {
	height: 100%;
	border-radius: 4px;
	transition: width 0.8s ease;
}

.jsc-summary-bar-pct {
	flex: 0 0 44px;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--jsc-text-muted);
	text-align: right;
}

.jsc-summary-bars-hint {
	font-size: 0.8rem;
	color: var(--jsc-text-muted);
	margin: 12px 0 0;
	text-align: center;
}

@media (max-width: 640px) {
	.jsc-summary-bar-label {
		flex: 0 0 110px;
		font-size: 0.75rem;
	}
	.jsc-summary-bar-pct {
		font-size: 0.75rem;
	}
}

/* --- Teaser-Modus: zweite Zeile in den Summary-Bars im Inline-Ergebnis ---
 * Erster Balken voll sichtbar, alle folgenden Rows werden geblurrt als
 * Hinweis auf die vollständige Übersicht beim zugeschickten Ergebnis.
 */
.jsc-bar-blurred {
	filter: blur(5px);
	opacity: 0.75;
	user-select: none;
	pointer-events: none;
}

/* --- Malware-Warnung ---
 * Nutzt die vorhandenen Typo- und Layout-Klassen (jsc-section-title,
 * jsc-btn, jsc-module). Kein roter Rahmen, kein Extra-Design -
 * der Ernst kommt über Icon + Titel-Farbe.
 */
.jsc-malware-warning {
	margin-top: 32px;
	text-align: center;
}

.jsc-malware-icon {
	color: var(--jsc-critical);
	margin: 0 auto 16px;
	display: flex;
	justify-content: center;
}

.jsc-malware-title {
	color: var(--jsc-critical);
}

.jsc-malware-url {
	color: var(--jsc-text-muted);
	margin: 0 auto 40px;
	max-width: 680px;
}

.jsc-malware-url .jsc-result-url {
	display: block;
	font-weight: 600;
	color: var(--jsc-text);
	margin-top: 4px;
	word-break: break-word;
}

.jsc-malware-intro {
	max-width: 680px;
	margin: 0 auto 40px;
	color: var(--jsc-text);
	line-height: 1.6;
}

.jsc-malware-intro p {
	margin: 0;
}

.jsc-malware-audience {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	max-width: 680px;
	margin: 0 auto 40px;
}

.jsc-malware-audience-block {
	background: #fff;
	border: 1px solid var(--jsc-border);
	border-radius: var(--jsc-radius);
	padding: 20px;
}

.jsc-malware-audience-block h3 {
	margin: 0 0 8px;
	font-size: 1rem;
	font-weight: 700;
	color: var(--jsc-text);
}

.jsc-malware-audience-block p {
	margin: 0;
	font-size: 0.9rem;
	line-height: 1.5;
	color: var(--jsc-text-muted);
}

.jsc-malware-cta {
	margin: 0 auto 16px;
}

.jsc-malware-disclaimer {
	font-size: 0.8rem;
	color: var(--jsc-text-muted);
	margin: 0;
}

@media (max-width: 640px) {
	.jsc-malware-audience {
		grid-template-columns: 1fr;
	}
}

.jsc-share-link {
	font-size: 0.85rem;
	color: var(--jsc-primary);
	text-decoration: none;
}

.jsc-share-link:hover {
	text-decoration: underline;
}

/* WordPress notice */
.jsc-wp-notice {
	background: #f0f5fa;
	border-left: 4px solid var(--jsc-primary);
	padding: 14px 18px;
	border-radius: 0 var(--jsc-radius) var(--jsc-radius) 0;
	margin-bottom: 20px;
	font-size: 0.95rem;
}

.jsc-wp-notice a {
	color: var(--jsc-primary);
	font-weight: 600;
}

/* Modules Grid */
.jsc-modules {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
	gap: 16px;
	margin-bottom: 32px;
}

.jsc-module {
	background: #fff;
	border: 1px solid var(--jsc-border);
	border-radius: var(--jsc-radius);
	overflow: hidden;
}

.jsc-module-header {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 16px;
	background: var(--jsc-bg);
	border-bottom: 1px solid var(--jsc-border);
	font-weight: 700;
	font-size: 0.9rem;
	color: var(--jsc-text);
}

.jsc-module-checks {
	padding: 8px 0;
}

/* Checks */
.jsc-check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 8px 16px;
}

.jsc-check-icon {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	flex-shrink: 0;
	margin-top: 2px;
	display: inline-block;
}

.jsc-check-ok       .jsc-check-icon { background: #55b99a; }
.jsc-check-warning  .jsc-check-icon { background: #e39c37; }
.jsc-check-critical .jsc-check-icon { background: #e06853; }

.jsc-check-ok       .jsc-check-icon::after { content: '✓'; color: #fff; font-size: 11px; display: flex; align-items: center; justify-content: center; height: 100%; font-weight: 700; }
.jsc-check-warning  .jsc-check-icon::after { content: '!'; color: #fff; font-size: 11px; display: flex; align-items: center; justify-content: center; height: 100%; font-weight: 700; }
.jsc-check-critical .jsc-check-icon::after { content: '✕'; color: #fff; font-size: 11px; display: flex; align-items: center; justify-content: center; height: 100%; font-weight: 700; }

.jsc-check-content {
	display: flex;
	flex-direction: column;
	gap: 2px;
	font-size: 0.875rem;
	flex: 1;
}

.jsc-check-content strong {
	color: var(--jsc-text);
	font-weight: 600;
}

.jsc-check-content span {
	color: var(--jsc-text-muted);
}

.jsc-check-detail {
	color: var(--jsc-text-muted);
	font-style: normal;
	font-size: 0.8rem;
	background: var(--jsc-bg);
	padding: 2px 6px;
	border-radius: 4px;
	word-break: normal;
	margin-top: 2px;
}

/* Actions */
.jsc-actions {
	padding: 0 0 24px;
	text-align: center;
	max-width: 700px;
	margin-left: auto;
	margin-right: auto;
}

/* Hide input section and intro content when viewing a shared result URL */
.jsc-shared-result .jsc-input-section,
.jsc-shared-result .jsc-intro,
.jsc-shared-result #jsc-loading {
	display: none !important;
}

.jsc-actions-intro {
	margin: 0 0 16px;
	color: var(--jsc-text);
}

h2.jsc-actions-intro,
h2.jsc-section-title {
	font-size: 2rem !important;
	font-weight: 700 !important;
	font-family: 'Montserrat', sans-serif !important;
	line-height: 1.3 !important;
	letter-spacing: -0.02em !important;
	text-align: center !important;
}

.jsc-action-buttons {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	justify-content: center;
}

.jsc-action-form {
	margin-top: 24px;
	padding-top: 24px;
	border-top: 1px solid var(--jsc-border);
}

.jsc-form-hint {
	color: var(--jsc-text-muted);
	font-size: 0.9rem;
}

.jsc-result-error {
	color: var(--jsc-critical);
	background: #fce8e6;
	padding: 16px;
	border-radius: var(--jsc-radius);
	margin-top: 16px;
}

/* Responsive */
@media (max-width: 640px) {
	.jsc-modules {
		grid-template-columns: 1fr;
	}
	.jsc-result-title {
		font-size: 0.85rem;
		font-weight: 400;
	}
	.jsc-result-title .jsc-result-url {
		font-size: 0.8rem;
		font-weight: 600;
	}
	.jsc-pill {
		font-size: 0.75rem;
		padding: 3px 10px;
	}
	.jsc-url-input {
		font-size: 1rem;
		padding: 14px 18px;
	}
	.jsc-search-box {
		flex-direction: column;
	}
	.jsc-btn.jsc-submit-btn {
		display: block !important;
		margin: 0 auto;
	}
}

/* Action buttons - styled like Gravity Forms buttons on joerrens.com */
.jsc-btn {
	display: inline-block;
	padding: 15px 30px;
	font-size: 0.875rem;
	font-weight: 600;
	font-family: inherit;
	background: transparent;
	color: #1e2027;
	border: 1px solid #1e2027;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.2s ease;
	white-space: nowrap;
	text-decoration: none;
}

.jsc-btn:hover {
	background: #02aeea;
	color: #fff;
	border-color: #02aeea;
}

/* Lightbox Overlay */
.jsc-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(30, 32, 39, 0.7);
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}

.jsc-overlay-box {
	background: #fff;
	border-radius: var(--jsc-radius);
	padding: 40px;
	max-width: 560px;
	width: 100%;
	position: relative;
	max-height: 90vh;
	overflow-y: auto;
}

.jsc-overlay-close {
	position: absolute;
	top: 16px;
	right: 20px;
	background: none;
	border: none;
	font-size: 1.5rem;
	cursor: pointer;
	color: var(--jsc-text-muted);
	line-height: 1;
	padding: 4px 8px;
	outline: none;
}

.jsc-overlay-close:hover,
.jsc-overlay-close:focus {
	color: var(--jsc-text);
	background: none;
	outline: none;
}

.jsc-overlay-title {
	font-size: 1.25rem;
	font-weight: 700;
	margin: 0 0 20px;
	color: var(--jsc-text);
}

@media (max-width: 640px) {
	.jsc-overlay-box {
		padding: 24px;
	}
}