/**
 * Script Report panel (drawer) styles.
 * Panel is fixed at bottom; tabs switch between Overview, JavaScript, CSS.
 *
 * @package Script_Report
 */

#script-report-main {
	box-sizing: border-box;
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 99998;
	display: none;
	flex-direction: column;
	height: 33.33vh;
	min-height: 150px;
	max-height: 90vh;
	background: #fff;
	border-top: 1px solid #d4e0d2;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	font-size: 14px;
	line-height: 1.5;
	color: #1a1f1a;
	box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.08);
}

#script-report-main.sr-show {
	display: flex;
}

#script-report-main.sr-resizing {
	user-select: none;
	transition: none;
}

/* Resize handle at the top of the panel */
#script-report-main .sr-resize-handle {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 6px;
	cursor: ns-resize;
	background: transparent;
	z-index: 1;
}

#script-report-main .sr-resize-handle::before {
	content: '';
	position: absolute;
	top: 2px;
	left: 50%;
	transform: translateX(-50%);
	width: 50px;
	height: 3px;
	background: #c4d4c0;
	border-radius: 2px;
	opacity: 0;
	transition: opacity 0.2s;
}

#script-report-main:hover .sr-resize-handle::before,
#script-report-main .sr-resize-handle:hover::before {
	opacity: 1;
}

#script-report-main .sr-resize-handle:hover::before {
	background: #2d5c28;
}

#script-report-main .sr-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-shrink: 0;
	padding: 0.5rem 1rem;
	padding-top: 0.75rem;
	background: #f5f9f4;
	border-bottom: 1px solid #e0eadc;
}

#script-report-main .sr-title-heading {
	margin: 0;
	font-size: 1rem;
	font-weight: 600;
	color: #0d120c;
}

#script-report-main .sr-close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	padding: 0;
	background: transparent;
	border: none;
	border-radius: 4px;
	font-size: 1.5rem;
	line-height: 1;
	color: #3d4a3a;
	cursor: pointer;
}

#script-report-main .sr-close:hover {
	background: #e0eadc;
	color: #1a1f1a;
}

#script-report-main .sr-wrapper {
	display: flex;
	flex: 1;
	min-height: 0;
	overflow: hidden;
}

#script-report-main .sr-panel-menu {
	flex-shrink: 0;
	width: 160px;
	background: #fafcf9;
	border-right: 1px solid #e0eadc;
	overflow-y: auto;
}

#script-report-main .sr-panel-menu ul {
	margin: 0;
	padding: 0.5rem 0;
	list-style: none;
}

#script-report-main .sr-panel-menu li {
	margin: 0;
}

#script-report-main .sr-tab {
	display: block;
	width: 100%;
	padding: 0.5rem 1rem;
	background: transparent;
	border: none;
	border-left: 3px solid transparent;
	font-size: 0.875rem;
	text-align: left;
	color: #3d4a3a;
	cursor: pointer;
}

#script-report-main .sr-tab:hover {
	background: #f0f4ee;
	color: #1a1f1a;
}

#script-report-main .sr-tab[aria-selected="true"] {
	background: #e8efe6;
	border-left-color: #2d5c28;
	color: #0d120c;
	font-weight: 500;
}

#script-report-main .sr-panels {
	flex: 1;
	overflow: auto;
	padding: 1rem;
	background: #fff;
}

#script-report-main .sr-panel {
	display: none;
}

#script-report-main .sr-panel.sr-panel-show {
	display: block;
}

#script-report-main .sr-overview-stats {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

#script-report-main .sr-overview-stats .stats {
	margin: 0;
}

/* Side-by-side layout for overview */
#script-report-main .sr-overview-layout {
	display: flex;
	gap: 1.5rem;
}

#script-report-main .sr-overview-column {
	flex: 1;
	min-width: 0;
}

#script-report-main .sr-overview-column h3 {
	margin: 0 0 0.5rem 0;
	font-size: 0.875rem;
	font-weight: 600;
	color: #0d120c;
}

#script-report-main .sr-overview-column > .sr-overview-stats {
	padding: 0.5rem 0.75rem;
	margin-bottom: 0.75rem;
	background: #f5f9f4;
	border-radius: 4px;
	font-size: 0.875rem;
}

#script-report-main .sr-modules-summary {
	margin-top: 1rem;
	padding: 0.5rem 0.75rem;
	background: #fafcf9;
	border-radius: 4px;
	font-size: 0.875rem;
	color: #3d4a3a;
}

/* Abbreviated list in overview */
#script-report-main .sr-abbr-list {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

#script-report-main .sr-abbr-item {
	padding: 0.4rem 0.6rem;
	background: #fff;
	border: 1px solid #e0eadc;
	border-radius: 3px;
	font-size: 0.8rem;
}

/* Badges in abbreviated list */
#script-report-main .sr-abbr-item .badge,
#script-report-main .sr-abbr-item .order-badge,
#script-report-main .sr-abbr-item .size-badge {
	padding: 0.15rem 0.35rem;
	margin-left: 0.35rem;
	font-size: 0.7rem;
}

#script-report-main .sr-abbr-item .handle {
	font-weight: 500;
	color: #0d120c;
}

#script-report-main .sr-abbr-item .meta-item {
	margin-top: 0.25rem;
	font-size: 0.75rem;
	color: #5c6a5c;
}

#script-report-main .sr-see-more {
	margin-top: 0.5rem;
	text-align: center;
}

#script-report-main .sr-see-more a {
	display: inline-block;
	padding: 0.35rem 0.75rem;
	font-size: 0.8rem;
	color: #2d5c28;
	text-decoration: none;
	background: #e8efe6;
	border-radius: 3px;
	cursor: pointer;
}

#script-report-main .sr-see-more a:hover {
	background: #d4e0d2;
}

#script-report-main #sr-panels .stats {
	padding: 0.75rem 1rem;
	margin-bottom: 1rem;
}

#script-report-main #sr-panels .list-view {
	margin: 0;
}

#script-report-main #sr-panels .list-item {
	margin: 0.25rem 0;
}

#script-report-main #sr-panels h2,
#script-report-main #sr-panels h3 {
	margin-top: 0;
}
