+:root {
+ --sl-cap: 20px;
+ --sl-dots: 10px;
+ --sl-transition: 0.5s;
+}
+
+div.slideshow {
+ max-width: 1000px;
+ position: relative;
+ margin: auto;
+}
+
+
+/*
+ * Slides
+ */
+
+figure.slide:first-child {
+ /* Position the first slide relatively to set the height (others are
+ * positioned absolutely to allow overlapping) */
+ position: relative;
+}
+
+figure.slide {
+ /* Position slides absolutely to allow overlapping */
+ position: absolute;
+ top: 0;
+ left: 0;
+ margin: 0;
+ /* Slides start at 0 opacity */
+ opacity: 0;
+ /* Fade out duration is double the fade in duration (approximates a cross
+ * dissolve) */
+ transition: opacity calc(2 * var(--sl-transition)) ease;
+ -webkit-transition: opacity calc(2 * var(--sl-transition)) ease;
+ -moz-transition: opacity calc(2 * var(--sl-transition)) ease;
+ z-index: -1;
+}
+
+figure.slide.active {
+ opacity: 1;
+ z-index: 0;
+ /*display: block;*/
+ transition: opacity 1s ease;
+ -webkit-transition: opacity 1s ease;
+ -moz-transition: opacity 1s ease;
+}
+
+figure.slide *,
+div.slideshow div#controls {
+ width: 100%;
+}
+
+figure.slide figcaption {
+ height: var(--sl-cap);
+ text-align: center;
+}
+
+
+/*
+ * Buttons
+ */
+
+#prev, #next, #state {
+ cursor: pointer;
+ font-weight: bold;
+ font-size: 1.5em;
+ user-select: none;
+ opacity: 0;
+ transition: 0.2s ease;
+ position: absolute;
+ color: white;
+}
+
+#prev, #next {
+ top: calc(50% - calc(var(--sl-cap) + var(--sl-dots) + 50px) / 2);
+ width: auto;
+ padding: 16px;
+ border-radius: 0 3px 3px 0;
+}
+
+#state {
+ width: 1.5em;
+ height: 1.5em;
+ text-align: center;
+ font-family: monospace;
+ top: 15px;
+ right: 15px;
+ padding: 4px;
+ border-radius: 3px;
+}
+
+#next {
+ /* Position next button on right */
+ right: 0;
+ border-radius: 3px 0 0 3px;
+}
+
+div.slideshow:hover #prev,
+div.slideshow:hover #next,
+div.slideshow:hover #state {
+ /* Show buttons on slideshow hover */
+ opacity: 100;
+ background-color: rgba(0,0,0,0.3);
+}
+
+#prev:hover, #next:hover, #state:hover {
+ /* Button hover */
+ background-color: rgba(0,0,0,0.8) !important;
+}
+
+
+/*
+ * Dot controls/indicators
+ */
+
+div.slideshow div#controls {
+ text-align: center;
+}
+
+div.slideshow div#controls span {
+ cursor: pointer;
+ height: var(--sl-dots);
+ width: var(--sl-dots);
+ margin: 0 2px;
+ background-color: #bbb;
+ border-radius: 50%;
+ display: inline-block;
+ transition: background-color 0.6s ease;
+}
+
+div#controls span.active,
+div#controls span:hover {
+ background-color: #717171 !important;
+}