/* Security Header Checker — Front-end Shortcode Styles */

.shc-public-wrap {
	--shc-bg: #f4f6fb;
	--shc-card: #ffffff;
	--shc-border: #e5e9f2;
	--shc-text: #1a1f36;
	--shc-text-muted: #6b7280;
	--shc-primary: #4f46e5;
	--shc-primary-dark: #4338ca;
	--shc-primary-light: #eef2ff;
	--shc-green: #16a34a;
	--shc-green-bg: #f0fdf4;
	--shc-red: #dc2626;
	--shc-red-bg: #fef2f2;
	--shc-amber: #d97706;
	--shc-amber-bg: #fffbeb;
	--shc-radius: 14px;
	--shc-shadow: 0 1px 2px rgba(16,24,40,0.04), 0 4px 12px rgba(16,24,40,0.06);

	all: initial;
	*, *::before, *::after { box-sizing: border-box; }

	display: block;
	max-width: 780px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--shc-text);
	font-size: 15px;
	line-height: 1.5;
}

.shc-public-wrap .shc-public-title {
	font-size: 20px;
	font-weight: 700;
	margin: 0 0 16px;
	color: var(--shc-text);
}

/* ---------- Form ---------- */
.shc-public-wrap .shc-public-form {
	background: var(--shc-card);
	border: 1px solid var(--shc-border);
	border-radius: var(--shc-radius);
	box-shadow: var(--shc-shadow);
	padding: 18px;
	margin-bottom: 18px;
}

.shc-public-wrap .shc-input-row {
	display: flex;
	align-items: stretch;
	gap: 12px;
	position: relative;
	flex-wrap: wrap;
}

.shc-public-wrap .shc-input-icon {
	position: absolute;
	left: 16px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--shc-text-muted);
	pointer-events: none;
	font-family: dashicons;
	font-size: 18px;
}

.shc-public-wrap .shc-public-url-input {
	flex: 1 1 220px;
	height: 46px;
	padding: 0 16px 0 42px;
	border: 1.5px solid var(--shc-border);
	border-radius: 10px;
	font-size: 14px;
	background: var(--shc-bg);
	color: var(--shc-text);
	transition: border-color .15s ease, box-shadow .15s ease;
	font-family: inherit;
}

.shc-public-wrap .shc-public-url-input:focus {
	outline: none;
	border-color: var(--shc-primary);
	box-shadow: 0 0 0 3px rgba(79,70,229,0.15);
	background: #fff;
}

.shc-public-wrap .shc-scan-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 46px;
	padding: 0 24px;
	border: none;
	border-radius: 10px;
	background: linear-gradient(135deg, var(--shc-primary), var(--shc-primary-dark));
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
	box-shadow: 0 4px 12px rgba(79,70,229,0.3);
	white-space: nowrap;
	font-family: inherit;
}

.shc-public-wrap .shc-scan-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(79,70,229,0.4);
}

.shc-public-wrap .shc-scan-btn:disabled {
	opacity: .7;
	cursor: not-allowed;
	transform: none;
}

.shc-public-wrap .shc-spinner {
	display: none;
	width: 14px;
	height: 14px;
	border: 2px solid rgba(255,255,255,0.4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: shc-pub-spin .7s linear infinite;
}

.shc-public-wrap .shc-scan-btn.is-loading .shc-spinner { display: inline-block; }
.shc-public-wrap .shc-scan-btn.is-loading .shc-btn-text { opacity: .85; }

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

.shc-public-wrap .shc-error {
	padding: 12px 14px;
	background: var(--shc-red-bg);
	border: 1px solid #fecaca;
	color: var(--shc-red);
	border-radius: 10px;
	font-size: 13px;
	margin-bottom: 18px;
}

/* ---------- Results ---------- */
.shc-public-wrap .shc-results {
	animation: shc-pub-fade-in .3s ease;
}

@keyframes shc-pub-fade-in {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: translateY(0); }
}

.shc-public-wrap .shc-summary-grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
	gap: 14px;
	margin-bottom: 24px;
}

@media (max-width: 640px) {
	.shc-public-wrap .shc-summary-grid { grid-template-columns: 1fr 1fr; }
}

.shc-public-wrap .shc-grade-card,
.shc-public-wrap .shc-stat-card {
	background: var(--shc-card);
	border: 1px solid var(--shc-border);
	border-radius: var(--shc-radius);
	box-shadow: var(--shc-shadow);
	padding: 16px;
	display: flex;
	align-items: center;
	gap: 14px;
}

