/*
 * Post Navigator for Elementor - front-end styles.
 * Colors/sizes set via widget Style controls are injected by Elementor
 * itself as inline CSS scoped to {{WRAPPER}} - this file only handles
 * structural layout, the responsive pinning, and the transition overlay.
 */

/* ---------- Desktop / default layout ---------- */
.pnfe-navigator {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 20px;
	width: 100%;
}

.pnfe-card {
	display: flex;
	align-items: center;
	gap: 14px;
	text-decoration: none;
	border-radius: 6px;
	overflow: hidden;
	padding: 10px;
	transition: transform .25s ease, box-shadow .25s ease;
}
.pnfe-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.pnfe-card-next {
	flex-direction: row-reverse;
	text-align: right;
}
.pnfe-card-empty {
	visibility: hidden;
	pointer-events: none;
}

.pnfe-card-image {
	position: relative;
	flex: 0 0 84px;
	width: 84px;
	height: 84px;
	border-radius: 4px;
	overflow: hidden;
	display: block;
}
.pnfe-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.pnfe-card-image::after {
	content: "";
	position: absolute;
	inset: 0;
	background: #000;
	opacity: 0;
	transition: opacity .25s ease;
}

.pnfe-card-text {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}
.pnfe-card-label {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}
.pnfe-card-title {
	font-size: 16px;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
}

.pnfe-back-btn {
	flex: 0 0 auto;
	border: none;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	cursor: pointer;
	width: 56px;
	height: 56px;
	padding: 0 12px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
	transition: background-color .25s ease, transform .2s ease;
}
.pnfe-back-btn:hover {
	transform: scale(1.05);
}
.pnfe-back-icon i,
.pnfe-back-icon svg {
	width: 20px;
	height: 20px;
	font-size: 20px;
	fill: currentColor;
	color: inherit;
}
.pnfe-back-text {
	font-size: 13px;
	white-space: nowrap;
}

/* ---------- Page transition overlay ---------- */
.pnfe-transition-overlay {
	position: fixed;
	inset: 0;
	background: #0d0d0d;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	z-index: 999999;
	transition: opacity var(--pnfe-transition-duration, 450ms) ease;
}
.pnfe-transition-overlay.pnfe-active {
	opacity: 1;
	visibility: visible;
}

/* ---------- Mobile: back button pinned to top ---------- */
@media (max-width: 768px) {
	.pnfe-mobile-top-back .pnfe-back-btn {
		position: fixed;
		top: 14px;
		left: 50%;
		transform: translateX(-50%);
		z-index: 99998;
	}
	.pnfe-mobile-top-back .pnfe-back-btn:hover {
		transform: translateX(-50%) scale(1.05);
	}

	.pnfe-mobile-bottom-bar {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 99998;
		background: rgba(0, 0, 0, 0.85);
		backdrop-filter: blur(6px);
		padding: 8px 10px;
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 8px;
	}
	.pnfe-mobile-bottom-bar .pnfe-back-btn {
		position: fixed;
		top: 14px;
		left: 50%;
		transform: translateX(-50%);
	}
	.pnfe-mobile-bottom-bar .pnfe-card {
		padding: 6px;
	}
	.pnfe-mobile-bottom-bar .pnfe-card-image {
		flex: 0 0 40px;
		width: 40px;
		height: 40px;
	}
	.pnfe-mobile-bottom-bar .pnfe-card-title {
		font-size: 13px;
	}
	.pnfe-mobile-bottom-bar .pnfe-card-label {
		font-size: 10px;
	}

	/* When top-back is off but bottom-bar is on, reserve space at the
	   bottom of the viewport so content isn't hidden behind the bar. */
	.pnfe-mobile-bottom-bar {
		padding-bottom: max(8px, env(safe-area-inset-bottom));
	}
}
