/**
 * Content Guard Pro - Classic Editor Scan Meta Box
 *
 * Styles for the security scan meta box in Classic Editor.
 *
 * @package ContentGuardPro
 * @since   1.0.0
 */

/* Meta Box Container */
.cgpro-metabox {
	padding: 0;
}

/* Status Section */
.cgpro-status-section {
	margin-bottom: 16px;
}

.cgpro-status-indicator {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 12px;
}

.cgpro-status-indicator.cgpro-status-critical {
	color: #d63638;
}

.cgpro-status-indicator.cgpro-status-warning {
	color: #dba617;
}

.cgpro-status-indicator.cgpro-status-ok {
	color: #00a32a;
}

.cgpro-status-indicator.cgpro-status-neutral {
	color: #757575;
}

.cgpro-status-icon {
	font-size: 20px;
	width: 20px;
	height: 20px;
}

.cgpro-metabox-icon {
	display: inline-block;
	vertical-align: middle;
}

.cgpro-metabox-icon img {
	width: 20px;
	height: 20px;
	vertical-align: middle;
}

.cgpro-status-text {
	flex: 1;
}

/* Severity Badges */
.cgpro-severity-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.cgpro-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 8px;
	border-radius: 3px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	line-height: 1.4;
}

.cgpro-badge-critical {
	background-color: #d63638;
	color: #fff;
}

.cgpro-badge-suspicious {
	background-color: #dba617;
	color: #1d2327;
}

.cgpro-badge-review {
	background-color: #72aee6;
	color: #1d2327;
}

.cgpro-badge-count {
	background-color: rgba(255, 255, 255, 0.3);
	padding: 0 4px;
	border-radius: 2px;
	font-size: 10px;
}

/* Scan Button */
.cgpro-scan-button-wrapper {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 16px;
}

.cgpro-scan-button {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
}

.cgpro-scan-button .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	margin-top: 1px;
}

.cgpro-scan-button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.cgpro-scan-spinner {
	float: none;
	margin: 0;
}

.cgpro-scan-spinner.is-active {
	visibility: visible;
}

/* Findings Container */
.cgpro-findings-container {
	margin-bottom: 16px;
}

.cgpro-findings-list {
	background: #f6f7f7;
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 12px;
	max-height: 400px;
	overflow-y: auto;
}

.cgpro-findings-list h4 {
	margin: 0 0 12px 0;
	font-size: 13px;
	font-weight: 600;
	color: #1d2327;
}

/* Finding Item */
.cgpro-finding-item {
	background: #fff;
	border: 1px solid #ddd;
	border-left-width: 4px;
	border-radius: 2px;
	padding: 10px 12px;
	margin-bottom: 8px;
}

.cgpro-finding-item:last-child {
	margin-bottom: 0;
}

.cgpro-severity-critical.cgpro-finding-item {
	border-left-color: #d63638;
}

.cgpro-severity-suspicious.cgpro-finding-item {
	border-left-color: #dba617;
}

.cgpro-severity-review.cgpro-finding-item {
	border-left-color: #72aee6;
}

.cgpro-finding-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 6px;
}

.cgpro-finding-severity-badge {
	display: inline-flex;
	align-items: center;
	padding: 2px 6px;
	border-radius: 2px;
	font-size: 10px;
	font-weight: 600;
	text-transform: uppercase;
}

.cgpro-finding-severity-badge.cgpro-badge-critical {
	background-color: #d63638;
	color: #fff;
}

.cgpro-finding-severity-badge.cgpro-badge-suspicious {
	background-color: #dba617;
	color: #1d2327;
}

.cgpro-finding-severity-badge.cgpro-badge-review {
	background-color: #72aee6;
	color: #1d2327;
}

.cgpro-finding-confidence {
	font-size: 11px;
	color: #757575;
}

.cgpro-finding-description {
	font-size: 13px;
	color: #1d2327;
	margin-bottom: 6px;
	line-height: 1.5;
}

.cgpro-finding-excerpt {
	background: #f6f7f7;
	border: 1px solid #ddd;
	border-radius: 2px;
	padding: 6px 8px;
	margin-bottom: 6px;
}

.cgpro-finding-excerpt code {
	font-size: 11px;
	color: #d63638;
	word-break: break-word;
	display: block;
	white-space: pre-wrap;
	font-family: Consolas, Monaco, monospace;
}

.cgpro-finding-field {
	font-size: 11px;
	color: #757575;
	margin-top: 4px;
}

/* Actions Section */
.cgpro-actions {
	padding-top: 12px;
	border-top: 1px solid #ddd;
}

.cgpro-view-findings-link {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: #2271b1;
	text-decoration: none;
	font-size: 13px;
	margin-bottom: 8px;
}

