/*
 * EEAT Author & Reviewer — Front-end Styles
 * Minimal, modern, fully responsive. No external dependencies.
 * Uses CSS custom properties so themes can override easily.
 *
 * @package EEAT_Author_Reviewer
 */

/* ─── CSS Custom Properties ─────────────────────────────────────────────── */
:root {
	--eeat-accent:        #2563eb;
	--eeat-accent-light:  #eff6ff;
	--eeat-reviewer:      #16a34a;
	--eeat-reviewer-light:#f0fdf4;
	--eeat-text:          #1a1a1a;
	--eeat-muted:         #6b7280;
	--eeat-border:        #e5e7eb;
	--eeat-bg:            #ffffff;
	--eeat-radius:        10px;
	--eeat-shadow:        0 1px 4px rgba(0,0,0,.07);
	--eeat-font:          inherit;
}

/* ─── Author Box (inline in post) ───────────────────────────────────────── */
.eeat-author-box {
	display: flex;
	flex-wrap: wrap;
	gap: 0;
	border: 1px solid var(--eeat-border);
	border-radius: var(--eeat-radius);
	background: var(--eeat-bg);
	box-shadow: var(--eeat-shadow);
	margin: 2em 0;
	overflow: hidden;
	font-family: var(--eeat-font);
}

.eeat-person {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	padding: 18px 20px;
	flex: 1 1 220px;
}

.eeat-divider {
	width: 1px;
	background: var(--eeat-border);
	margin: 12px 0;
	flex-shrink: 0;
}

/* Avatar */
.eeat-avatar-link {
	flex-shrink: 0;
	display: block;
	line-height: 0;
}

.eeat-avatar {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid var(--eeat-border);
	display: block;
	transition: border-color 0.15s;
}

.eeat-avatar-link:hover .eeat-avatar,
.eeat-avatar-link:focus .eeat-avatar {
	border-color: var(--eeat-accent);
}

/* Person info */
.eeat-person-info {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.eeat-role-label {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.6px;
	color: var(--eeat-accent);
	line-height: 1;
}

.eeat-role-reviewer {
	color: var(--eeat-reviewer);
}

.eeat-name {
	font-size: 15px;
	font-weight: 700;
	color: var(--eeat-text);
	text-decoration: none;
	line-height: 1.3;
}

.eeat-name:hover,
.eeat-name:focus {
	color: var(--eeat-accent);
	text-decoration: underline;
}

.eeat-expertise {
	font-size: 12px;
	color: var(--eeat-muted);
	line-height: 1.3;
	margin-top: 1px;
}

/* Reviewer highlight */
.eeat-reviewer .eeat-name:hover,
.eeat-reviewer .eeat-name:focus {
	color: var(--eeat-reviewer);
}

/* ─── Profile Page ───────────────────────────────────────────────────────── */
.eeat-profile-page {
	max-width: 780px;
	margin: 2em auto;
	padding: 0 16px;
	font-family: var(--eeat-font);
}

.eeat-profile-header {
	display: flex;
	flex-wrap: wrap;
	gap: 28px;
	align-items: flex-start;
	background: var(--eeat-bg);
	border: 1px solid var(--eeat-border);
	border-radius: var(--eeat-radius);
	padding: 28px;
	box-shadow: var(--eeat-shadow);
	margin-bottom: 32px;
}

.eeat-profile-avatar {
	width: 100px;
	height: 100px;
	border-radius: 50%;
	object-fit: cover;
	border: 3px solid var(--eeat-border);
	flex-shrink: 0;
}

.eeat-profile-meta {
	flex: 1 1 200px;
	min-width: 0;
}

.eeat-profile-name {
	font-size: 24px;
	font-weight: 800;
	color: var(--eeat-text);
	margin: 0 0 6px;
	line-height: 1.2;
}

.eeat-profile-expertise {
	font-size: 13px;
	color: var(--eeat-muted);
	margin: 0 0 10px;
}

.eeat-profile-bio {
	font-size: 14px;
	color: var(--eeat-text);
	line-height: 1.65;
	margin: 0 0 14px;
}

/* Stats */
.eeat-profile-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 14px;
}

.eeat-stat {
	display: inline-flex;
	align-items: center;
	font-size: 12px;
	font-weight: 600;
	color: var(--eeat-accent);
	background: var(--eeat-accent-light);
	padding: 3px 10px;
	border-radius: 20px;
	border: 1px solid #bfdbfe;
}

.eeat-stat-reviewed {
	color: var(--eeat-reviewer);
	background: var(--eeat-reviewer-light);
	border-color: #bbf7d0;
}

/* Social links */
.eeat-social-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.eeat-social-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 500;
	padding: 5px 12px;
	border-radius: 6px;
	text-decoration: none;
	border: 1px solid var(--eeat-border);
	background: var(--eeat-bg);
	color: var(--eeat-muted);
	transition: all 0.15s;
}

