.pp-carousel-container {
    display: block;
    margin: 2rem auto;
}

.pp-carousel-wrapper {
    display: flex;
    max-width: 100%;
    justify-content: center;
    align-items: center;
    gap: 0.3em;
}

@container pp-main-container (min-width: 850px) {
    .pp-carousel-wrapper {
        margin-left: 2rem;
        margin-right: 2rem;
    }
}

.pp-carousel-nav {
    flex: 0;
    width: 1.6em;
    text-align: center;
}

.pp-carousel-content {
    flex: 1;
    list-style: none;
    padding: 0;
    margin: 0;
    max-width: 1200px;
}

.pp-carousel-slide {
    display: none;
    animation-name: fade;
    animation-duration: 3s
}

@keyframes fade {
    from { opacity: 0.4 }
    to { opacity: 1 }
}

.pp-carousel-active {
    display: inline-block;
}

.pp-carousel-slide > figure {
    margin: 0;
    max-width: 100%;
}

.pp-carousel-image {
    margin: 0;
    max-width: 100%;
    max-height: calc(100vh - 10rem);
    object-fit: contain;
    border-radius: var(--border-radius-m);
    border: 2px solid var(--colour-more-subdued-fg);
}

.pp-carousel-btn {
    border: 1px solid var(--colour-more-subdued-fg);
    background-color: var(--colour-more-subdued-fg);
    border-radius: var(--border-radius-s);
    display: inline-block;  /* js may override this */
    width: auto;
    color: var(--colour-primary-bg);
    font-family: 'Assistant', Tahoma, sans-serif;
    font-size: 1rem;
    font-weight: bold;
    padding: 1rem 0.3rem;
    transition: all 0.3s ease;
}

button.pp-carousel-btn:not([disabled]):hover {
    background-color: var(--colour-primary-fg);
    cursor: pointer;
}

button.pp-carousel-btn[disabled]:hover {
    background-color: var(--colour-more-subdued-fg);
    cursor: wait;
}

.pp-carousel-caption {
    color: var(--colour-subdued-fg);
    font-family: 'Assistant', Tahoma, sans-serif;
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    margin: 1em;
}

.pp-carousel-caption > p {
    margin: 0.3em;
    text-wrap: balance;
}

.pp-carousel-message {
    color: var(--colour-subdued-secondary-fg);
    text-align: center;
    min-width: 250px;
    min-height: 200px;
    margin: auto;
    padding-top: calc(50% - 2em);
}

.pp-carousel-pagination {
    display: block;
    margin: 0 auto;
    text-align: center;
}

.pp-carousel-navigation-dot {
    cursor: pointer;
    height: 1em;
    width: 1em;
    margin: 0.3em;
    background-color: var(--colour-more-subdued-fg);
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.6s ease;
    border: none;
}

.pp-carousel-navigation-dot:hover {
    background-color: var(--colour-primary-fg);
}

.pp-carousel-navigation-dot-active {
    background-color: var(--colour-primary-fg);
}

