/*
 * Postlinkly Link Profile column styles.
 *
 * Loaded on edit.php (post-list) screens only.
 * Adds the pill-badge link stats to the "Link Profile" column.
 *
 * @package Postlinkly
 * @since   1.2.3
 */

/* ==========================================================================
   LINK PROFILE COLUMN — pill badges
   ========================================================================== */

.pls-stats {
	display: flex;
	align-items: center;
	gap: 5px;
	flex-wrap: nowrap;
}

.pls-stat {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	height: 26px;
	padding: 0 7px 0 5px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: -0.01em;
	white-space: nowrap;
	position: relative;
	transition: background-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.pls-stat:hover {
	transform: translateY(-1px) scale(1.04);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.pls-stat svg {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
}

/* Tooltip on hover */
.pls-stat[data-tip]:hover::after {
	content: attr(data-tip);
	position: absolute;
	bottom: calc(100% + 6px);
	left: 50%;
	transform: translateX(-50%);
	background: #0f172a;
	color: #fff;
	font-size: 11px;
	font-weight: 500;
	padding: 4px 8px;
	border-radius: 4px;
	white-space: nowrap;
	pointer-events: none;
	z-index: 10;
	line-height: 1.4;
}

.pls-stat[data-tip]:hover::before {
	content: '';
	position: absolute;
	bottom: calc(100% + 2px);
	left: 50%;
	transform: translateX(-50%);
	border: 4px solid transparent;
	border-top-color: #0f172a;
	pointer-events: none;
	z-index: 10;
}

/* ==========================================================================
   BADGE COLOUR VARIANTS
   ========================================================================== */

.pls-stat--inbound {
	background: #eff6ff;
	color: #1d4ed8;
}

.pls-stat--inbound:hover {
	background: #dbeafe;
}

.pls-stat--outbound {
	background: #f0fdf4;
	color: #15803d;
}

.pls-stat--outbound:hover {
	background: #dcfce7;
}

.pls-stat--external {
	background: #fef2f2;
	color: #b91c1c;
}

.pls-stat--external:hover {
	background: #fee2e2;
}

.pls-stat--orphan {
	background: #fffbeb;
	color: #b45309;
	padding: 0 6px;
	min-width: 26px;
	justify-content: center;
}

.pls-stat--orphan:hover {
	background: #fef3c7;
}

/* AI anchors (purple) */
.pls-stat--ai {
	background: #f5f3ff;
	color: #7c3aed;
}

.pls-stat--ai:hover {
	background: #ede9fe;
}

/* Zero-state dimmed */
.pls-stat--zero {
	background: #f8fafc;
	color: #94a3b8;
	font-weight: 500;
}

.pls-stat--zero:hover {
	background: #e2e8f0;
}

/* Not-scanned placeholder */
.pls-stat--unscanned {
	background: #f8fafc;
	color: #94a3b8;
	font-weight: 500;
	cursor: pointer;
}

.pls-stat--unscanned:hover {
	background: #e2e8f0;
	color: #475569;
}

/* Status not scanned (e.g. drafts) — informational, nothing to click */
.pls-stat--excluded {
	padding: 0 7px;
	background: transparent;
	border: 1px dashed #cbd5e1;
	color: #94a3b8;
	font-weight: 500;
	cursor: help;
}

/* ==========================================================================
   HEALTH DOT INDICATOR
   ========================================================================== */

.pls-health {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	flex-shrink: 0;
	display: inline-block;
	transition: transform 0.15s ease;
}

.pls-health:hover {
	transform: scale(1.8);
	box-shadow: 0 0 8px rgba(0, 0, 0, 0.15);
}

.pls-health--good {
	background: #22c55e;
	box-shadow: 0 0 0 2px #f0fdf4;
}

.pls-health--warning {
	background: #f59e0b;
	box-shadow: 0 0 0 2px #fffbeb;
}

.pls-health--orphan {
	background: #ef4444;
	box-shadow: 0 0 0 2px #fef2f2;
}

.pls-health--unscanned {
	background: #cbd5e1;
	box-shadow: 0 0 0 2px #f8fafc;
}
