/**
 * Newspaper CoAuthors front-end styles.
 *
 * Colors are exposed as custom properties so themes can override them
 * without touching this file, e.g.:
 *   .np-header-authors { --npca-border: #000; }
 */

.np-header-authors,
.np-bio-box {
	--npca-border: #e5e5e5;
	--npca-divider: #ddd;
	--npca-muted: #666;
	--npca-byline-color: inherit;
	--npca-header-avatar: 60px;
	--npca-bio-avatar: 120px;
	--npca-bio-name-size: 24px;
	--npca-bio-text-size: 16px;
}

/* Header cards */
.np-header-authors {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	margin: 15px 0;
}

.np-header-author {
	display: flex;
	align-items: center;
	gap: 12px;
	padding-right: 20px;
	border-right: 1px solid var(--npca-divider);
}

.np-header-author:last-child {
	padding-right: 0;
	border-right: none;
}

.np-header-author > img,
.np-header-author > picture {
	flex: 0 0 auto;
}

.np-header-authors .np-header-author img {
	width: var(--npca-header-avatar) !important;
	height: var(--npca-header-avatar) !important;
	max-width: var(--npca-header-avatar) !important;
	min-width: 0 !important;
	border-radius: 50%;
	flex: 0 0 auto;
	object-fit: cover;
	display: block;
}

.np-by {
	color: var(--npca-byline-color);
}

.np-by a,
.np-bio-name a {
	color: inherit;
	text-decoration: none;
}

.np-by a:hover,
.np-by a:focus,
.np-bio-name a:hover,
.np-bio-name a:focus {
	text-decoration: underline;
}

/* Text-only byline (no avatar) — newspaper style: bold, uppercase. */
.np-header-authors.is-text-only {
	gap: 0;
	align-items: center;
	--npca-divider-gap: 16px;
}

.np-header-authors.is-text-only .np-header-author {
	gap: 0;
	padding: 0;
	border: 0;
	align-items: center;
}

.np-header-authors.is-text-only .np-by {
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

/*
 * Leading divider: a vertical line BEFORE each author. Before the first author
 * it separates the byline from preceding meta (e.g. "Published on …"); between
 * authors it separates each name. Any trailing divider after the last author
 * comes from the theme's own meta row.
 */
.np-header-authors.is-text-only.np-has-divider .np-header-author {
	border-left: 1px solid var(--npca-divider);
	margin-left: var(--npca-divider-gap);
	padding: 5px 0 5px var(--npca-divider-gap);
}

.np-role,
.np-bio-role {
	color: var(--npca-muted);
}

/* Bio boxes */
.np-bio-box {
	display: flex;
	gap: 25px;
	padding: 30px 0;
	border-top: 1px solid var(--npca-border);
}

.np-bio-avatar {
	flex: 0 0 auto;
	width: var(--npca-bio-avatar);
}

.np-bio-box .np-bio-avatar img {
	width: var(--npca-bio-avatar) !important;
	height: var(--npca-bio-avatar) !important;
	max-width: var(--npca-bio-avatar) !important;
	min-width: 0 !important;
	border-radius: 50%;
	object-fit: cover;
	display: block;
}

.np-bio-box .np-bio-name {
	margin: 0 0 10px;
	font-size: var(--npca-bio-name-size) !important;
	line-height: 1.2;
	font-weight: 700;
	text-transform: uppercase;
}

.np-bio-box .np-bio-text {
	line-height: 1.7;
}

.np-bio-box .np-bio-text,
.np-bio-box .np-bio-text p {
	font-size: var(--npca-bio-text-size) !important;
}

.np-bio-text p:last-child {
	margin-bottom: 0;
}

@media (max-width: 767px) {
	.np-bio-box {
		flex-direction: column;
	}
}

/*
 * Mobile header: on narrow screens the byline drops below the date, so stack
 * authors vertically, flush-left, and drop the vertical dividers (a stray
 * vertical line at the start of a wrapped line looks broken). Separation here
 * comes from stacking and the theme's own horizontal rule.
 */
@media (max-width: 600px) {
	.np-header-authors {
		flex-direction: column;
		align-items: flex-start;
	}

	.np-header-author {
		padding-right: 0;
		border-right: none;
	}

	.np-header-authors.is-text-only {
		gap: 6px;
	}

	.np-header-authors.is-text-only.np-has-divider .np-header-author {
		border-left: 0;
		margin-left: 0;
		padding: 0;
	}
}

