/* GSSMG Trustindex Review Enhancer — engine styles.
   Slider/grid layout is enforced inline by the engine (immune to TI CSS); the
   rules here style the manual review-photo gallery, the per-card mini-slider,
   the shared lightbox, and the grid show-N controls. */
.ti-enhance { position: relative; }

/* ---- Per-card gallery (injected outside .ti-review-content) ---- */
.ti-enhance .tire-gallery {
	position: relative;
	margin: 10px 0 4px;
	max-width: 100%;
}
.ti-enhance .tire-gallery-img {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
	border-radius: 6px;
}
.ti-enhance .tire-gallery-img.is-clickable {
	cursor: zoom-in;
}
/* Slide change: the photo fades out, is exchanged while invisible, then fades
   back in — so a differently proportioned photo resizes the box unseen. The
   fade-in is slower than the fade-out so the new frame reads as the arrival. */
.ti-enhance .tire-gallery-img,
.tire-lightbox .tire-lb-img {
	opacity: 1;
	transition: opacity 0.22s ease;
}
.ti-enhance .tire-gallery-img.is-tire-fading,
.tire-lightbox .tire-lb-img.is-tire-fading {
	opacity: 0;
	transition-duration: 0.16s;
}
@media (prefers-reduced-motion: reduce) {
	.ti-enhance .tire-gallery-img,
	.tire-lightbox .tire-lb-img {
		transition: none;
	}
}
.ti-enhance .tire-gallery-viewport {
	overflow: hidden;
	border-radius: 6px;
	/* Neutral bed behind the photo so the dip mid-fade reads as part of the
	   frame rather than as the card background flashing through. */
	background: rgba(0, 0, 0, 0.04);
}

/* Mini-slider prev/next */
.ti-enhance .tire-gallery-btn {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 30px;
	height: 30px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.5);
	color: #fff;
	font-size: 18px;
	line-height: 30px;
	cursor: pointer;
	z-index: 2;
}
.ti-enhance .tire-gallery-prev { left: 6px; }
.ti-enhance .tire-gallery-next { right: 6px; }
.ti-enhance .tire-gallery-btn:hover { background: rgba(0, 0, 0, 0.75); }

/* Mini-slider dots */
.ti-enhance .tire-gallery-dots {
	display: flex;
	justify-content: center;
	gap: 6px;
	margin-top: 8px;
	flex-wrap: wrap;
}
.ti-enhance .tire-gallery-dot {
	width: 8px;
	height: 8px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.25);
	cursor: pointer;
	transition: background 0.2s, transform 0.2s;
}
.ti-enhance .tire-gallery-dot.is-active {
	background: rgba(0, 0, 0, 0.7);
	transform: scale(1.3);
}

/* ---- Shared lightbox overlay ---- */
.tire-lightbox {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(0, 0, 0, 0.85);
	align-items: center;
	justify-content: center;
}
.tire-lightbox.is-open {
	display: flex;
}
.tire-lightbox .tire-lb-img {
	max-width: 92vw;
	max-height: 88vh;
	width: auto;
	height: auto;
	border-radius: 4px;
	box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}
.tire-lightbox .tire-lb-btn {
	position: absolute;
	border: none;
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	cursor: pointer;
	line-height: 1;
}
.tire-lightbox .tire-lb-close {
	top: 16px;
	right: 20px;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	font-size: 26px;
}
.tire-lightbox .tire-lb-prev,
.tire-lightbox .tire-lb-next {
	top: 50%;
	transform: translateY(-50%);
	width: 48px;
	height: 64px;
	border-radius: 6px;
	font-size: 34px;
}
.tire-lightbox .tire-lb-prev { left: 16px; }
.tire-lightbox .tire-lb-next { right: 16px; }
.tire-lightbox .tire-lb-btn:hover {
	background: rgba(255, 255, 255, 0.3);
}

/* ---- Grid show-N (expand/collapse) ---- */
.ti-enhance .is-tire-hidden {
	display: none !important;
}
.ti-enhance .tire-showmore {
	display: flex;
	justify-content: center;
	margin: 16px 0 4px;
}
.tire-expand-btn,
.tire-collapse-btn {
	appearance: none;
	cursor: pointer;
	padding: 8px 18px;
	border: 1px solid currentColor;
	border-radius: 4px;
	background: transparent;
	font: inherit;
	line-height: 1.2;
}