.eeat-social-link:hover,
.eeat-social-link:focus {
	border-color: currentColor;
	color: var(--eeat-text);
	background: #f9fafb;
}

.eeat-linkedin { color: #0a66c2; }
.eeat-linkedin:hover { color: #004182; }
.eeat-twitter { color: #1a1a1a; }

/* Posts list */
.eeat-profile-posts {
	background: var(--eeat-bg);
	border: 1px solid var(--eeat-border);
	border-radius: var(--eeat-radius);
	padding: 24px 28px;
	box-shadow: var(--eeat-shadow);
	margin-bottom: 24px;
}

.eeat-posts-heading {
	font-size: 16px;
	font-weight: 700;
	color: var(--eeat-text);
	margin: 0 0 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--eeat-border);
}

.eeat-reviewed-posts .eeat-posts-heading {
	color: var(--eeat-reviewer);
}

.eeat-posts-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.eeat-posts-list li {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 6px;
	padding: 9px 0;
	border-bottom: 1px solid #f3f4f6;
}

.eeat-posts-list li:last-child {
	border-bottom: none;
}

.eeat-posts-list a {
	font-size: 14px;
	color: var(--eeat-text);
	text-decoration: none;
	font-weight: 500;
	flex: 1;
}

.eeat-posts-list a:hover,
.eeat-posts-list a:focus {
	color: var(--eeat-accent);
	text-decoration: underline;
}

.eeat-post-date {
	font-size: 12px;
	color: var(--eeat-muted);
	white-space: nowrap;
	flex-shrink: 0;
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
	.eeat-author-box {
		flex-direction: column;
	}

	.eeat-divider {
		width: auto;
		height: 1px;
		margin: 0 16px;
	}

	.eeat-profile-header {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}

	.eeat-profile-stats,
	.eeat-social-links {
		justify-content: center;
	}

	.eeat-profile-page {
		padding: 0 12px;
	}

	.eeat-profile-posts {
		padding: 18px 16px;
	}

	.eeat-posts-list li {
		flex-direction: column;
		gap: 2px;
	}
}

/* ─── High Contrast / Accessibility ─────────────────────────────────────── */
@media (forced-colors: active) {
	.eeat-avatar,
	.eeat-profile-avatar {
		border-color: ButtonText;
	}
	.eeat-social-link {
		border-color: ButtonText;
	}
}

/* ─── Compact Meta Bar (before_content position) ────────────────────────── */
.eeat-meta-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	padding: 10px 0 14px;
	margin-bottom: 4px;
	border-bottom: 1px solid var(--eeat-border);
	font-size: 13px;
	color: var(--eeat-muted);
	font-family: var(--eeat-font);
}

.eeat-meta-person {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.eeat-meta-avatar-link {
	display: inline-block;
	line-height: 0;
	flex-shrink: 0;
}

.eeat-meta-avatar {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	object-fit: cover;
	border: 1px solid var(--eeat-border);
	display: block;
	transition: border-color 0.15s;
	vertical-align: middle;
}

.eeat-meta-avatar-link:hover .eeat-meta-avatar,
.eeat-meta-avatar-link:focus .eeat-meta-avatar {
	border-color: var(--eeat-accent);
}

.eeat-meta-label {
	font-size: 12px;
	color: var(--eeat-muted);
	font-weight: 500;
}

.eeat-meta-label-reviewer {
	color: var(--eeat-reviewer);
}

.eeat-meta-name {
	font-weight: 600;
	color: var(--eeat-text);
	text-decoration: none;
	font-size: 13px;
}

.eeat-meta-name:hover,
.eeat-meta-name:focus {
	color: var(--eeat-accent);
	text-decoration: underline;
}

.eeat-meta-name-reviewer:hover,
.eeat-meta-name-reviewer:focus {
	color: var(--eeat-reviewer);
}

.eeat-meta-expertise {
	font-size: 11px;
	color: var(--eeat-muted);
	background: var(--eeat-accent-light);
	border: 1px solid #bfdbfe;
	border-radius: 10px;
	padding: 1px 7px;
	white-space: nowrap;
}

.eeat-meta-sep {
	color: var(--eeat-border);
	font-size: 14px;
	user-select: none;
}

.eeat-meta-date {
	font-size: 12px;
	color: var(--eeat-muted);
}

/* ─── Author archive heading ─────────────────────────────────────────────── */
.eeat-archive-heading {
	margin: 24px 0 8px;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--eeat-border);
}

.eeat-archive-heading h2 {
	font-size: 18px;
	font-weight: 700;
	color: var(--eeat-text);
	margin: 0;
}

/* ─── Responsive meta bar ────────────────────────────────────────────────── */
@media (max-width: 480px) {
	.eeat-meta-bar {
		gap: 5px 8px;
		font-size: 12px;
	}

	.eeat-meta-expertise {
		display: none;
	}
}
