/* FXNook Marketplace Tools - screenshots and videos strip on the product page. */

.fxnmc {
	--fxnmc-h: 230px;
	margin: 0 0 26px;
}

.fxnmc-viewport { position: relative; }

.fxnmc-track {
	list-style: none;
	display: flex;
	gap: 14px;
	margin: 0;
	padding: 2px 2px 10px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	overscroll-behavior-x: contain;
	scrollbar-width: thin;
	scrollbar-color: var(--fxn-line-strong, #D5D2CE) transparent;
}
.fxnmc-track::-webkit-scrollbar { height: 6px; }
.fxnmc-track::-webkit-scrollbar-thumb { background: var(--fxn-line-strong, #D5D2CE); border-radius: 6px; }

.fxnmc-item {
	flex: 0 0 auto;
	margin: 0;
	scroll-snap-align: start;
}

.fxnmc-tile {
	position: relative;
	display: block;
	height: var(--fxnmc-h);
	aspect-ratio: 16 / 10;
	max-width: 82vw;
	padding: 0;
	border: 1px solid var(--fxn-line, #E7E5E2);
	border-radius: 12px;
	overflow: hidden;
	background: var(--fxn-surface, #F7F7F4);
	cursor: zoom-in;
	transition: box-shadow .2s, transform .2s, border-color .2s;
}
.fxnmc-tile:hover { border-color: var(--fxn-subtle, #9A9596); box-shadow: 0 8px 22px rgba(35, 31, 32, .12); transform: translateY(-2px); }
.fxnmc-tile:focus-visible { outline: 3px solid rgba(157, 204, 76, .5); outline-offset: 2px; }

.fxnmc-tile img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	margin: 0;
	border-radius: 0;
}

.fxnmc-tile--video { cursor: pointer; background: #000; }
.fxnmc-tile--video img { opacity: .9; }

.fxnmc-play {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 68px;
	height: 48px;
	transform: translate(-50%, -50%);
	filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .35));
	transition: transform .2s;
}
.fxnmc-play svg { width: 100%; height: 100%; display: block; }
.fxnmc-tile--video:hover .fxnmc-play { transform: translate(-50%, -50%) scale(1.08); }

.fxnmc .fxnmc-viewport { position: relative; }

/*
 * The arrows. "all: unset" wipes whatever the theme does to buttons, and it
 * is applied to the plain state ONLY. It used to be on :hover and :focus as
 * well, where it also wiped left/right - so the moment the mouse reached the
 * Next arrow it jumped to the far left, away from the cursor, and could not
 * be clicked. The hover and focus rules below now restate just what the
 * theme might change, and the position is set with the same weight as this
 * rule so nothing can knock it out.
 */
.fxnmc .fxnmc-viewport .fxnmc-nav {
	all: unset;
	position: absolute;
	top: 50%;
	transform: translateY(calc(-50% - 5px));
	z-index: 3;
	box-sizing: border-box;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, .96);
	box-shadow: 0 2px 10px rgba(35, 31, 32, .18), 0 0 0 1px rgba(35, 31, 32, .06);
	cursor: pointer;
	font-size: 0;
	color: transparent;
	transition: background-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.fxnmc .fxnmc-viewport .fxnmc-nav::before {
	content: '';
	position: absolute;
	inset: 0;
	margin: auto;
	width: 18px;
	height: 18px;
	background: var(--fxn-ink, #231F20);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%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='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.fxnmc .fxnmc-viewport .fxnmc-nav--prev::before { transform: scaleX(-1); }
.fxnmc .fxnmc-viewport .fxnmc-nav:hover,
.fxnmc .fxnmc-viewport .fxnmc-nav:focus {
	padding: 0;
	margin: 0;
	border: 0;
	outline: 0;
	color: transparent;
	font-size: 0;
	text-decoration: none;
}
.fxnmc .fxnmc-viewport .fxnmc-nav:hover { background-color: #fff; box-shadow: 0 4px 14px rgba(35, 31, 32, .22), 0 0 0 1px rgba(35, 31, 32, .08); transform: translateY(calc(-50% - 5px)) scale(1.06); }
.fxnmc .fxnmc-viewport .fxnmc-nav:hover::before { background: var(--fxn-green-deep, #4A7515); }
.fxnmc .fxnmc-viewport .fxnmc-nav:focus-visible { box-shadow: 0 0 0 3px rgba(74, 117, 21, .35); }
.fxnmc .fxnmc-viewport .fxnmc-nav--prev { left: 6px; right: auto; }
.fxnmc .fxnmc-viewport .fxnmc-nav--next { right: 6px; left: auto; }
.fxnmc .fxnmc-nav[hidden] { display: none !important; }

/* ---------- lightbox ---------- */

.fxnmc-box {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 56px 64px;
	background: rgba(8, 14, 24, .92);
}
.fxnmc-box[hidden] { display: none !important; }

.fxnmc-box__stage {
	position: relative;
	width: 100%;
	max-width: 1200px;
	max-height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.fxnmc-box__stage img {
	max-width: 100%;
	max-height: calc(100vh - 112px);
	border-radius: 8px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}

.fxnmc-box__video {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	max-height: calc(100vh - 112px);
}
.fxnmc-box__video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 8px; }

.fxnmc-box .fxnmc-box__btn,
.fxnmc-box .fxnmc-box__btn:hover,
.fxnmc-box .fxnmc-box__btn:focus {
	all: unset;
	position: fixed;
	z-index: 2;
	box-sizing: border-box;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background-color: rgba(255, 255, 255, .14);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	box-shadow: 0 0 0 1px rgba(255, 255, 255, .18);
	cursor: pointer;
	font-size: 0;
	color: transparent;
	transition: background-color .15s ease, transform .15s ease;
}
.fxnmc-box .fxnmc-box__btn::before {
	content: '';
	position: absolute;
	inset: 0;
	margin: auto;
	width: 22px;
	height: 22px;
	background: #fff;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%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='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.fxnmc-box .fxnmc-box__prev::before { transform: scaleX(-1); }
.fxnmc-box .fxnmc-box__close::before {
	width: 20px;
	height: 20px;
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E");
}
.fxnmc-box .fxnmc-box__btn:hover { background-color: rgba(255, 255, 255, .28); transform: scale(1.06); }
.fxnmc-box .fxnmc-box__btn:focus-visible { box-shadow: 0 0 0 3px rgba(255, 255, 255, .5); }
.fxnmc-box .fxnmc-box__close { top: 16px; right: 18px; }
.fxnmc-box .fxnmc-box__prev  { left: 18px; top: 50%; margin-top: -24px; }
.fxnmc-box .fxnmc-box__next  { right: 18px; top: 50%; margin-top: -24px; }

.fxnmc-box__count {
	position: fixed;
	left: 50%;
	bottom: 16px;
	transform: translateX(-50%);
	padding: 5px 12px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .12);
	color: rgba(255, 255, 255, .9);
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: .02em;
}

@media (max-width: 768px) {
	.fxnmc { --fxnmc-h: 190px; }
	.fxnmc-nav { display: none !important; }
	.fxnmc-box { padding: 56px 10px; }
	.fxnmc-box .fxnmc-box__prev,
	.fxnmc-box .fxnmc-box__next { top: auto; bottom: 14px; margin: 0; }
	.fxnmc-box .fxnmc-box__prev { left: calc(50% - 64px); }
	.fxnmc-box .fxnmc-box__next { right: calc(50% - 64px); }
	.fxnmc-box__count { bottom: 30px; }
}
