/**
 * Malware Scanner Admin – Professional dashboard styles.
 *
 * @package SecureSiteMonitor
 * @since   1.2.0
 */

/* -------------------------------------------------------------------------
   Design tokens – light, clean theme
   ------------------------------------------------------------------------- */
:root {
	--bbmg-accent: #059669;
	--bbmg-accent-hover: #047857;
	--bbmg-accent-light: rgba(5, 150, 105, 0.12);
	--bbmg-card-bg: #ffffff;
	--bbmg-card-border: #e5e7eb;
	--bbmg-card-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
	--bbmg-card-shadow-hover: 0 2px 8px rgba(0, 0, 0, 0.06);
	--bbmg-body-bg: #f9fafb;
	--bbmg-text: #111827;
	--bbmg-text-muted: #6b7280;
	--bbmg-radius: 10px;
	--bbmg-radius-sm: 6px;
	--bbmg-transition: 0.2s ease;
	--bbmg-transition-slow: 0.3s ease;
	--bbmg-severity-critical: #dc2626;
	--bbmg-severity-critical-bg: rgba(220, 38, 38, 0.1);
	--bbmg-severity-high: #ea580c;
	--bbmg-severity-high-bg: rgba(234, 88, 12, 0.1);
	--bbmg-severity-medium: #d97706;
	--bbmg-severity-medium-bg: rgba(217, 119, 6, 0.1);
	--bbmg-severity-low: #6b7280;
	--bbmg-severity-low-bg: rgba(107, 114, 128, 0.1);
	--bbmg-status-clean: #059669;
	--bbmg-status-infected: #dc2626;
	--bbmg-status-unknown: #9ca3af;
}

/* -------------------------------------------------------------------------
   Wrap & layout – contained, responsive
   ------------------------------------------------------------------------- */
.bbmg-malware-wrap {
	max-width: 900px;
	margin: 0 auto;
	padding: 20px 16px 32px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, sans-serif;
	font-size: 14px;
	line-height: 1.5;
	color: var(--bbmg-text);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

.bbmg-malware-wrap *,
.bbmg-malware-wrap *::before,
.bbmg-malware-wrap *::after {
	box-sizing: border-box;
}

/* -------------------------------------------------------------------------
   Header – light, minimal
   ------------------------------------------------------------------------- */
.bbmg-malware-header {
	background: var(--bbmg-card-bg);
	border: 1px solid var(--bbmg-card-border);
	border-radius: var(--bbmg-radius);
	padding: 20px 20px 24px;
	margin-bottom: 20px;
	box-shadow: var(--bbmg-card-shadow);
}

.bbmg-malware-header-inner {
	max-width: 100%;
}

.bbmg-malware-logo {
	display: flex;
	align-items: center;
	gap: 14px;
}

.bbmg-malware-logo-icon {
	width: 44px;
	height: 44px;
	background: var(--bbmg-accent);
	border-radius: var(--bbmg-radius-sm);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.bbmg-malware-logo-icon::before {
	content: "";
	width: 22px;
	height: 22px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3C/svg%3E") no-repeat center;
	background-size: contain;
}

.bbmg-malware-title {
	margin: 0;
	font-size: 1.35rem;
	font-weight: 600;
	color: var(--bbmg-text);
	letter-spacing: -0.02em;
}

.bbmg-malware-subtitle {
	margin: 4px 0 0;
	font-size: 0.875rem;
	color: var(--bbmg-text-muted);
	font-weight: 400;
}

/* -------------------------------------------------------------------------
   Content & cards
   ------------------------------------------------------------------------- */
.bbmg-malware-content {
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.bbmg-malware-card {
	background: var(--bbmg-card-bg);
	border: 1px solid var(--bbmg-card-border);
	border-radius: var(--bbmg-radius);
	box-shadow: var(--bbmg-card-shadow);
	padding: 24px;
	transition: box-shadow var(--bbmg-transition), border-color var(--bbmg-transition);
	margin-bottom: 10px;
}

.bbmg-malware-card:hover {
	box-shadow: var(--bbmg-card-shadow-hover);
}

.bbmg-malware-card-title {
	margin: 0 0 20px;
	font-size: 1.1rem;
	font-weight: 600;
	color: var(--bbmg-text);
}

.bbmg-malware-card-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 20px;
}

.bbmg-malware-collapse-btn {
	border: 1px solid var(--bbmg-card-border);
	background: #fff;
	color: var(--bbmg-text);
	border-radius: 8px;
	width: 34px;
	height: 34px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: transform var(--bbmg-transition), background var(--bbmg-transition), border-color var(--bbmg-transition);
}

.bbmg-malware-collapse-btn:hover {
	background: #f9fafb;
	border-color: #d1d5db;
}

.bbmg-malware-collapse-btn .bbmg-malware-collapse-icon {
	display: inline-block;
	line-height: 1;
	transform: rotate(0deg);
	transition: transform var(--bbmg-transition);
}

.bbmg-malware-collapse-btn.is-collapsed .bbmg-malware-collapse-icon {
	transform: rotate(-90deg);
}

.bbmg-malware-history-append-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px 16px 4px;
}

.bbmg-malware-history-spinner {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 2.5px solid var(--bbmg-card-border);
	border-top-color: var(--bbmg-accent);
	animation: bbmg-spin 0.75s linear infinite;
	box-shadow: 0 1px 2px rgba(5, 150, 105, 0.12);
}

.bbmg-malware-history-pagination {
	margin-top: 12px;
	display: flex;
	justify-content: center;
}

.bbmg-malware-card-head .bbmg-malware-card-title {
	margin: 0;
}

/* -------------------------------------------------------------------------
   Summary card
   ------------------------------------------------------------------------- */
.bbmg-malware-summary-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 24px;
}

