@charset 'utf-8';
@use '../global' as *;

/* Post navigation
---------------------------------------------*/
.post-nav {
	font-size: var(--font-size--sm);
	@include mq('md', '>=') {
		font-size: var(--font-size);
	}
	&__inner {
		display: flex;
		flex-direction: column;
		gap: 1em;
		@include mq('md', '>=') {
			flex-direction: row;
			justify-content: space-between;
			align-items: center;
			gap: 1em;
		}
	}
	&__item {
		width: 100%;
		overflow: hidden;

		@include mq('md', '>=') {
			width: 50%;
		}
	}
	&__link {
		transition: none;
		display: flex;
		column-gap: .5em;
		align-items: center;
		color: var(--ap-color-text);
		&:hover {
			color: color-mix(in srgb, var(--ap-color-text) 100%, #fff 40%);
		}
	}
	&__icon {
		display: inline-flex;
		transition: var(--transition);
	}
	&__figure {
		flex-shrink: 0;
		aspect-ratio: var(--post-nav-image-ratio, 1.618/1);
		max-width: 95px;
		@include mq('sm', '>=') {
			max-width: 120px;
		}
	}
	&__image {
		object-fit: cover;
		width: 100%;
		height: 100%;
	}
	&__title {
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		margin: 0;
	}
}

.post-nav__item--next {
	.post-nav__title {
		margin-inline-start: auto;
	}
}
