.pieces-slider {
	position: relative;
	text-align: center;
	padding: 8rem 0;
}

.js .pieces-slider {
	padding: 0;
}

/* Make all slides absolutes and hide them */
.js .pieces-slider__slide {
	position: absolute;
	right: 100%;
}

/* Define image dimensions and also hide them */
.pieces-slider__image {
	max-width: 600px;
	max-height: 400px;
}

.js .pieces-slider__image {
	visibility: hidden;
}

/* Hide the titles */
.js .pieces-slider__text {
	text-indent: -9999px;
}

/* Canvas with viewport width and height */
.js .pieces-slider__canvas {
	position: relative;
	width: 100vw;
	height: 100vh;
	transition: 0.2s opacity;
}

/* Class for when we resize */
.pieces-slider__canvas--hidden {
	opacity: 0;
	transition-duration: 0.3s;
}

/* Navigation buttons */
.pieces-slider__button {
	position: absolute;
	left: 0;
	top: 50%;
	width: 100px;
	height: 100px;
	margin: -25px 0 0 0;
	background-color: #5104ab;
	color: #fff;
	font-family: inherit;
	font-weight: bold;
	border: none;
	cursor: pointer;
	transition: 0.1s background-color;
}

.pieces-slider__button:hover {
	background: #5f3abf;
}

.pieces-slider__button--next {
	left: auto;
	right: 0;
}

/* Hide the buttons when no JS */
.no-js .pieces-slider__button {
	display: none;
}

/* Media queries with styles for smaller screens */
@media screen and (max-width: 720px) {
	.pieces-slider__image {
		max-width: 300px;
	}
}

@media screen and (max-width: 55em) {
	.pieces-slider__canvas {
		width: 100vw;
		height: 100vw;
	}
	.pieces-slider__button {
		width: 60px;
		height: 60px;
	}
}