.cgpro-view-findings-link:hover {
	color: #135e96;
	text-decoration: underline;
}

.cgpro-view-findings-link .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

.cgpro-last-scan {
	font-size: 12px;
	color: #757575;
	margin-top: 8px;
}

/* Scan Notification (Top of Page) */
.cgpro-scan-notification {
	margin: 16px 0;
}

.cgpro-scan-notification p {
	margin: 0.5em 0;
}

/* Responsive */
@media (max-width: 782px) {
	.cgpro-status-indicator {
		font-size: 13px;
	}
	
	.cgpro-findings-list {
		max-height: 300px;
	}
}

/* Enhanced Admin Notice Styles */
.cgpro-enhanced-notice {
	position: relative;
	padding: 12px 48px 12px 12px;
}

.cgpro-enhanced-notice .cgpro-notice-icon {
	display: inline-block;
	vertical-align: middle;
	margin-right: 8px;
}

.cgpro-enhanced-notice .cgpro-notice-icon--success {
	color: #00a32a;
}

.cgpro-enhanced-notice .cgpro-notice-icon--warning {
	color: #dba617;
}

.cgpro-enhanced-notice .cgpro-notice-icon--critical {
	color: #d63638;
}

.cgpro-enhanced-notice .cgpro-notice-content {
	display: inline-block;
	vertical-align: middle;
}

.cgpro-enhanced-notice .cgpro-notice-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 8px 0;
}

.cgpro-enhanced-notice .cgpro-findings-preview {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid rgba(0, 0, 0, 0.1);
	max-height: 300px;
	overflow-y: auto;
	background: rgba(255, 255, 255, 0.5);
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 4px;
	padding: 10px;
}

.cgpro-enhanced-notice .cgpro-finding-preview-item {
	background: rgba(255, 255, 255, 0.5);
	border-left: 3px solid;
	padding: 10px;
	margin-bottom: 8px;
	border-radius: 2px;
}

.cgpro-enhanced-notice .cgpro-finding-preview-item.severity-critical {
	border-left-color: #d63638;
}

.cgpro-enhanced-notice .cgpro-finding-preview-item.severity-suspicious {
	border-left-color: #dba617;
}

.cgpro-enhanced-notice .cgpro-finding-preview-item.severity-review {
	border-left-color: #72aee6;
}

.cgpro-enhanced-notice .cgpro-finding-preview-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 6px;
	font-size: 11px;
}

.cgpro-enhanced-notice .cgpro-finding-preview-severity {
	font-weight: 600;
	text-transform: uppercase;
	font-size: 11px;
}

.cgpro-enhanced-notice .cgpro-finding-preview-severity--critical {
	color: #d63638;
}

.cgpro-enhanced-notice .cgpro-finding-preview-severity--suspicious {
	color: #996800;
}

.cgpro-enhanced-notice .cgpro-finding-preview-severity--review {
	color: #2271b1;
}

.cgpro-enhanced-notice .cgpro-finding-preview-confidence {
	font-size: 11px;
	color: #757575;
}

.cgpro-enhanced-notice .cgpro-finding-preview-description {
	font-size: 13px;
	margin-bottom: 4px;
	color: #1d2327;
	line-height: 1.5;
}

.cgpro-enhanced-notice .cgpro-finding-preview-excerpt {
	font-family: Consolas, Monaco, monospace;
	font-size: 11px;
	background: rgba(0, 0, 0, 0.05);
	padding: 6px 8px;
	border-radius: 2px;
	word-break: break-word;
	margin-top: 4px;
	color: #d63638;
}

.cgpro-enhanced-notice .cgpro-finding-preview-field {
	font-size: 11px;
	color: #757575;
	margin-top: 4px;
}

.cgpro-enhanced-notice .cgpro-notice-helper {
	margin-left: 10px;
	color: #757575;
	font-size: 12px;
}

.cgpro-enhanced-notice .cgpro-notice-actions {
	margin-top: 12px;
}

.cgpro-enhanced-notice .cgpro-notice-actions .button {
	margin-right: 8px;
}

.cgpro-enhanced-notice .cgpro-more-findings {
	text-align: center;
	color: #757575;
	font-size: 12px;
	margin-top: 8px;
}

/* Toggle for expandable findings */
.cgpro-findings-toggle {
	cursor: pointer;
	color: #2271b1;
	text-decoration: none;
	font-size: 13px;
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-top: 8px;
}

.cgpro-findings-toggle:hover {
	color: #135e96;
	text-decoration: underline;
}

.cgpro-findings-toggle .dashicons {
	transition: transform 0.2s;
}

.cgpro-findings-toggle.expanded .dashicons {
	transform: rotate(180deg);
}

.cgpro-findings-details {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.3s ease;
}

.cgpro-findings-details.expanded {
	max-height: 800px;
}
