/*
 * NativeSwiperGallery — SwiperGallery's look on NativeSwiper: its gallery-swiper.css under the `nativeswiper-` names, and
 * Swiper 12's navigation arrows (swiper/modules/navigation.css, MIT). The skin's rules stay at two classes, so a page's
 * own nested sizes win whichever stylesheet loads last (a gallery that loads on a click loads last).
 */
.nativeswiper-gallery-root {
	position: relative;
}

/*
 * Each rail fills its pane. The clip also keeps NativeSwiper's 30 px shadow band (a negative block margin on the
 * wrapper) inside: without it that margin collapses through to the root and lifts the gallery, arrows included, by 30 px.
 */
.nativeswiper-gallery-root .nativeswiper-container {
	height: 100%;
	overflow: hidden;
}

/* SwiperGallery had no grab cursor. */
.nativeswiper-gallery-root .nativeswiper-wrapper,
.nativeswiper-gallery-root .nativeswiper-wrapper.dragging {
	box-sizing: content-box;
	height: 100%;
	cursor: auto;
}

/* A photo sits on an element of its own inside its slide: `loop` moves the slide itself (flex `order`). */
.nativeswiper-gallery-photo,
.nativeswiper-gallery-thumb {
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: center;
}

/* A thumbnail is a quarter of the strip wide, and shows its photo on a click. */
.nativeswiper-gallery-thumbs .nativeswiper-slide {
	width: var(--nativeswiper-gallery-thumb-width, 25%) !important;
	flex: 0 0 auto;
}

.nativeswiper-gallery-thumb {
	cursor: pointer;
}

/*
 * Swiper's arrows: a 44 px box at the middle of the gallery, 4 px in from its side, the chevron filling it. One class, so
 * the carousel's `button.nativeswiper-button-lock` hides them when every photo fits.
 */
.nativeswiper-button-prev,
.nativeswiper-button-next {
	position: absolute;
	top: 50%;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: -22px 0 0;
	padding: 0;
	border: 0;
	background: none;
	color: var(--nativeswiper-navigation-color, #007aff);
	cursor: pointer;
	appearance: none;
}

.nativeswiper-button-prev {
	left: 4px;
}

.nativeswiper-button-next {
	right: 4px;
}

.nativeswiper-navigation-icon {
	width: 100%;
	height: 100%;
	object-fit: contain;
	transform-origin: center;
	fill: currentColor;
	pointer-events: none;
}

.nativeswiper-button-prev .nativeswiper-navigation-icon {
	transform: rotate(180deg);
}

/* `skin="mobile"` — 300 px, the photos 80 % of it and the thumbnails the rest, white arrows. */
.nativeswiper-gallery-root.nativeswiper-gallery-skin-mobile {
	width: 100%;
	height: 300px;
	margin-left: auto;
	margin-right: auto;
}

.nativeswiper-gallery-skin-mobile .nativeswiper-gallery-top {
	width: 100%;
	height: 80%;
}

.nativeswiper-gallery-skin-mobile .nativeswiper-gallery-thumbs {
	height: 20%;
	box-sizing: border-box;
	padding: 0 0 10px;
	margin-top: 5px;
}

.nativeswiper-gallery-skin-mobile .nativeswiper-gallery-thumb {
	opacity: 0.4;
}

.nativeswiper-gallery-skin-mobile .nativeswiper-gallery-thumb-active {
	opacity: 1;
}

.nativeswiper-gallery-skin-mobile .nativeswiper-button-prev,
.nativeswiper-gallery-skin-mobile .nativeswiper-button-next {
	color: #fff;
	margin-top: -40px;
}
