:focus,
button:focus {
	box-shadow: 0 0 0 1px hsl(195, 100%, 50%), 0 0 0 4px hsl(195, 53%, 79%);
}

button::-moz-focus-inner {
	border: none;
	padding: 0;
}

button:-moz-focusring {
	outline: none !important;
}

/* Carousels */

.carousel {
	position: relative;
}

.carousel._initialized {}

.carousel__track {
	display: flex;
	overflow: hidden;
	overflow-behavior: contain;
	-webkit-overflow-scrolling: touch;
	overflow-scrolling: touch;
	-ms-overflow-style: none; /* IE */
	overflow-x: auto;
	overscroll-behavior-x: none; /* contain */
	scroll-behavior: smooth;
	-ms-scroll-chaining: none;
	/*-ms-scroll-snap-type: x mandatory;*/
	/*-webkit-scroll-snap-type: x mandatory;*/
	scroll-snap-type: x proximity;
	scrollbar-width: none; /* FF */
}

.carousel__track::-webkit-scrollbar {
	display: none;
}

.scroll__track._grabbing,
.carousel__track._grabbing {
	cursor: -moz-grab;
	cursor: -webkit-grab;
	cursor: grab;
	user-select: none;
}

.scroll__track._grabbing::before,
.carousel__track._grabbing::before {
	bottom: 0;
	content: "";
	display: block;
	left: 0;
	position: absolute;
	right: 0;
	top: 0;
	z-index: 999;
}

.carousel._mandatory .carousel__track {
	scroll-snap-type: x mandatory;
}

/* Buttons */

.carousel::before,
.carousel::after {
	background: #fff;
	bottom: 0;
	content: "";
	display: block;
	height: auto;
	opacity: 0;
	position: absolute;
	top: 0;
	transition: ease 0.2s;
	transition-property: visibility, opacity;
	visibility: hidden;
	width: 20px;
	z-index: 1;
}

.carousel::before {
	background: radial-gradient(ellipse at -30% 50%, rgba(0, 0, 0, 0.3), rgba(97, 97, 97, 0) 72%);
	left: 0;
}

.carousel::after {
	background: radial-gradient(ellipse at 70% 50%, rgba(0, 0, 0, 0.3), rgba(97, 97, 97, 0) 72%);
	right: 0;
}

.carousel._initialized._next-visible::after,
.carousel._initialized._prev-visible::before {
	opacity: 1;
	visibility: visible;
}

.carousel__ctrl {
	background-color: #fff;
	border: none;
	border-radius: 100%;
	box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
	height: 40px;
	margin-top: -20px;
	position: absolute;
	text-align: center;
	top: 50%;
	user-select: none;
	width: 40px;
	z-index: 2;
}

.carousel__ctrl[disabled] {
	color: grey;
}

.carousel__ctrl._prev {
	left: -20px;
}

.carousel__ctrl._next {
	right: -20px;
}

.carousel svg {
	display: inline!important;
}

/* pagination */

.pagination {
	margin: 5px;
	text-align: center;
}

.page {
	display: inline-block;
	background-color: lightgrey;
	border: none;
	border-radius: 10px;
	cursor: pointer;
	height: 6px;
	margin: 3px;
	padding: 0;
	transition: background-color ease 0.4s;
	width: 6px;
}

.page._current {
	background-color: black;
}

/* content and variations */

.box {
	align-items: center;
	display: flex;
	justify-content: center;
	min-height: 200px;
	scroll-snap-align: center;
}

.box._no-snap {
	scroll-snap-align: none;
}

.box._single {
	max-width: 100%;
	min-width: 100%;
}

.box._third {
	max-width: 33.333333%;
	min-width: 33.333333%;
}

.box._fours {
	max-width: 25%;
	min-width: 25%;
}

.box._half {
	max-width: 50%;
	min-width: 50%;
}

.box._half-next { /* classical visual hint about upon scroll */
	max-width: 28.57%;
	min-width: 28.57%;
}

.box:nth-child(1) {
	background: #eee;
}

.box:nth-child(2) {
	background: #8bc34a;
}

.box:nth-child(3) {
	background: #cddc39;
}

.box:nth-child(4) {
	background: #ffeb3b;
}

.box:nth-child(5) {
	background: #ffc107;
}

.box:nth-child(6) {
	background: #ff9800;
}

.box:nth-child(7) {
	background: #c8bafe;
}

.box:nth-child(8) {
	background: #9980ff;
}

.box:nth-child(9) {
	background: #7b5cfd;
}

/* Vertical carousel */

.scroll {
	padding: 1px 10px;
	position: relative;
}

.scroll::before,
.scroll::after {
	background-color: #666;
	content: "";
	height: 1px;
	left: 50%;
	opacity: 0;
	position: absolute;
	transition: ease 0.3s;
	transition-property: width, left, opacity;
	width: 0;
	z-index: 1;
}

.scroll._initialized._prev-visible::before,
.scroll._initialized._next-visible::after {
	left: 0;
	opacity: 1;
	width: 100%;
}

/* This is the heart of the carousel */
.scroll__track {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	overflow-behavior: contain;
	-webkit-overflow-scrolling: touch;
	overflow-scrolling: touch;
	-ms-overflow-style: none; /* IE */
	overflow-y: auto;
	overscroll-behavior-y: contain;
	scroll-behavior: smooth;
	-ms-scroll-chaining: none;
	scroll-snap-type: y proximity;
	scrollbar-width: none; /* FF */
}

.scroll__track::-webkit-scrollbar {
	display: none;
}

.thumb {
	background: #eee;
	cursor: pointer;
	display: block;
	height: 40px;
	line-height: 40px;
	margin-bottom: 5px;
	position: relative;
	scroll-snap-align: center;
	text-align: center;
	width: 40px;
}

.thumb::after {
	bottom: 0;
	box-shadow: inset 0 0 0 0 lightblue;
	content: "";
	left: 0;
	position: absolute;
	right: 0;
	top: 0;
	transition: box-shadow ease 0.3s;
}

.thumb._current::after {
	box-shadow: inset 0 0 0 3px lightblue;
}

/* Gallery */

.gallery {
	display: flex;
}

.gallery .scroll {
	flex-basis: 40px;
	margin-right: 20px;
}

.gallery .carousel {
	max-width: 400px;
	width: 100%;
}
