/**
 * BinsOptimizer — Media Library column styles
 *
 * Scoped to the Media Library list view (upload screen).
 */

/* ── Column widths ─────────────────────────────────────────────────────────── */

.column-biio_filesize {
	width: 90px;
}

.column-biio_savings {
	width: 150px;
}

/* ── File Size column ──────────────────────────────────────────────────────── */

.biio-filesize {
	font-size: 12px;
	font-weight: 500;
	color: #374151;
	letter-spacing: 0.01em;
}

.biio-filesize--na {
	color: #d1d5db;
	font-size: 14px;
}

/* ── Shared badge base ─────────────────────────────────────────────────────── */

.biio-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 10px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.6;
	white-space: nowrap;
}

/* ── Optimized badge ───────────────────────────────────────────────────────── */

.biio-badge--saved {
	background: #d1fae5;
	color: #065f46;
}

.biio-badge--saved em {
	font-style: normal;
	font-weight: 400;
	opacity: .8;
	text-transform: lowercase;
}

/* ── Not-optimised badge ───────────────────────────────────────────────────── */

.biio-badge--none {
	background: #f3f4f6;
	color: #6b7280;
}

/* ── "Optimize It" button — normal (quiet) ─────────────────────────────────── */

.biio-optimize-btn {
	display: block;
	width: 100%;
	padding: 8px 10px;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.7px;
	text-transform: uppercase;
	text-align: center;
	color: #6366f1;
	background: transparent;
	border: 1px solid #6366f1;
	border-radius: 7px;
	cursor: pointer;
	line-height: 1.5;
	box-sizing: border-box;
	outline: none;
	box-shadow: none;
	transition:
		color        0.22s cubic-bezier(0.4, 0, 0.2, 1),
		background   0.22s cubic-bezier(0.4, 0, 0.2, 1),
		border-color 0.22s cubic-bezier(0.4, 0, 0.2, 1),
		box-shadow   0.22s cubic-bezier(0.4, 0, 0.2, 1),
		transform    0.18s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Hover — comes alive ────────────────────────────────────────────────────── */

.biio-optimize-btn:hover {
	color: #ffffff;
	background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
	border-color: transparent;
	box-shadow: 0 6px 20px rgba(99, 102, 241, 0.36);
	transform: translateY(-1px);
	outline: none;
}

/* ── Active / press ─────────────────────────────────────────────────────────── */

.biio-optimize-btn:active {
	transform: translateY(0);
	box-shadow: 0 3px 10px rgba(99, 102, 241, 0.25);
}

/* ── Disabled fallback ──────────────────────────────────────────────────────── */

.biio-optimize-btn:disabled {
	color: #c8d0db;
	background: #f5f7fa;
	border-color: #edf0f4;
	box-shadow: none;
	transform: none;
	cursor: wait;
	text-transform: none;
	letter-spacing: 0;
	font-weight: 500;
}

/* ── Loading / processing state (overrides :disabled above) ─────────────────── */

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

.biio-spinner {
	display: inline-block;
	width: 11px;
	height: 11px;
	border: 1.5px solid rgba(255, 255, 255, 0.3);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: biio-spin 0.65s linear infinite;
	flex-shrink: 0;
}

.biio-optimize-btn.biio-btn--loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	color: #ffffff;
	background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
	border-color: transparent;
	box-shadow: 0 4px 14px rgba(99, 102, 241, 0.28);
	cursor: wait;
	text-transform: none;
	letter-spacing: 0;
	font-weight: 500;
	pointer-events: none;
}

/* ── Error state ────────────────────────────────────────────────────────────── */

.biio-optimize-btn.biio-btn--error {
	color: #e05252;
	background: transparent;
	border-color: #f5c6c6;
	box-shadow: none;
	transform: none;
	text-transform: none;
	letter-spacing: 0;
	font-weight: 500;
}

.biio-optimize-btn.biio-btn--error:hover {
	color: #ffffff;
	background: linear-gradient(135deg, #ef4444, #dc2626);
	border-color: transparent;
	box-shadow: 0 6px 18px rgba(220, 38, 38, 0.35);
	transform: translateY(-1px);
}
