#slideshow {
    position: relative;
    overflow: hidden;
    width: 100%;
    user-select: none;
    margin: clamp(5em, 3em + 4vw, 8em) 0 clamp(5rem, 5rem + 4vw, 10rem);
}

#slideshow figure {
    margin: 0;
}

.slideshow__viewport {
    position: relative;
}

.slideshow__viewport::before {
    z-index: 1;
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    border: clamp(10px, 10px + .5vw, 15px) solid var(--color-dark-background);
}

.slideshow__track {
    display: flex;
    flex-direction: row;
    margin: 0;
    padding: 0;
    background-color: var(--color-dark-background);
    transition: transform .5s ease;
}

.slideshow__image {
    user-drag: none;
    -webkit-user-drag: none;
    pointer-events: auto;
}

.slideshow-controls {
    display: flex;
    align-items: flex-end;
    justify-content: end;
    position: absolute;
    z-index: 2;
    right: 0;
    bottom: -1px;
    border-bottom: 1px solid white;
}

.slideshow-controls__button {
    width: 50%;
    height: clamp(3.75em, 3.75em + 2vw, 6em);
    width: clamp(3.75em, 3.75em + 2vw, 6em);
    background-color: white;
    border: none;
    cursor: pointer;
    transition: background-color .35s;
}

.slideshow-controls__button:hover {
    background-color: var(--color-dark-background);
}

.slideshow-controls__button:hover .slideshow-controls__arrow {
    fill: var(--color-accent);
}

.slideshow-controls__arrow {
    width: clamp(1rem, 1rem + 1vw, 1.65rem);
    transition: fill .35s;
}

.slideshow-controls__button--prev .slideshow-controls__arrow {
    transform: rotate(180deg)
}

#slideshow .slideshow__slide {
    margin: 0;
    position: relative;
    transition: transform 0.5s ease-out;
}

#slideshow img {
    height: auto;
    width: 100%
}


.slideshow__footer {
    display: flex;
    align-items: start;
    flex-direction: column;
    max-width: 40em;
    padding: clamp(1.5rem, 1rem + 1vw, 2.5rem) 0 0;
    padding-bottom: 2px;
    overflow: visible;
}

.slideshow__progress {
    display: flex;
    align-items: center;
    flex-direction: row;
    width: 100%;
    padding: 0 clamp(.75em, .5em + .5vw, 1.25em);
}

.slideshow__progress .number {
    font-size: clamp(.825rem, .5rem + .75vw, .875rem);
    font-weight: 700;
}

.slideshow__progress-current {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.slideshow__progress-number {
    opacity: 0;
    visibility: hidden;
    position: absolute;
    left: 0;
    transition: opacity .35s cubic-bezier(0, 0, 0.3, 1), visibility .35s cubic-bezier(0, 0, 0.3, 1);
}

.slideshow__progress-number.active {
    opacity: 1;
    visibility: visible;
    position: relative;
}


.slideshow__progress-bar {
    position: relative;
    height: 3px;
    width: 80%;
    background-color: #D9D9D9;
    margin: 0 clamp(1em, 1em + 2vw, 3em);
}

.slideshow__progress-fill {
    position: absolute;
    height: 100%;
    width: 33.33%;
    background-color: var(--color-dark-background);
    transition: width .35s ease;
}

.slideshow__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 8em;
    position: relative;
    border: none;
    cursor: pointer;
    font-family: var(--font-heading);
    background-color: transparent;
    margin-top: 1.5em;
    font-size: clamp(.875rem, .5rem + .5vw, .9375rem);
    text-align: left;
    transition: background-color 0.3s ease-in-out;
}

.slideshow__toggle-label::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--color-text);
}

.slideshow__toggle.paused .play,
.slideshow__toggle .pause {
    display: inline-block;
    position: relative;
}

.slideshow__toggle-label,
.slideshow__toggle.paused .pause {
    display: none;
}

@media only screen and (min-width: 28.75rem) {
    .slideshow__footer {
        align-items: center;
        flex-direction: row;
        padding-bottom: 0;
    }

    .slideshow__toggle {
        margin-top: 0;
        margin-left: clamp(2em, 2em + 2.5vw, 6em);

    }
}