.bbmg-malware-summary-item {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.bbmg-malware-summary-label {
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--bbmg-text-muted);
	font-weight: 500;
}

.bbmg-malware-summary-value {
	font-size: 1rem;
	font-weight: 600;
	color: var(--bbmg-text);
}

.bbmg-malware-status-badge {
	flex-direction: row;
	align-items: center;
	gap: 10px;
}

.bbmg-malware-status-dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--bbmg-status-unknown);
	flex-shrink: 0;
	transition: background var(--bbmg-transition), box-shadow var(--bbmg-transition);
}

.bbmg-malware-status-dot[data-status="clean"] {
	background: var(--bbmg-status-clean);
	box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.2);
}

.bbmg-malware-status-dot[data-status="infected"] {
	background: var(--bbmg-status-infected);
	box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
	animation: bbmg-pulse 2s ease-in-out infinite;
}

@keyframes bbmg-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.7; }
}

.bbmg-malware-status-text {
	font-weight: 600;
	font-size: 1rem;
}

/* -------------------------------------------------------------------------
   Scan controls
   ------------------------------------------------------------------------- */
.bbmg-malware-scan-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 20px;
	margin-bottom: 20px;
}

.bbmg-malware-scan-type {
	flex: 1;
	min-width: 220px;
}

.bbmg-malware-label {
	display: block;
	margin-bottom: 6px;
	font-weight: 500;
	color: var(--bbmg-text);
}

/* Single border on the wrapper only. Stacked focus rings (1px + 4px) drew a “ghost” edge on the right in Chromium. */
.bbmg-malware-select-wrap {
	display: block;
	width: 100%;
	max-width: 420px;
	min-width: 0;
	box-sizing: border-box;
	border-radius: var(--bbmg-radius-sm);
	background-color: var(--bbmg-card-bg);
	border: 1px solid var(--bbmg-card-border);
	box-shadow:
		inset 3px 0 0 var(--bbmg-accent),
		0 1px 2px rgba(15, 23, 42, 0.04);
	overflow: hidden;
	transition: border-color var(--bbmg-transition), box-shadow var(--bbmg-transition);
}

.bbmg-malware-select-wrap:hover {
	border-color: rgba(5, 150, 105, 0.35);
	box-shadow:
		inset 3px 0 0 var(--bbmg-accent),
		0 2px 8px rgba(5, 150, 105, 0.08);
}

.bbmg-malware-select-wrap:focus-within {
	border-color: var(--bbmg-accent);
	box-shadow: inset 3px 0 0 var(--bbmg-accent);
}

.bbmg-malware-select {
	display: block;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	box-sizing: border-box;
	min-height: 46px;
	margin: 0;
	padding: 12px 44px 12px 18px;
	font-size: 14px;
	font-family: inherit;
	font-weight: 500;
	line-height: 1.35;
	color: var(--bbmg-text);
	border: none;
	border-radius: 0;
	background-color: transparent;
	box-shadow: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23059669' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 18px 18px;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	cursor: pointer;
	transition: color var(--bbmg-transition);
}

/* Hide legacy IE/Edge dropdown chrome that stacks next to our SVG chevron (second “box” on the right). */
.bbmg-malware-select::-ms-expand {
	display: none;
}

.bbmg-malware-select:hover {
	color: var(--bbmg-text);
}

.bbmg-malware-select:focus {
	outline: none;
}

.bbmg-malware-select:focus-visible {
	outline: none;
}

/* WP admin / forms.css often adds border + shadow on select — looks like a duplicate frame on the right. */
.bbmg-malware-wrap select.bbmg-malware-select {
	border: none !important;
	box-shadow: none !important;
	background-color: transparent !important;
}

.bbmg-malware-description {
	display: block;
	margin-top: 6px;
	font-size: 0.85rem;
	color: var(--bbmg-text-muted);
}

.bbmg-malware-scan-actions {
	display: flex;
	align-items: center;
	gap: 12px;
}

/* Buttons */
.bbmg-malware-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 20px;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.4;
	border: none;
	border-radius: var(--bbmg-radius-sm);
	cursor: pointer;
	transition: background var(--bbmg-transition), color var(--bbmg-transition), transform var(--bbmg-transition), box-shadow var(--bbmg-transition);
}

