.fmgp-pn {
	--fmgp-pn-accent: var(--theme-base-color, #1498b8);
	--fmgp-pn-accent-hover: var(--theme-base-color-hover, #0d718c);
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: stretch;
	min-height: 80px;
	margin: 20px 0 24px;
	background: #fbfcfd;
	border: 1px solid #e8e8e8;
	border-radius: 8px;
	overflow: hidden;
}

.fmgp-pn--bottom {
	margin: 28px 0 12px;
}

.fmgp-pn__side,
.fmgp-pn__meta {
	min-width: 0;
}

.fmgp-pn__side {
	overflow: hidden;
}

.fmgp-pn__item {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
	min-height: 80px;
	height: 100%;
	padding: 10px 16px;
	box-sizing: border-box;
	color: inherit;
	text-decoration: none !important;
	transition: background-color 0.18s ease;
}

.fmgp-pn__item--next {
	justify-content: flex-end;
	text-align: right;
}

.fmgp-pn__item--empty {
	pointer-events: none;
}

.fmgp-pn__item:hover,
.fmgp-pn__item:focus-visible,
.fmgp-pn__all:hover,
.fmgp-pn__all:focus-visible {
	background: #f1f6f8;
}

.fmgp-pn__item:focus-visible,
.fmgp-pn__all:focus-visible {
	outline: 2px solid var(--fmgp-pn-accent);
	outline-offset: -2px;
}

.fmgp-pn__arrow {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 22px;
	width: 22px;
	color: #9aa0a6;
	transition: transform 0.18s ease, color 0.18s ease;
}

.fmgp-pn__item:hover .fmgp-pn__arrow,
.fmgp-pn__item:focus-visible .fmgp-pn__arrow {
	color: var(--fmgp-pn-accent);
}

.fmgp-pn__item--prev:hover .fmgp-pn__arrow,
.fmgp-pn__item--prev:focus-visible .fmgp-pn__arrow {
	transform: translateX(-3px);
}

.fmgp-pn__item--next:hover .fmgp-pn__arrow,
.fmgp-pn__item--next:focus-visible .fmgp-pn__arrow {
	transform: translateX(3px);
}

.fmgp-pn__thumb {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 52px;
	width: 52px;
	height: 52px;
	background: #fff;
	border: 1px solid #efefef;
	border-radius: 6px;
	overflow: hidden;
}

.fmgp-pn__thumb img {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
}

.fmgp-pn__meta {
	display: block;
	overflow: hidden;
}

.fmgp-pn__label {
	display: block;
	margin-bottom: 3px;
	font-size: 11px;
	line-height: 1.2;
	color: #8a8f96;
}

.fmgp-pn__name {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	color: #2c2c2c;
	transition: color 0.18s ease;
}

.fmgp-pn__item:hover .fmgp-pn__name,
.fmgp-pn__item:focus-visible .fmgp-pn__name {
	color: var(--fmgp-pn-accent);
}

.fmgp-pn__all {
	display: flex;
	align-items: center;
	justify-content: center;
	align-self: stretch;
	max-width: 260px;
	padding: 0 18px;
	border-right: 1px solid #ececec;
	border-left: 1px solid #ececec;
	box-sizing: border-box;
	color: var(--fmgp-pn-accent);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1.35;
	text-align: center;
	text-decoration: none !important;
	text-transform: uppercase;
	transition: background-color 0.18s ease, color 0.18s ease;
}

.fmgp-pn__all:hover,
.fmgp-pn__all:focus-visible {
	color: var(--fmgp-pn-accent-hover);
}

.fmgp-pn__all-short {
	display: none;
}

@media (max-width: 991px) {
	.fmgp-pn {
		min-height: 68px;
	}

	.fmgp-pn__item {
		min-height: 68px;
		padding: 8px 12px;
		gap: 10px;
	}

	.fmgp-pn__thumb {
		flex-basis: 44px;
		width: 44px;
		height: 44px;
	}

	.fmgp-pn__name {
		font-size: 13px;
	}

	.fmgp-pn__all {
		max-width: 170px;
		padding: 0 12px;
		font-size: 11px;
	}
}

@media (max-width: 767px) {
	.fmgp-pn {
		min-height: 0;
		margin: 12px 0 16px;
	}

	.fmgp-pn--bottom {
		margin: 16px 0 8px;
	}

	.fmgp-pn__thumb,
	.fmgp-pn__label {
		display: none;
	}

	.fmgp-pn__item {
		min-height: 44px;
		padding: 8px;
		gap: 6px;
	}

	.fmgp-pn__name {
		display: block;
		overflow: hidden;
		font-size: 12px;
		font-weight: 600;
		line-height: 1.25;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.fmgp-pn__all {
		max-width: none;
		padding: 0 8px;
		border-right-color: #f0f0f0;
		border-left-color: #f0f0f0;
		font-size: 11px;
		font-weight: 600;
		letter-spacing: 0;
		text-transform: none;
		white-space: nowrap;
	}

	.fmgp-pn__all-full {
		display: none;
	}

	.fmgp-pn__all-short {
		display: inline;
	}

	.fmgp-pn__arrow {
		flex-basis: 14px;
		width: 14px;
	}
}

@media (max-width: 430px) {
	.fmgp-pn__item {
		padding: 8px 6px;
	}

	.fmgp-pn__name {
		font-size: 11px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.fmgp-pn__item,
	.fmgp-pn__all,
	.fmgp-pn__arrow,
	.fmgp-pn__name {
		transition: none;
	}
}
