/* ============================================================
   TWT AEO — Author Hover Cards
   Lightweight, accessible, theme-agnostic author cards.
   ============================================================ */

:root {
	--aeo-hover-bg:       #ffffff;
	--aeo-hover-text:     #1e293b;
	--aeo-hover-muted:    #64748b;
	--aeo-hover-border:   #e2e8f0;
	--aeo-hover-accent:   #0ea5e9;
	--aeo-hover-success:  #16a34a;
	--aeo-hover-radius:   10px;
	--aeo-hover-shadow:   0 8px 30px rgba(0,0,0,.14), 0 2px 8px rgba(0,0,0,.08);
	--aeo-hover-width:    320px;
	--aeo-hover-z:        99999;
}

/* ── Card container ── */
.twt-aeo-hover-card {
	position: fixed;
	z-index: var(--aeo-hover-z);
	width: var(--aeo-hover-width);
	background: var(--aeo-hover-bg);
	border: 1px solid var(--aeo-hover-border);
	border-radius: var(--aeo-hover-radius);
	box-shadow: var(--aeo-hover-shadow);
	padding: 0;
	overflow: hidden;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 13px;
	line-height: 1.5;
	color: var(--aeo-hover-text);

	/* Hidden by default */
	opacity: 0;
	pointer-events: none;
	transform: translateY(6px);
	transition: opacity .15s ease, transform .15s ease;
}

.twt-aeo-hover-card.is-visible {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0);
}

/* ── Header (avatar + name) ── */
.twt-aeo-hover-card__header {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 16px 12px;
	border-bottom: 1px solid var(--aeo-hover-border);
	background: #f8fafc;
}

.twt-aeo-hover-card__avatar {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
	border: 2px solid var(--aeo-hover-border);
}

.twt-aeo-hover-card__meta {
	min-width: 0;
}

.twt-aeo-hover-card__name {
	display: block;
	font-size: 15px;
	font-weight: 700;
	color: var(--aeo-hover-text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.twt-aeo-hover-card__title {
	display: block;
	font-size: 12px;
	color: var(--aeo-hover-accent);
	font-weight: 500;
	margin-top: 1px;
}

.twt-aeo-hover-card__credentials {
	display: block;
	font-size: 11px;
	color: var(--aeo-hover-muted);
	margin-top: 1px;
}

/* ── Body ── */
.twt-aeo-hover-card__body {
	padding: 12px 16px;
}

/* ── Bio ── */
.twt-aeo-hover-card__bio {
	font-size: 12px;
	color: var(--aeo-hover-muted);
	margin: 0 0 12px;
	line-height: 1.55;
}

/* ── Signal row ── */
.twt-aeo-hover-card__signals {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	margin-bottom: 12px;
}

.twt-aeo-hover-signal {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 11px;
	font-weight: 600;
	padding: 3px 8px;
	border-radius: 20px;
	background: #f1f5f9;
	color: var(--aeo-hover-muted);
}

.twt-aeo-hover-signal--certs {
	background: rgba(22,163,74,.1);
	color: var(--aeo-hover-success);
}

.twt-aeo-hover-signal--exp {
	background: rgba(14,165,233,.1);
	color: var(--aeo-hover-accent);
}

/* ── Expertise tags ── */
.twt-aeo-hover-card__expertise {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-bottom: 12px;
}

.twt-aeo-hover-tag {
	display: inline-block;
	font-size: 10px;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 12px;
	background: #e0f2fe;
	color: #0369a1;
	white-space: nowrap;
}

/* ── Certifications mini-list ── */
.twt-aeo-hover-card__certs {
	font-size: 11px;
	color: var(--aeo-hover-muted);
	margin-bottom: 12px;
	border-left: 2px solid #e2e8f0;
	padding-left: 10px;
}

.twt-aeo-hover-card__certs strong {
	display: block;
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: .05em;
	margin-bottom: 4px;
	color: #94a3b8;
}

.twt-aeo-hover-card__certs li {
	margin: 0 0 2px;
	list-style: none;
}

/* ── Social chips ── */
.twt-aeo-hover-card__social {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 12px;
}

.twt-aeo-hover-social-chip {
	display: inline-block;
	font-size: 10px;
	font-weight: 600;
	padding: 3px 8px;
	border-radius: 4px;
	background: #f1f5f9;
	color: var(--aeo-hover-muted);
	text-decoration: none;
	transition: background .1s;
}

.twt-aeo-hover-social-chip:hover {
	background: var(--aeo-hover-accent);
	color: #fff;
}

/* ── Footer link ── */
.twt-aeo-hover-card__footer {
	padding: 10px 16px;
	border-top: 1px solid var(--aeo-hover-border);
	background: #f8fafc;
	text-align: right;
}

.twt-aeo-hover-card__profile-link {
	display: inline-block;
	font-size: 12px;
	font-weight: 600;
	color: var(--aeo-hover-accent);
	text-decoration: none;
	padding: 5px 12px;
	border: 1px solid var(--aeo-hover-accent);
	border-radius: 6px;
	transition: background .1s, color .1s;
}

.twt-aeo-hover-card__profile-link:hover {
	background: var(--aeo-hover-accent);
	color: #fff;
}

/* ── Responsive: disable on very small screens ── */
@media ( max-width: 480px ) {
	.twt-aeo-hover-card {
		display: none !important;
	}
}
