/*
 * aiandblog site extras (draft theme, Nov 24 2026): spacing fixes and the named
 * reviewer box. Loaded on every page after newsdesk.css.
 */

/* ---------- Spacing: keep pagination and the sidebar off the footer ---------- */

body.archive .wp-site-blocks > main,
body.search .wp-site-blocks > main,
body.blog .wp-site-blocks > main {
	padding-bottom: clamp(3rem, 6vw, 4.5rem) !important;
}

.wp-block-query-pagination {
	margin-top: clamp(1.75rem, 3vw, 2.5rem);
}

/* ---------- Named reviewer box (under the author box on single posts) ---------- */

.ab-reviewer-box {
	margin: 1.25rem 0 0;
	padding: 1.25rem 1.35rem;
	border: 1px solid var(--wp--preset--color--line, #e2e6ed);
	border-radius: 16px;
	background: var(--wp--preset--color--fog, #f3f5f8);
}

.ab-reviewer-row {
	display: flex;
	gap: 1rem;
	align-items: flex-start;
}

.ab-reviewer-badge {
	flex: 0 0 72px;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--wp--preset--color--indigo, #4b4ded);
	color: #ffffff;
	font-family: var(--wp--preset--font-family--heading, inherit);
	font-weight: 700;
	font-size: 1.45rem;
	letter-spacing: 0.02em;
}

.ab-reviewer-main {
	min-width: 0;
}

.ab-reviewer-kicker {
	margin: 0 0 0.15rem;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--indigo, #4b4ded);
}

.ab-reviewer-name {
	margin: 0 0 0.45rem;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.2rem 0.6rem;
}

.ab-reviewer-name a {
	font-weight: 700;
	font-size: 1.05rem;
	color: var(--wp--preset--color--graphite, #12151b);
	text-decoration: none;
}

.ab-reviewer-name a:hover {
	color: var(--wp--preset--color--indigo, #4b4ded);
}

.ab-reviewer-name span {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--wp--preset--color--steel, #5f6a7d);
}

.ab-reviewer-bio {
	margin: 0 0 0.55rem;
	font-size: 0.92rem;
	line-height: 1.6;
	color: var(--wp--preset--color--steel, #5f6a7d);
}

.ab-reviewer-meta {
	margin: 0 0 0.55rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.2rem 0.5rem;
	font-size: 0.8rem;
	color: var(--wp--preset--color--steel, #5f6a7d);
}

.ab-reviewer-links {
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.25rem;
	font-size: 0.86rem;
	font-weight: 600;
}

.ab-reviewer-links a {
	color: var(--wp--preset--color--indigo, #4b4ded);
}

.ab-reviewer-demo {
	margin: 0 0 0.85rem;
	padding: 0.5rem 0.75rem;
	border-radius: 8px;
	background: #fff7e6;
	color: #7a4b00;
	font-size: 0.8rem;
	font-weight: 600;
}

@media (max-width: 600px) {
	.ab-reviewer-box {
		padding: 1rem;
	}

	.ab-reviewer-badge {
		flex-basis: 52px;
		width: 52px;
		height: 52px;
		font-size: 1.1rem;
	}
}

[data-theme="dark"] .ab-reviewer-box {
	background: #161a21;
	border-color: #2b313c;
}

[data-theme="dark"] .ab-reviewer-name a {
	color: #e8ebf1;
}

[data-theme="dark"] .ab-reviewer-bio,
[data-theme="dark"] .ab-reviewer-meta,
[data-theme="dark"] .ab-reviewer-name span {
	color: #a3acbb;
}

[data-theme="dark"] .ab-reviewer-kicker,
[data-theme="dark"] .ab-reviewer-links a {
	color: #8f90ff;
}

/* ---------- "Written by" badge above the author name (Nov 27 2026, draft) ---------- */

.ab-author-box .ab-author-id {
	min-width: 0;
}

.ab-author-box .ab-written-by {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	margin: 0 0 0.4rem;
	padding: 0.2rem 0.7rem 0.2rem 0.6rem;
	border-radius: 999px;
	background: rgba(75, 77, 237, 0.1);
	color: var(--wp--preset--color--indigo-deep, #3536c9);
	font-size: 0.6875rem;
	font-weight: 700;
	line-height: 1.5;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.ab-author-box .ab-written-by::before {
	content: "";
	flex: 0 0 auto;
	width: 0.8rem;
	height: 0.8rem;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 3a2.85 2.85 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 3a2.85 2.85 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.ab-author-box .ab-author-id > .wp-block-post-author-name {
	margin-block-start: 0;
}

[data-theme="dark"] .ab-author-box .ab-written-by {
	background: rgba(139, 141, 255, 0.16);
	color: #a9aaff;
}
