/**
 * Script Report styles. Scoped under .script-report to avoid conflicting with WP core.
 * Used for both the full-page report and the panel content.
 *
 * @package Script_Report
 */

.script-report,
.script-report * {
	box-sizing: border-box;
}

.script-report {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	padding: 2rem;
	background: #ffffff;
	color: #1a1f1a;
	line-height: 1.6;
	max-width: 1200px;
	margin: 0 auto;
	font-size: 15px;
}

#script-report-main.script-report {
	max-width: none;
	padding: 0;
	margin: 0;
}

.script-report h1 {
	color: #0d120c;
	font-size: 1.5rem;
	font-weight: 600;
	margin: 0 0 0.5rem 0;
	letter-spacing: -0.02em;
}

.script-report h2 {
	color: #1e2a1c;
	font-size: 1.125rem;
	font-weight: 600;
	margin: 2.5rem 0 1rem 0;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid #d4e0d2;
}

.script-report h3 {
	color: #2d3b2a;
	font-size: 0.9375rem;
	font-weight: 500;
	margin: 1.5rem 0 0.75rem 0;
}

.script-report .stats {
	background: #f5f9f4;
	border: 1px solid #e0eadc;
	border-radius: 8px;
	padding: 1rem 1.25rem;
	margin: 1rem 0 1.5rem 0;
}

.script-report .stats-item {
	margin: 0.35rem 0;
	font-size: 0.875rem;
	color: #3d4a3a;
}

.script-report .stats-item strong {
	color: #1a1f1a;
	font-weight: 500;
}

.script-report .stats .meta {
	color: #5c6e58;
	font-size: 0.8125rem;
	margin-left: 0.25rem;
}

.script-report .section {
	margin: 2rem 0;
}

.script-report .report-toolbar {
	display: flex;
	gap: 0.5rem;
	align-items: center;
	flex-wrap: wrap;
	margin-bottom: 1rem;
}

.script-report .report-toolbar a {
	padding: 0.4rem 0.75rem;
	background: #f0f4ee;
	color: #3d4a3a;
	text-decoration: none;
	border-radius: 6px;
	font-size: 0.8125rem;
	border: 1px solid #e0eadc;
	transition: background 0.15s, color 0.15s;
}

.script-report .report-toolbar a:hover {
	background: #e5ebe2;
	color: #1a1f1a;
}

.script-report .report-toolbar a.active {
	background: #234a1e;
	color: #e8f5e6;
	border-color: #2d5c28;
}

.script-report .report-toolbar input.filter {
	padding: 0.4rem 0.75rem;
	background: #ffffff;
	border: 1px solid #d4e0d2;
	border-radius: 6px;
	font-size: 0.8125rem;
	color: #1a1f1a;
	min-width: 180px;
}

.script-report .report-toolbar input.filter::placeholder {
	color: #7a8a76;
}

.script-report .report-toolbar input.filter:focus {
	outline: none;
	border-color: #2d5c28;
}

.script-report .report-toolbar .sr-source-filter {
	padding: 0.4rem 0.75rem;
	background: #ffffff;
	border: 1px solid #d4e0d2;
	border-radius: 6px;
	font-size: 0.8125rem;
	color: #1a1f1a;
	min-width: 160px;
	cursor: pointer;
}

.script-report .report-toolbar .sr-source-filter:focus {
	outline: none;
	border-color: #2d5c28;
}

.script-report .list-view {
	margin: 1rem 0;
}

.script-report .list-item {
	background: #fafcf9;
	border: 1px solid #e8efe6;
	border-radius: 6px;
	padding: 0.75rem 1rem;
	margin: 0.35rem 0;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.script-report .list-item-main {
	flex: 1;
	min-width: 260px;
}

.script-report .list-item-meta {
	color: #5c6e58;
	font-size: 0.8125rem;
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
}

.script-report .meta-item {
	display: flex;
	gap: 0.35rem;
	align-items: baseline;
}

.script-report .meta-label {
	color: #4a5c46;
	font-weight: 500;
}

.script-report .handle {
	color: #0d120c;
	font-weight: 500;
	font-size: 0.875rem;
	font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Courier New', monospace;
}

.script-report .script-list {
	display: inline;
	color: #1e5c1a;
	font-family: 'SF Mono', Monaco, monospace;
	font-size: 0.8125rem;
}

.script-report .size-badge {
	display: inline-block;
	background: #e8efe6;
	color: #3d4a3a;
	padding: 0.2rem 0.5rem;
	border-radius: 4px;
	font-size: 0.75rem;
	font-weight: 500;
	margin-left: 0.5rem;
	font-family: 'SF Mono', Monaco, monospace;
}

.script-report .order-badge {
	display: inline-block;
	background: #e8efe6;
	color: #4a5c46;
	padding: 0.2rem 0.5rem;
	border-radius: 4px;
	font-size: 0.75rem;
	font-weight: 500;
	margin-left: 0.5rem;
	font-family: 'SF Mono', Monaco, monospace;
}

.script-report .badge {
	display: inline-block;
	padding: 0.2rem 0.5rem;
	margin-left: 0.5rem;
	border-radius: 4px;
	font-size: 0.6875rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.script-report .badge-enqueued {
	background: #d4ecd2;
	color: #1e4a1a;
}

.script-report .badge-footer {
	background: #d8e8e4;
	color: #1e3d3a;
}

.script-report .badge-inline {
	background: #f0ead4;
	color: #5c4a1a;
}

.script-report .badge-module {
	background: #e8e0f0;
	color: #3d2a5c;
}

.script-report .badge-duplicate {
	background: #f5e0e2;
	color: #8a2a2a;
}

.script-report .badge-missing {
	background: #f5e0e0;
	color: #8a2a2a;
}

.script-report .badge-circular {
	background: #f0ead4;
	color: #6e5a1a;
}

.script-report .tree-view .node {
	padding: 0.4rem 0;
	padding-left: calc(var(--depth, 0) * 1.25rem);
	border-left: 1px solid transparent;
	margin: 0.1rem 0;
}

.script-report .tree-view .node .src {
	color: #5c6e58;
	font-size: 0.8125rem;
	margin-top: 0.2rem;
}

.script-report .tree-view .indent-0 { --depth: 0; }
.script-report .tree-view .indent-1 { --depth: 1; }
.script-report .tree-view .indent-2 { --depth: 2; }
.script-report .tree-view .indent-3 { --depth: 3; }
.script-report .tree-view .indent-4 { --depth: 4; }
.script-report .tree-view .indent-5 { --depth: 5; }

.script-report .tree-view .node .meta {
	color: #5c6e58;
	font-size: 0.8125rem;
}

.script-report .list-item.hidden,
.script-report .tree-view .node.hidden {
	display: none !important;
}