.bbmg-malware-btn:focus {
	outline: none;
}

.bbmg-malware-btn:focus-visible {
	box-shadow: 0 0 0 3px var(--bbmg-accent-light);
}

.bbmg-malware-btn-primary {
	background: var(--bbmg-accent);
	color: #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.bbmg-malware-btn-primary:hover:not(:disabled) {
	background: var(--bbmg-accent-hover);
	transform: translateY(-1px);
	box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
}

.bbmg-malware-btn-primary:active:not(:disabled) {
	transform: translateY(0);
}

.bbmg-malware-btn-primary:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

.bbmg-malware-btn-ghost {
	background: transparent;
	color: var(--bbmg-text-muted);
	border: 1px solid var(--bbmg-card-border);
}

.bbmg-malware-btn-ghost:hover {
	background: var(--bbmg-body-bg);
	color: var(--bbmg-text);
	border-color: var(--bbmg-text-muted);
}

.bbmg-malware-btn-cancel:hover {
	color: var(--bbmg-severity-high);
	border-color: var(--bbmg-severity-high);
}

.bbmg-malware-btn-loader {
	display: none;
	width: 18px;
	height: 18px;
	border: 2px solid rgba(255,255,255,0.3);
	border-top-color: #fff;
	border-radius: 50%;
	animation: bbmg-spin 0.7s linear infinite;
}

.bbmg-malware-btn.is-loading .bbmg-malware-btn-text {
	visibility: hidden;
}

.bbmg-malware-btn.is-loading .bbmg-malware-btn-loader {
	display: block;
	position: absolute;
}

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

/* Utility: initially hidden (JS may override with .style.display) */
.bbmg-malware-initially-hidden {
	display: none;
}

/* Progress bar */
.bbmg-malware-progress-wrap {
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid var(--bbmg-card-border);
}

.bbmg-malware-progress-bar {
	height: 32px;
	background: #e5e7eb;
	border-radius: 6px;
	overflow: hidden;
	margin-bottom: 12px;
	box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
	position: relative;
}

.bbmg-malware-progress-fill {
	height: 100%;
	width: 0%;
	background: #07d258; /* Primary green color - vibrant green */
	border-radius: 6px;
	transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 2px 4px rgba(7, 210, 88, 0.4);
	position: relative;
}

.bbmg-malware-progress-text {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	margin: 0;
	font-size: 13px;
	font-weight: 600;
	color: #fff;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
	pointer-events: none;
	white-space: nowrap;
}

.bbmg-malware-progress-current-dir {
	margin-bottom: 12px;
	color: #666;
	font-size: 13px;
	font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

.bbmg-malware-scan-stats {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
	margin-top: 16px;
}

.bbmg-malware-stat-card {
	background: #f9fafb;
	padding: 12px;
	border-radius: 6px;
	text-align: center;
	border: 1px solid #e5e7eb;
}

.bbmg-malware-stat-label {
	font-size: 11px;
	color: #6b7280;
	margin-bottom: 4px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.bbmg-malware-stat-value {
	font-size: 18px;
	font-weight: 600;
}

.bbmg-malware-stat-value#bbmg-files-stat {
	color: #059669;
}

.bbmg-malware-stat-value#bbmg-db-stat {
	color: #0073aa;
}

.bbmg-malware-stat-value#bbmg-infected-files {
	font-size: 20px;
	color: #dc2626;
}

.bbmg-malware-scan-message {
	margin-top: 16px;
	padding: 12px 16px;
	border-radius: var(--bbmg-radius-sm);
	font-size: 0.9rem;
}

.bbmg-malware-scan-message.is-success {
	background: rgba(5, 150, 105, 0.1);
	color: #047857;
	border: 1px solid rgba(5, 150, 105, 0.25);
}

.bbmg-malware-scan-message.is-error {
	background: rgba(220, 38, 38, 0.08);
	color: #b91c1c;
	border: 1px solid rgba(220, 38, 38, 0.2);
}

/* -------------------------------------------------------------------------
   Threats table
   ------------------------------------------------------------------------- */
.bbmg-malware-threats-count {
	font-size: 0.9rem;
	font-weight: 500;
	color: var(--bbmg-text-muted);
}

.bbmg-malware-threats-empty {
	text-align: center;
	padding: 40px 20px;
	color: var(--bbmg-text-muted);
}

.bbmg-malware-threats-empty p {
	margin: 0;
	font-size: 0.95rem;
}

.bbmg-malware-threats-loading {
	text-align: center;
	padding: 40px 20px;
	color: var(--bbmg-text-muted);
}

.bbmg-malware-threats-loading p {
	margin: 12px 0 0;
	font-size: 0.9rem;
}

.bbmg-malware-spinner {
	width: 32px;
	height: 32px;
	margin: 0 auto;
	border: 3px solid var(--bbmg-card-border);
	border-top-color: var(--bbmg-accent);
	border-radius: 50%;
	animation: bbmg-spin 0.7s linear infinite;
}

