/*
 * PhoneDosty Simple Author Box — styles
 * All rules are scoped under .pdsab-* classes only. No global element
 * selectors (body, h1-h6, p, a, img) are touched, so the plugin never
 * fights with the active theme.
 */

.pdsab-author-box {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 12px;
	margin: 24px 0;
	padding: 20px;
	max-width: 100%;
	overflow-wrap: break-word;
	word-break: break-word;
}

.pdsab-author-box * {
	box-sizing: border-box;
}

.pdsab-author-avatar-wrap {
	flex-shrink: 0;
}

.pdsab-author-avatar-link {
	display: inline-block;
}

.pdsab-author-avatar {
	display: block;
	width: 80px;
	height: 80px;
	max-width: 100%;
	border-radius: 50%;
	/* "contain" (not "cover") on purpose: it never crops any part of
	 * the source photo, so the whole face always stays visible even
	 * when the uploaded image isn't perfectly square. Any leftover
	 * space inside the circle is filled with a neutral tint instead
	 * of showing through as a transparent gap. */
	object-fit: contain;
	background: rgba(0, 0, 0, 0.04);
}

.pdsab-author-content {
	min-width: 0;
	width: 100%;
}

.pdsab-author-heading {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: center;
	gap: 8px;
	margin-bottom: 6px;
}

.pdsab-author-name {
	min-width: 0;
	max-width: 100%;
	font-size: 1.05em;
	font-weight: 700;
	text-decoration: none;
	/* Clean, professional blue for the author name only — nothing
	 * else in the box (bio, role, borders, backgrounds) uses this
	 * color. */
	color: #2563eb;
}

a.pdsab-author-name:hover,
a.pdsab-author-name:focus {
	color: #1d4ed8;
	text-decoration: underline;
}

a.pdsab-author-name:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.pdsab-author-role {
	min-width: 0;
	max-width: 100%;
	font-size: 0.85em;
	opacity: 0.7;
}

.pdsab-author-bio {
	/* The header (photo + name) is centered; body copy stays
	 * left-aligned underneath it, since centered paragraph text of
	 * any real length is harder to read. */
	text-align: left;
	font-size: 0.95em;
	line-height: 1.55;
}

.pdsab-author-bio p:first-child {
	margin-top: 0;
}

.pdsab-author-bio p:last-child {
	margin-bottom: 0;
}

.pdsab-author-socials {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin: 10px 0 0;
	padding: 0;
	list-style: none;
}

.pdsab-social-item {
	margin: 0;
	padding: 0;
}

.pdsab-social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	color: inherit;
	text-decoration: none;
	opacity: 0.8;
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.pdsab-social-link:hover,
.pdsab-social-link:focus {
	opacity: 1;
	transform: translateY(-1px);
}

.pdsab-social-link:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.pdsab-social-link svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
}

/* ------------------------------------------------------------------
 * Layout note: the box is intentionally centered (photo on top,
 * name/bio below) at every screen size — mobile and desktop alike.
 * There is no separate desktop "row" layout, since a centered photo
 * is a specific, explicit design requirement here, not just a
 * small-screen fallback.
 * ---------------------------------------------------------------- */

/* ------------------------------------------------------------------
 * Style 1 — Clean: simple editorial border + generous spacing.
 * ---------------------------------------------------------------- */
.pdsab-style-clean {
	border-top: 1px solid rgba(0, 0, 0, 0.12);
	border-bottom: 1px solid rgba(0, 0, 0, 0.12);
	padding: 24px 4px;
}

.pdsab-style-clean .pdsab-author-avatar {
	width: 88px;
	height: 88px;
}

/* ------------------------------------------------------------------
 * Style 2 — Minimal: compact, no border, tighter spacing.
 * ---------------------------------------------------------------- */
.pdsab-style-minimal {
	padding: 10px 0;
	gap: 10px;
}

.pdsab-style-minimal .pdsab-author-avatar {
	width: 48px;
	height: 48px;
}

.pdsab-style-minimal .pdsab-author-bio {
	font-size: 0.88em;
}

.pdsab-style-minimal .pdsab-author-socials {
	margin-top: 6px;
}

.pdsab-style-minimal .pdsab-social-link {
	width: 26px;
	height: 26px;
}

.pdsab-style-minimal .pdsab-social-link svg {
	width: 14px;
	height: 14px;
}

/* ------------------------------------------------------------------
 * Style 3 — Modern: card appearance with rounded corners + shadow.
 * ---------------------------------------------------------------- */
.pdsab-style-modern {
	border-radius: 16px;
	background: rgba(0, 0, 0, 0.03);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
	padding: 22px;
}

.pdsab-style-modern .pdsab-author-avatar {
	width: 84px;
	height: 84px;
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.8);
}

.pdsab-style-modern .pdsab-social-link {
	background: rgba(0, 0, 0, 0.06);
}

.pdsab-style-modern .pdsab-social-link:hover,
.pdsab-style-modern .pdsab-social-link:focus {
	background: rgba(0, 0, 0, 0.1);
}

/* ------------------------------------------------------------------
 * Admin settings page layout (loaded only on the plugin's own
 * settings screen — see class-admin.php).
 * ---------------------------------------------------------------- */
.pdsab-settings-layout {
	display: flex;
	flex-wrap: wrap;
	gap: 32px;
	margin-top: 16px;
}

.pdsab-settings-form {
	flex: 1 1 520px;
	min-width: 0;
}

.pdsab-settings-preview {
	flex: 1 1 320px;
	min-width: 280px;
	max-width: 420px;
}

.pdsab-preview-frame {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	padding: 4px 16px;
}
