/**
 * AdminEase — Global admin chrome (loaded on every WP admin page).
 * Kept light on overrides because WP-Admin pages outside our app use the
 * native WordPress theme. PrecisionWP tokens are declared on .pwp-app, which
 * none of these selectors sit inside, so the palette values below are literal.
 */


/* ── Admin menu icon ──────────────────────────────────────────────── */
#adminmenu .toplevel_page_adminease .wp-menu-image img,
#adminmenu .toplevel_page_adminease-network .wp-menu-image img,
#adminmenu .toplevel_page_admineasepro .wp-menu-image img,
#adminmenu .toplevel_page_adminease-pro .wp-menu-image img {
	max-width: 30px;
	max-height: 30px;
	padding: 2px 0 0 0;
	opacity: 1;
}


/* ── Plugins list — author / icon ─────────────────────────────────── */
tr[data-slug="adminease"] .plugin-title strong::before,
tr[data-slug="admineasepro"] .plugin-title strong::before,
tr[data-slug="adminease-pro"] .plugin-title strong::before {
	content: "";
	display: inline-block;
	width: 20px;
	height: 20px;
	margin: -4px 5px 0 0;
	background-repeat: no-repeat;
	background-position: center center;
	background-size: contain;
	vertical-align: middle;
}

[dir="rtl"] tr[data-slug="adminease"] .plugin-title strong::before,
[dir="rtl"] tr[data-slug="admineasepro"] .plugin-title strong::before,
[dir="rtl"] tr[data-slug="adminease-pro"] .plugin-title strong::before {
	margin: -4px 0 0 5px;
}

tr[data-slug="adminease"] .adminease-icon,
tr[data-slug="admineasepro"] .adminease-icon,
tr[data-slug="adminease-pro"] .adminease-icon {
	position: relative;
	top: 5px;
	width: 20px;
}


/* ── Media library — SVG support ──────────────────────────────────── */
.media-icon img[src$=".svg"] {
	width: 100%;
	height: auto;
	max-width: 60px;
	max-height: 60px;
}

.attachment.svg .thumbnail {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f2f7f3;
}

.attachment.svg .thumbnail img {
	object-fit: contain;
	max-width: 100%;
	max-height: 100%;
}

.svg-sanitized-notice {
	position: absolute;
	top: 5px;
	right: 5px;
	background: #00a32a;
	color: #fff;
	padding: 2px 6px;
	border-radius: 3px;
	font-size: 11px;
	font-weight: 700;
}


/* ── Media library — infinite scroll loading indicator ────────────── */
.adminease-loading-indicator {
	margin: 12px 0;
	padding: 12px 16px;
	background: rgba(21, 128, 61, 0.08);
	border: 1px solid rgba(21, 128, 61, 0.22);
	border-radius: 8px;
	color: #166534;
}

.adminease-loading-indicator .spinner {
	float: none;
	margin: 0 5px 0 0;
}

.adminease-loading-indicator p {
	margin: 0;
	color: inherit;
	font-style: normal;
	font-weight: 500;
}

.media-frame-content .attachments-browser {
	scroll-behavior: smooth;
}

.attachment.loading {
	opacity: 0.6;
}

.attachment.loading::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 20px;
	height: 20px;
	margin: -10px 0 0 -10px;
	border: 2px solid #15803d;
	border-top-color: transparent;
	border-radius: 50%;
	animation: adminease-spin 1s linear infinite;
}

@keyframes adminease-spin {
	0%   { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}