.bbmg-malware-empty-icon {
	width: 64px;
	height: 64px;
	margin: 0 auto 16px;
	background: var(--bbmg-body-bg);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.bbmg-malware-empty-icon::before {
	content: "";
	width: 32px;
	height: 32px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3C/svg%3E") no-repeat center;
	background-size: contain;
}

.bbmg-malware-threats-table-wrap {
	overflow-x: auto;
	overflow-y: auto;
	max-width: 100%;
	max-height: 500px;
	border-radius: var(--bbmg-radius-sm);
	border: 1px solid var(--bbmg-card-border);
	-webkit-overflow-scrolling: touch;
}

.bbmg-malware-threats-table-wrap .bbmg-malware-table thead th {
	position: sticky;
	top: 0;
	z-index: 1;
	background: var(--bbmg-body-bg);
	box-shadow: 0 1px 0 var(--bbmg-card-border);
}

.bbmg-malware-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.bbmg-malware-table th {
	text-align: left;
	padding: 12px 16px;
	background: var(--bbmg-body-bg);
	font-weight: 600;
	color: var(--bbmg-text);
	border-bottom: 1px solid var(--bbmg-card-border);
}

.bbmg-malware-table td {
	padding: 0;
	border-bottom: 1px solid var(--bbmg-card-border);
	vertical-align: middle;
}

.bbmg-malware-table tbody tr {
	transition: background var(--bbmg-transition);
}

.bbmg-malware-table tbody tr:hover {
	background: rgba(241, 245, 249, 0.8);
}

.bbmg-malware-table tbody tr.bbmg-malware-row-expanded {
	background: var(--bbmg-accent-light);
}

.bbmg-malware-table tbody tr.bbmg-malware-row-expanded:hover {
	background: var(--bbmg-accent-light);
}

.bbmg-malware-table .bbmg-malware-row-main td {
	padding: 14px 16px;
	cursor: pointer;
}

.bbmg-malware-table .bbmg-malware-row-main td:first-child {
	border-top-left-radius: 0;
}

.bbmg-malware-table .bbmg-malware-row-detail {
	display: none;
}

.bbmg-malware-table .bbmg-malware-row-detail td {
	padding: 0 16px 16px;
	border-bottom: 1px solid var(--bbmg-card-border);
	vertical-align: top;
}

.bbmg-malware-table .bbmg-malware-row-expanded + .bbmg-malware-row-detail {
	display: table-row;
}

.bbmg-malware-detail-inner {
	padding: 16px;
	background: #fff;
	border-radius: var(--bbmg-radius-sm);
	border: 1px solid var(--bbmg-card-border);
	font-size: 0.9rem;
	animation: bbmg-detail-open 0.25s ease;
}

@keyframes bbmg-detail-open {
	from {
		opacity: 0;
		transform: translateY(-8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.bbmg-malware-detail-row {
	margin-bottom: 12px;
}

.bbmg-malware-detail-row:last-child {
	margin-bottom: 0;
}

.bbmg-malware-detail-label {
	font-weight: 600;
	color: var(--bbmg-text-muted);
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	margin-bottom: 4px;
}

.bbmg-malware-detail-value {
	color: var(--bbmg-text);
}

.bbmg-malware-detail-value code {
	font-size: 0.85em;
	background: var(--bbmg-body-bg);
	padding: 2px 6px;
	border-radius: 4px;
	word-break: break-all;
}

/* Full path in expanded detail - wrap long paths, ensure full visibility */
.bbmg-malware-full-path {
	display: block;
	max-width: 100%;
	white-space: pre-wrap;
	word-break: break-all;
	overflow-wrap: break-word;
}

.bbmg-malware-code-block {
	margin: 0;
	padding: 12px;
	background: #1e293b;
	color: #e2e8f0;
	border-radius: var(--bbmg-radius-sm);
	font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
	font-size: 0.85em;
	line-height: 1.5;
	overflow-x: auto;
	max-width: 100%;
	white-space: pre;
	word-wrap: normal;
}

.bbmg-malware-code-block code {
	background: transparent;
	padding: 0;
	color: inherit;
	font-family: inherit;
	font-size: inherit;
	word-break: normal;
	white-space: pre;
}

.bbmg-malware-row-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 6px;
	background: transparent;
	border: none;
	color: var(--bbmg-text-muted);
	cursor: pointer;
	transition: background var(--bbmg-transition), color var(--bbmg-transition), transform var(--bbmg-transition);
}

.bbmg-malware-row-toggle:hover {
	background: var(--bbmg-body-bg);
	color: var(--bbmg-text);
}

.bbmg-malware-row-toggle svg {
	transition: transform var(--bbmg-transition);
}

.bbmg-malware-row-expanded .bbmg-malware-row-toggle svg {
	transform: rotate(180deg);
}

/* Severity pills */
.bbmg-malware-severity {
	display: inline-flex;
	align-items: center;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.bbmg-malware-severity-critical {
	background: var(--bbmg-severity-critical-bg);
	color: var(--bbmg-severity-critical);
}

.bbmg-malware-severity-high {
	background: var(--bbmg-severity-high-bg);
	color: var(--bbmg-severity-high);
}

.bbmg-malware-severity-medium {
	background: var(--bbmg-severity-medium-bg);
	color: var(--bbmg-severity-medium);
}

.bbmg-malware-severity-low {
	background: var(--bbmg-severity-low-bg);
	color: var(--bbmg-severity-low);
}

.bbmg-malware-col-action {
	width: 100px;
	text-align: right;
}

.bbmg-malware-btn-clean {
	font-size: 0.85rem;
	padding: 6px 12px;
	opacity: 0.9;
}

.bbmg-malware-btn-clean:hover {
	opacity: 1;
}

.bbmg-malware-action-group {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.bbmg-malware-patched-label {
	font-size: 0.85rem;
	color: var(--bbmg-text-muted);
}

.bbmg-malware-btn-undo {
	font-size: 0.85rem;
	padding: 6px 12px;
	opacity: 0.9;
}

.bbmg-malware-btn-undo:hover:not(:disabled) {
	opacity: 1;
}

.bbmg-malware-location-cell {
	max-width: 280px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.bbmg-malware-location-cell code {
	font-size: 0.85em;
	background: var(--bbmg-body-bg);
	padding: 2px 6px;
	border-radius: 4px;
}

/* -------------------------------------------------------------------------
   Patches tab – relaxed spacing, less congestion
   ------------------------------------------------------------------------- */
.bbmg-malware-patches-card .bbmg-malware-card-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 4px;
}

.bbmg-malware-patches-desc {
	margin: 0 0 24px;
	font-size: 0.9rem;
	color: var(--bbmg-text-muted);
	line-height: 1.5;
}

.bbmg-malware-patches-count {
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--bbmg-text-muted);
}

.bbmg-malware-patches-empty {
	text-align: center;
	padding: 48px 24px;
	color: var(--bbmg-text-muted);
}

.bbmg-malware-patches-empty .bbmg-malware-empty-icon {
	margin-bottom: 16px;
}

.bbmg-malware-patches-empty p {
	margin: 0;
	font-size: 0.9rem;
}

.bbmg-malware-patches-loading {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 48px 24px;
	color: var(--bbmg-text-muted);
}

.bbmg-malware-patches-loading p {
	margin: 16px 0 0;
	font-size: 0.9rem;
}

.bbmg-malware-patches-table-wrap {
	margin-top: 8px;
	max-height: 480px;
	overflow-y: auto;
	border-radius: var(--bbmg-radius-sm);
	border: 1px solid var(--bbmg-card-border);
}

.bbmg-malware-patches-table-wrap .bbmg-malware-table {
	font-size: 0.875rem;
}

.bbmg-malware-patches-table-wrap .bbmg-malware-table th {
	padding: 14px 18px;
	background: var(--bbmg-body-bg);
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

/* Sticky header while scrolling inside the patches table wrapper */
.bbmg-malware-patches-table-wrap .bbmg-malware-table thead th {
	position: sticky;
	top: 0;
	z-index: 2;
	background: var(--bbmg-body-bg);
	box-shadow: 0 1px 0 var(--bbmg-card-border);
}

.bbmg-malware-patch-row td {
	padding: 14px 18px;
	border-bottom: 1px solid var(--bbmg-card-border);
}

.bbmg-malware-patch-row:last-child td {
	border-bottom: none;
}

.bbmg-malware-patch-row:nth-child(even) {
	background: rgba(249, 250, 251, 0.6);
}

.bbmg-malware-patch-row:hover {
	background: rgba(241, 245, 249, 0.9);
}

.bbmg-malware-patch-row .bbmg-malware-location-cell {
	max-width: 360px;
}

.bbmg-malware-patch-row .bbmg-malware-location-cell code {
	font-size: 0.8rem;
	word-break: break-all;
}

.bbmg-malware-patch-row td:nth-child(2),
.bbmg-malware-patch-row td:nth-child(3) {
	color: var(--bbmg-text-muted);
	font-size: 0.825rem;
}

.bbmg-malware-patch-row .bbmg-malware-col-action {
	width: 100px;
	text-align: right;
}

.bbmg-malware-patch-rolled-back {
	font-size: 0.825rem;
	color: var(--bbmg-text-muted);
}

.bbmg-malware-btn-rollback {
	font-size: 0.825rem;
	padding: 6px 14px;
}

/* -------------------------------------------------------------------------
   History list
   ------------------------------------------------------------------------- */
.bbmg-malware-history-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.bbmg-malware-history-item {
	display: grid;
	grid-template-columns: 1fr auto;
	grid-template-rows: auto auto;
	gap: 8px 16px;
	align-items: center;
	padding: 16px;
	background: var(--bbmg-body-bg);
	border-radius: var(--bbmg-radius-sm);
	border: 1px solid transparent;
	transition: background var(--bbmg-transition), border-color var(--bbmg-transition), box-shadow var(--bbmg-transition);
}

.bbmg-malware-history-item:hover {
	background: #e2e8f0;
	border-color: var(--bbmg-card-border);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.bbmg-malware-history-main {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
}

.bbmg-malware-history-type {
	font-weight: 600;
	color: var(--bbmg-text);
	text-transform: capitalize;
}
/* #bbmg-tab-scan{
	display: flex !important;
    flex-direction: column;
    gap: 16px;
} */
.bbmg-malware-history-status {
	grid-column: 2;
	grid-row: 1;
}

.bbmg-malware-history-date {
	font-size: 0.9rem;
	color: var(--bbmg-text-muted);
}

.bbmg-malware-history-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	font-size: 0.85rem;
	color: var(--bbmg-text-muted);
	grid-column: 1;
}

.bbmg-malware-history-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	grid-column: 2;
	grid-row: 2;
	align-self: center;
	justify-self: end;
}

.bbmg-malware-history-view {
	/* Placed inside .bbmg-malware-history-actions; no grid placement. */
}

.bbmg-malware-status-pill {
	display: inline-flex;
	align-items: center;
	padding: 3px 8px;
	border-radius: 6px;
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: capitalize;
}

.bbmg-malware-history-status.bbmg-malware-status-complete {
	background: rgba(5, 150, 105, 0.15);
	color: #047857;
}

.bbmg-malware-history-status.bbmg-malware-status-paused {
	background: rgba(234, 88, 12, 0.15);
	color: #c2410c;
}

.bbmg-malware-history-status.bbmg-malware-status-running {
	background: var(--bbmg-accent-light);
	color: var(--bbmg-accent-hover);
}

.bbmg-malware-history-status.bbmg-malware-status-cancelled,
.bbmg-malware-history-status.bbmg-malware-status-failed {
	background: rgba(100, 116, 139, 0.2);
	color: var(--bbmg-text-muted);
}

.bbmg-malware-status-applied {
	background: rgba(5, 150, 105, 0.15);
	color: #047857;
}

.bbmg-malware-status-rolled_back {
	background: rgba(100, 116, 139, 0.2);
	color: var(--bbmg-text-muted);
}

.bbmg-malware-verify-verified {
	background: rgba(5, 150, 105, 0.15);
	color: #047857;
}

.bbmg-malware-verify-needs_review {
	background: rgba(234, 88, 12, 0.15);
	color: #c2410c;
}

.bbmg-malware-verify-unknown {
	background: rgba(100, 116, 139, 0.2);
	color: var(--bbmg-text-muted);
}

.bbmg-malware-history-empty {
	text-align: center;
	padding: 32px 24px;
	color: var(--bbmg-text-muted);
	font-size: 0.95rem;
}

/* -------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------- */
@media (max-width: 782px) {
	.bbmg-malware-wrap {
		padding: 16px 12px 24px;
		max-width: 100%;
	}

	.bbmg-malware-header {
		padding: 16px;
	}

	.bbmg-malware-logo-icon {
		width: 40px;
		height: 40px;
	}

	.bbmg-malware-title {
		font-size: 1.2rem;
	}

	.bbmg-malware-subtitle {
		font-size: 0.8125rem;
	}

	.bbmg-malware-card {
		padding: 16px;
	}

	.bbmg-malware-scan-controls {
		flex-direction: column;
		align-items: stretch;
		gap: 16px;
	}

	.bbmg-malware-scan-type .bbmg-malware-select-wrap {
		max-width: none;
	}

	.bbmg-malware-scan-actions {
		flex-wrap: wrap;
	}

	.bbmg-malware-summary-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.bbmg-malware-threats-table-wrap {
		margin-left: -16px;
		margin-right: -16px;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.bbmg-malware-table {
		min-width: 560px;
		font-size: 13px;
	}

	.bbmg-malware-table th,
	.bbmg-malware-table .bbmg-malware-row-main td {
		padding: 10px 12px;
	}

	.bbmg-malware-history-item {
		grid-template-columns: 1fr;
		grid-template-rows: auto auto auto;
		gap: 10px;
	}

	.bbmg-malware-history-main {
		order: 1;
	}

	.bbmg-malware-history-meta {
		order: 2;
	}

	.bbmg-malware-history-actions {
		order: 3;
		grid-column: 1;
		justify-self: start;
	}

	.bbmg-malware-history-view {
		grid-column: auto;
		grid-row: auto;
	}
}

@media (max-width: 480px) {
	.bbmg-malware-wrap {
		padding: 12px 10px 20px;
	}

	.bbmg-malware-card {
		padding: 14px;
	}
}

/* -------------------------------------------------------------------------
   Tabs Navigation - Professional Design
   ------------------------------------------------------------------------- */
.bbmg-malware-tabs {
	display: flex;
	gap: 8px;
	margin: 24px 0 20px;
	padding: 0;
	border-bottom: 2px solid var(--bbmg-card-border);
	background: transparent;
}

.bbmg-malware-tab {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 20px;
	margin: 0;
	border: none;
	background: transparent;
	font-size: 14px;
	font-weight: 500;
	color: var(--bbmg-text-muted);
	cursor: pointer;
	transition: all var(--bbmg-transition);
	position: relative;
	border-radius: var(--bbmg-radius-sm) var(--bbmg-radius-sm) 0 0;
}

.bbmg-malware-tab::after {
	content: '';
	position: absolute;
	bottom: -2px;
	left: 0;
	right: 0;
	height: 2px;
	background: var(--bbmg-accent);
	transform: scaleX(0);
	transition: transform var(--bbmg-transition);
}

.bbmg-malware-tab:hover {
	color: var(--bbmg-text);
	background: rgba(5, 150, 105, 0.05);
}

.bbmg-malware-tab.is-active {
	color: var(--bbmg-accent);
	font-weight: 600;
	background: rgba(5, 150, 105, 0.08);
}

.bbmg-malware-tab.is-active::after {
	transform: scaleX(1);
}

.bbmg-malware-tab-icon {
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

/* Flat tab glyphs (Dashicons); inherit color from .bbmg-malware-tab for active/muted states */
.bbmg-malware-tab-icon.dashicons {
	width: 18px;
	height: 18px;
	font-size: 18px;
}

.bbmg-malware-tab-text {
	line-height: 1.4;
}

/* -------------------------------------------------------------------------
   Scheduler Section - Premium Design
   ------------------------------------------------------------------------- */
.bbmg-malware-scheduler-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 32px;
	padding-bottom: 24px;
	border-bottom: 1px solid var(--bbmg-card-border);
}

.bbmg-malware-scheduler-header-content {
	flex: 1;
}

.bbmg-malware-scheduler-subtitle {
	margin: 6px 0 0;
	font-size: 0.9rem;
	color: var(--bbmg-text-muted);
	font-weight: 400;
}

.bbmg-malware-scheduler-status-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	border-radius: 20px;
	font-size: 0.85rem;
	font-weight: 600;
	transition: all var(--bbmg-transition);
}

.bbmg-malware-scheduler-status-badge.is-enabled {
	background: rgba(5, 150, 105, 0.12);
	color: #047857;
}

.bbmg-malware-scheduler-status-badge.is-disabled {
	background: rgba(107, 114, 128, 0.12);
	color: var(--bbmg-text-muted);
}

.bbmg-malware-scheduler-status-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: currentColor;
	flex-shrink: 0;
}

.bbmg-malware-scheduler-status-badge.is-enabled .bbmg-malware-scheduler-status-dot {
	box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.2);
	animation: bbmg-pulse 2s ease-in-out infinite;
}

.bbmg-malware-scheduler-grid {
	display: grid;
	grid-template-columns: 1.5fr 1fr;
	gap: 32px;
}

.bbmg-malware-scheduler-section {
	margin-bottom: 0;
}

.bbmg-malware-scheduler-section-title {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 20px;
	font-size: 1rem;
	font-weight: 600;
	color: var(--bbmg-text);
}

.bbmg-malware-scheduler-icon {
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.bbmg-malware-scheduler-icon.dashicons {
	width: 18px;
	height: 18px;
	font-size: 18px;
	color: var(--bbmg-accent);
}

.bbmg-malware-scheduler-options {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.bbmg-malware-scheduler-option {
	display: block;
	cursor: pointer;
	position: relative;
}

.bbmg-malware-scheduler-option input[type="radio"] {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.bbmg-malware-scheduler-option-content {
	padding: 20px;
	background: var(--bbmg-body-bg);
	border: 2px solid var(--bbmg-card-border);
	border-radius: var(--bbmg-radius);
	transition: all var(--bbmg-transition);
}

.bbmg-malware-scheduler-option:hover .bbmg-malware-scheduler-option-content {
	border-color: var(--bbmg-accent);
	box-shadow: 0 2px 8px rgba(5, 150, 105, 0.1);
}

.bbmg-malware-scheduler-option.is-selected .bbmg-malware-scheduler-option-content {
	background: rgba(5, 150, 105, 0.05);
	border-color: var(--bbmg-accent);
	box-shadow: 0 0 0 3px var(--bbmg-accent-light);
}

.bbmg-malware-scheduler-option-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 8px;
}

.bbmg-malware-scheduler-option-title {
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--bbmg-text);
}

.bbmg-malware-scheduler-option-badge {
	display: inline-flex;
	align-items: center;
	padding: 3px 8px;
	background: var(--bbmg-accent);
	color: #fff;
	border-radius: 12px;
	font-size: 0.7rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.bbmg-malware-scheduler-option-desc {
	margin: 0 0 12px;
	font-size: 0.875rem;
	color: var(--bbmg-text-muted);
	line-height: 1.5;
}

.bbmg-malware-scheduler-option-meta {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding-top: 12px;
	border-top: 1px solid var(--bbmg-card-border);
}

.bbmg-malware-scheduler-meta-item {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.8rem;
	color: var(--bbmg-text-muted);
}

.bbmg-malware-scheduler-meta-icon {
	font-size: 14px;
	line-height: 1;
}

.bbmg-malware-scheduler-info-panel {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.bbmg-malware-scheduler-info-card {
	background: linear-gradient(135deg, rgba(5, 150, 105, 0.03) 0%, rgba(5, 150, 105, 0.08) 100%);
	border: 1px solid rgba(5, 150, 105, 0.15);
	border-radius: var(--bbmg-radius);
	padding: 20px;
	transition: all var(--bbmg-transition);
}

.bbmg-malware-scheduler-info-card:hover {
	box-shadow: 0 4px 12px rgba(5, 150, 105, 0.15);
	transform: translateY(-2px);
}

.bbmg-malware-scheduler-info-header {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 16px;
}

.bbmg-malware-scheduler-info-icon {
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.bbmg-malware-scheduler-info-icon.dashicons {
	width: 20px;
	height: 20px;
	font-size: 20px;
	color: var(--bbmg-accent);
}

.bbmg-malware-scheduler-info-title {
	margin: 0;
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--bbmg-text);
}

.bbmg-malware-scheduler-info-content {
	margin: 0;
}

.bbmg-malware-scheduler-next-time {
	margin: 0 0 12px;
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--bbmg-accent);
	letter-spacing: -0.01em;
}

.bbmg-malware-scheduler-info-note {
	margin: 0;
	font-size: 0.8rem;
	color: var(--bbmg-text-muted);
	line-height: 1.5;
}

.bbmg-malware-scheduler-info-list {
	margin: 0;
	padding-left: 20px;
	list-style: none;
}

.bbmg-malware-scheduler-info-list li {
	position: relative;
	margin-bottom: 10px;
	padding-left: 24px;
	font-size: 0.85rem;
	color: var(--bbmg-text);
	line-height: 1.6;
}

.bbmg-malware-scheduler-info-list li:last-child {
	margin-bottom: 0;
}

.bbmg-malware-scheduler-info-list li::before {
	content: '✓';
	position: absolute;
	left: 0;
	top: 0;
	width: 18px;
	height: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--bbmg-accent);
	color: #fff;
	border-radius: 50%;
	font-size: 10px;
	font-weight: 700;
}

.bbmg-malware-scheduler-info-note small {
	color: var(--bbmg-text-muted);
}

/* Tabs: only scan tab visible by default; JS toggles visibility */
#bbmg-tab-scan {
	display: block;
}

#bbmg-tab-patches,
#bbmg-tab-scheduler {
	display: none;
}

/* Email alerts block (Scheduler) */
.bbmg-malware-scheduler-section-spaced {
	margin-top: 32px;
}

.bbmg-malware-email-alerts-box {
	padding: 16px;
	background: #f9fafb;
	border-radius: 8px;
	border: 1px solid #e5e7eb;
}

.bbmg-malware-email-alerts-box label.bbmg-malware-email-alerts-label {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 16px;
	cursor: pointer;
}

.bbmg-malware-email-alerts-box input[type="checkbox"] {
	width: 18px;
	height: 18px;
	cursor: pointer;
}

.bbmg-malware-email-alerts-box .bbmg-malware-email-alerts-title {
	font-weight: 600;
	color: #1f2937;
}

.bbmg-malware-email-alerts-desc {
	margin: 0 0 16px 28px;
	font-size: 14px;
	color: #6b7280;
}

.bbmg-malware-email-alerts-field-wrap {
	margin-left: 28px;
}

.bbmg-malware-email-alerts-field-wrap label {
	display: block;
	margin-bottom: 6px;
	font-weight: 500;
	color: #374151;
}

.bbmg-malware-email-alerts-address {
	width: 100%;
	max-width: 400px;
	padding: 8px 12px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	font-size: 14px;
}

.bbmg-malware-email-alerts-field-hint {
	margin: 6px 0 0;
	font-size: 13px;
	color: #6b7280;
}

.bbmg-malware-email-alerts-save-wrap {
	margin-top: 16px;
	margin-left: 28px;
}

.bbmg-malware-bulk-actions {
	margin-bottom: 16px;
	padding: 12px;
	background: #f9fafb;
	border-radius: 6px;
}

.bbmg-malware-clean-all-status {
	margin-left: 12px;
	color: #6b7280;
	font-size: 13px;
}

#bbmg-clean-all-btn.bbmg-malware-initially-hidden {
	display: none;
}

/* Responsive scheduler */
@media (max-width: 782px) {
	.bbmg-malware-scheduler-grid {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	.bbmg-malware-scheduler-header {
		flex-direction: column;
		align-items: flex-start;
	}

	.bbmg-malware-tabs {
		flex-wrap: wrap;
		gap: 4px;
	}

	.bbmg-malware-tab {
		padding: 10px 16px;
		font-size: 13px;
	}
}
