*,
*::before,
*::after {
    box-sizing: border-box;
}

.medadd-gallery,
.medadd-slideshow {
    width: min(100%, 50rem);
    margin: 1rem auto 0;
}

.medadd-gallery {
    display: grid;
    gap: 0.9rem;
}

.medadd-gallery--videos {
    margin-top: 1rem;
}

.medadd-item,
.medadd-slide {
    width: 100%;
    margin: 0 auto;
    padding: var(--medadd-padding, 1rem);
    border: 0.0625rem solid rgba(0, 0, 128, 0.13);
    border-radius: calc(var(--medadd-roundness, 0.9rem) + 0.22rem);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 0.8rem 1.6rem rgba(0, 0, 128, 0.065);
    text-align: center;
}

.medadd-media {
    width: auto;
    max-width: 100%;
    max-height: 40rem;
    margin: 0 auto;
    border-radius: var(--medadd-roundness, 0.9rem);
    object-fit: contain;
}

.medadd-caption {
    margin: 0.48rem auto 0;
    color: var(--medadd-font-color, #000080);
    font-size: var(--medadd-font-size, 0.875rem);
    font-weight: var(--medadd-font-weight, 560);
    line-height: 1.36;
    text-align: center;
}

.medadd-empty {
    width: min(100%, 38rem);
    margin: 0 auto;
    padding: 1rem;
    border: 0.0625rem solid rgba(0, 0, 128, 0.13);
    border-radius: 1rem;
    color: #000080;
    background: rgba(255, 255, 255, 0.78);
    text-align: center;
}

.medadd-slides {
    display: grid;
    align-items: center;
}

.medadd-slideshow--active .medadd-slide {
    grid-area: 1 / 1;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 280ms ease, visibility 280ms ease;
}

.medadd-slideshow--active .medadd-slide--active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 1;
}

.medadd-controls {
    display: flex;
    justify-content: center;
    margin-top: 0.75rem;
}

.medadd-control {
    min-height: 2.42rem;
    padding: 0.62rem 0.95rem;
    border: 0.0625rem solid rgba(0, 86, 214, 0.24);
    border-radius: 999rem;
    color: #000080;
    background: rgba(255, 255, 255, 0.84);
    font: inherit;
    font-size: 0.88rem;
    font-weight: 760;
    cursor: pointer;
    transition: color 160ms ease, background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.medadd-control:hover {
    color: #ffffff;
    background: #0056d6;
    border-color: #0056d6;
    transform: translateY(-0.06rem);
}

.medadd-control:focus-visible {
    outline: 0.18rem solid #5e8cff;
    outline-offset: 0.18rem;
}

@media (max-width: 42rem) {
    .medadd-gallery,
    .medadd-slideshow {
        width: 100%;
    }

    .medadd-item,
    .medadd-slide {
        padding: min(var(--medadd-padding, 1rem), 0.75rem);
    }

    .medadd-media {
        max-height: 28rem;
    }

    .medadd-control {
        width: 100%;
    }
}
