/* Heading Structure Checker — styles */

.hsc-tool {
	--hsc-bg: #ffffff;
	--hsc-fg: #1a1a1a;
	--hsc-muted: #6b7280;
	--hsc-border: #e5e7eb;
	--hsc-primary: #2563eb;
	--hsc-primary-fg: #ffffff;
	--hsc-pass: #16a34a;
	--hsc-warning: #d97706;
	--hsc-error: #dc2626;
	--hsc-card-bg: #f9fafb;

	max-width: 900px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--hsc-fg);
}

@media (prefers-color-scheme: dark) {
	.hsc-tool {
		--hsc-bg: #111827;
		--hsc-fg: #f3f4f6;
		--hsc-muted: #9ca3af;
		--hsc-border: #374151;
		--hsc-card-bg: #1f2937;
	}
}

.hsc-label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.5rem;
}

.hsc-input-group {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
}

.hsc-input {
	flex: 1 1 260px;
	min-width: 0;
	padding: 0.65rem 0.85rem;
	border: 1px solid var(--hsc-border);
	border-radius: 8px;
	font-size: 1rem;
	background: var(--hsc-bg);
	color: var(--hsc-fg);
}

.hsc-input:focus-visible {
	outline: 2px solid var(--hsc-primary);
	outline-offset: 1px;
}

.hsc-btn {
	padding: 0.65rem 1.1rem;
	border-radius: 8px;
	border: 1px solid var(--hsc-border);
	font-size: 1rem;
	cursor: pointer;
	background: var(--hsc-bg);
	color: var(--hsc-fg);
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

.hsc-btn:focus-visible {
	outline: 2px solid var(--hsc-primary);
	outline-offset: 1px;
}

.hsc-btn-primary {
	background: var(--hsc-primary);
	border-color: var(--hsc-primary);
	color: var(--hsc-primary-fg);
	font-weight: 600;
}

.hsc-btn-ghost {
	background: transparent;
}

.hsc-spinner {
	width: 14px;
	height: 14px;
	border: 2px solid rgba(255, 255, 255, 0.5);
	border-top-color: #fff;
	border-radius: 50%;
	animation: hsc-spin 0.7s linear infinite;
}

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

.hsc-example {
	margin: 0.5rem 0 0;
	font-size: 0.85rem;
	color: #fff;
}

.hsc-example-link {
	background: none;
	border: none;
	padding: 0;
	color: var(--hsc-primary);
	text-decoration: underline;
	cursor: pointer;
	font-size: inherit;
}

.hsc-error {
	margin-top: 0.75rem;
	padding: 0.75rem 1rem;
	border-radius: 8px;
	background: rgba(220, 38, 38, 0.1);
	color: var(--hsc-error);
	font-size: 0.9rem;
}

.hsc-results {
	margin-top: 2rem;
}

.hsc-results-title {
	margin: 0 0 0.15rem;
}

.hsc-results-url {
	margin: 0 0 1rem;
	color: #fff;
	font-size: 0.85rem;
	word-break: break-all;
}

.hsc-issues {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	margin-bottom: 1.25rem;
}

.hsc-issue {
	padding: 0.55rem 0.8rem;
	border-radius: 6px;
	font-size: 0.85rem;
}

.hsc-issue-pass { background: rgba(22, 163, 74, 0.1); color: var(--hsc-pass); }
.hsc-issue-warning { background: rgba(217, 119, 6, 0.1); color: var(--hsc-warning); }
.hsc-issue-error { background: rgba(220, 38, 38, 0.1); color: var(--hsc-error); }

.hsc-section {
	margin-top: 1.5rem;
}

.hsc-subheading {
	font-size: 1rem;
	margin: 0 0 0.75rem;
    color:#fff;
}

.hsc-outline {
	background: var(--hsc-card-bg);
	border: 1px solid var(--hsc-border);
	border-radius: 10px;
	padding: 1rem;
	max-height: 500px;
	overflow-y: auto;
}

.hsc-outline-row {
	display: flex;
	align-items: baseline;
	gap: 0.6rem;
	padding: 0.3rem 0;
	font-size: 0.88rem;
}

.hsc-outline-empty {
	opacity: 0.6;
	font-style: italic;
}

.hsc-outline-tag {
	flex-shrink: 0;
	font-size: 0.68rem;
	font-weight: 700;
	padding: 0.1rem 0.4rem;
	border-radius: 4px;
	color: #fff;
	min-width: 1.8rem;
	text-align: center;
}

.hsc-tag-h1 { background: #1d4ed8; }
.hsc-tag-h2 { background: #2563eb; }
.hsc-tag-h3 { background: #3b82f6; }
.hsc-tag-h4 { background: #60a5fa; }
.hsc-tag-h5 { background: #93c5fd; color: #1e3a8a; }
.hsc-tag-h6 { background: #bfdbfe; color: #1e3a8a; }

.hsc-outline-text {
	word-break: break-word;
}

.hsc-empty {
	color: var(--hsc-muted);
	font-size: 0.85rem;
}

@media print {
	.hsc-input-row {
		display: none !important;
	}
}
