/**
 * SA — SERP Snippet & Meta Length Checker widget, used only on
 * /tools/serp-snippet-meta-length-checker/ (see the `data-sa-tool`
 * markup embedded in that post's content, and its enqueue mapping in
 * sa_tools_widget_assets() in inc/tools.php). Self-contained; reuses the
 * --tool-* tokens from tools.css, which is a declared dependency so it
 * always loads first.
 */

.sa-serp-checker {
	display: grid;
	grid-template-columns: 1fr;
	gap: 2rem;
	background: #fff;
	border: 1px solid var(--tool-border);
	border-radius: 1rem;
	padding: 1.75rem;
	box-shadow: 0 14px 32px -20px rgba(23, 35, 61, 0.3);
	margin: 2rem 0;
}
@media (min-width: 992px) {
	.sa-serp-checker {
		grid-template-columns: 1fr 1fr;
		gap: 2.5rem;
		padding: 2.25rem;
	}
}

.sa-serp-checker__field {
	margin-bottom: 1.5rem;
}
.sa-serp-checker__field:last-child {
	margin-bottom: 0;
}
.sa-serp-checker__field label {
	display: block;
	font-weight: 700;
	font-size: 0.85rem;
	color: var(--tool-ink);
	margin-bottom: 0.5rem;
}
.sa-serp-checker__field input[type="text"],
.sa-serp-checker__field textarea {
	width: 100%;
	border: 1px solid var(--tool-border);
	border-radius: 0.6rem;
	padding: 0.7rem 0.9rem;
	font-family: inherit;
	font-size: 0.95rem;
	color: var(--tool-ink);
	resize: vertical;
}
.sa-serp-checker__field input[type="text"]:focus,
.sa-serp-checker__field textarea:focus {
	outline: none;
	border-color: var(--tool-yellow);
	box-shadow: 0 0 0 3px var(--tool-yellow-glow);
}

.sa-serp-bar {
	height: 6px;
	border-radius: 999px;
	background: var(--tool-bg-alt);
	overflow: hidden;
	margin-top: 0.6rem;
}
.sa-serp-bar__fill {
	display: block;
	height: 100%;
	width: 0;
	border-radius: 999px;
	background: #2e7d32;
	transition: width 0.15s ease, background-color 0.15s ease;
}
.sa-serp-bar__fill.is-near {
	background: #e6a700;
}
.sa-serp-bar__fill.is-over {
	background: #d64545;
}

.sa-serp-count {
	display: block;
	margin-top: 0.4rem;
	font-size: 0.78rem;
	color: var(--tool-muted);
}
.sa-serp-count.is-near {
	color: #a67200;
}
.sa-serp-count.is-over {
	color: #c23f3f;
	font-weight: 600;
}

.sa-serp-checker__preview {
	display: flex;
	flex-direction: column;
}
.sa-serp-preview__label {
	display: block;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--tool-muted);
	margin-bottom: 0.75rem;
}
.sa-serp-preview {
	background: #fff;
	border: 1px solid var(--tool-border);
	border-radius: 0.85rem;
	padding: 1.25rem 1.5rem;
	font-family: Arial, Helvetica, sans-serif;
}
.sa-serp-preview__site {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin-bottom: 0.35rem;
}
.sa-serp-preview__favicon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: var(--tool-ink);
	color: #fff;
	font-size: 0.7rem;
	font-weight: 700;
	flex-shrink: 0;
}
.sa-serp-preview__url {
	font-size: 0.85rem;
	color: #202124;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.sa-serp-preview__title {
	margin: 0 0 0.3rem;
	font-size: 1.25rem;
	line-height: 1.3;
	font-weight: 400;
	color: #1a0dab;
	overflow-wrap: break-word;
}
.sa-serp-preview__description {
	margin: 0;
	font-size: 0.875rem;
	line-height: 1.5;
	color: #4d5156;
	overflow-wrap: break-word;
}