.shc-public-wrap .shc-grade-circle {
	width: 64px;
	height: 64px;
	min-width: 64px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	font-weight: 800;
	color: #fff;
	background: linear-gradient(135deg, #9ca3af, #6b7280);
	transition: background .3s ease;
}

.shc-public-wrap .shc-grade-circle.grade-a,
.shc-public-wrap .shc-grade-circle.grade-aplus { background: linear-gradient(135deg, #22c55e, #16a34a); }
.shc-public-wrap .shc-grade-circle.grade-b { background: linear-gradient(135deg, #84cc16, #65a30d); }
.shc-public-wrap .shc-grade-circle.grade-c { background: linear-gradient(135deg, #f59e0b, #d97706); }
.shc-public-wrap .shc-grade-circle.grade-d { background: linear-gradient(135deg, #fb923c, #ea580c); }
.shc-public-wrap .shc-grade-circle.grade-f { background: linear-gradient(135deg, #ef4444, #dc2626); }

.shc-public-wrap .shc-score-label {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--shc-text-muted);
	font-weight: 600;
	margin-bottom: 4px;
}

.shc-public-wrap .shc-score-value { font-size: 22px; font-weight: 800; }
.shc-public-wrap .shc-score-max { font-size: 13px; font-weight: 500; color: var(--shc-text-muted); }

.shc-public-wrap .shc-stat-icon {
	font-size: 26px;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 10px;
	background: var(--shc-primary-light);
	color: var(--shc-primary);
	font-family: dashicons;
}

.shc-public-wrap .shc-stat-icon.shc-stat-pass { background: var(--shc-green-bg); color: var(--shc-green); }
.shc-public-wrap .shc-stat-icon.shc-stat-fail { background: var(--shc-red-bg); color: var(--shc-red); }

.shc-public-wrap .shc-stat-number { font-size: 19px; font-weight: 800; line-height: 1.2; }
.shc-public-wrap .shc-stat-label { font-size: 11px; color: var(--shc-text-muted); font-weight: 600; }

.shc-public-wrap [data-shc-scanned-url] {
	font-size: 12px;
	font-weight: 700;
	max-width: 160px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.shc-public-wrap .shc-section-title {
	font-size: 14px;
	font-weight: 700;
	margin: 0 0 12px;
	color: var(--shc-text);
}

.shc-public-wrap .shc-header-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.shc-public-wrap .shc-header-item {
	display: flex;
	gap: 12px;
	background: var(--shc-card);
	border: 1px solid var(--shc-border);
	border-radius: 12px;
	padding: 14px 16px;
	box-shadow: var(--shc-shadow);
}

.shc-public-wrap .shc-header-item-status {
	min-width: 24px;
	height: 24px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-top: 2px;
	font-size: 13px;
	font-weight: 800;
}

.shc-public-wrap .shc-header-item-status.pass { background: var(--shc-green-bg); color: var(--shc-green); }
.shc-public-wrap .shc-header-item-status.fail { background: var(--shc-red-bg); color: var(--shc-red); }

.shc-public-wrap .shc-header-item-body { flex: 1; min-width: 0; }

.shc-public-wrap .shc-header-item-top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	flex-wrap: wrap;
}

.shc-public-wrap .shc-header-item-name { font-weight: 700; font-size: 13.5px; }

.shc-public-wrap .shc-severity-badge {
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .03em;
	padding: 3px 9px;
	border-radius: 999px;
}

.shc-public-wrap .shc-severity-badge.critical { background: var(--shc-red-bg); color: var(--shc-red); }
.shc-public-wrap .shc-severity-badge.high { background: var(--shc-amber-bg); color: var(--shc-amber); }
.shc-public-wrap .shc-severity-badge.medium { background: #eff6ff; color: #2563eb; }
.shc-public-wrap .shc-severity-badge.low { background: #f3f4f6; color: #6b7280; }

.shc-public-wrap .shc-header-item-desc {
	margin: 6px 0 8px;
	font-size: 12.5px;
	color: var(--shc-text-muted);
	line-height: 1.5;
}

.shc-public-wrap .shc-header-item-value {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 11.5px;
	background: var(--shc-bg);
	border: 1px solid var(--shc-border);
	border-radius: 8px;
	padding: 8px 10px;
	word-break: break-all;
	color: #374151;
}

.shc-public-wrap .shc-header-item-value.is-missing {
	color: var(--shc-red);
	font-style: italic;
	font-family: inherit;
	background: transparent;
	border: none;
	padding: 0;
}

.shc-public-wrap .shc-header-item-note {
	margin-top: 6px;
	font-size: 11.5px;
	color: var(--shc-amber);
	font-weight: 600;
}

.shc-public-wrap .shc-header-item-note:empty { display: none; }
