@use "../../abstracts/mixins";

.author-box {
	width: 100%;
	margin: var(--author-box-margin, var(--spacing-xl) auto);
	padding: var(--author-box-padding, var(--spacing-xl));
	color: var(--author-box-color, unset);
	text-align: var(--author-box-text-align, center);
	background: var(--author-box-background, unset);
	border: var(--author-box-border, var(--border));
	border-radius: var(--author-box-border-radius, var(--border-radius));
	box-shadow: var(--author-box-shadow, var(--shadow));

	.avatar {
		margin: var(--author-box-avatar-margin, 0 auto var(--spacing-md));
		margin-bottom: var(--spacing-md);
	}

	@include mixins.mq(sm) {
		--author-box-text-align: start;
		--author-box-avatar-margin: 0;

		display: grid;
		grid-column-gap: var(--author-box-grid-column-gap, var(--spacing-lg));
		grid-template-rows: auto;
		grid-template-columns: auto 1fr;

		.avatar {
			grid-row: 1/all;
		}

		> *:not(.avatar) {
			grid-column-start: 2;
		}
	}
}

.author-box-title {
	margin-top: 0;
}

.author-box-content {
	margin-bottom: var(--author-box-content-margin-bottom, var(--spacing-md));

	&:last-child {
		--author-box-content-margin-bottom: 0;
	}

	p:last-child {
		margin-bottom: 0;
	}
}
