body.c3-image-viewer-open {
    overflow: hidden !important;
}

.c3-image-viewer[hidden],
.c3-image-viewer [hidden] {
    display: none !important;
}

.c3-image-viewer {
    position: fixed;
    z-index: 30000;
    inset: 0;
    display: block;
    box-sizing: border-box;
    overflow: hidden;
    padding: 0;
    background: rgba(0, 0, 0, .78);
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    overscroll-behavior: contain;
}

.c3-image-viewer-shell {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    max-height: none;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.c3-image-viewer-backdrop {
    position: absolute;
    inset: 0;
    cursor: zoom-out;
}

.c3-image-viewer-bar {
    position: fixed;
    z-index: 4;
    top: 13px;
    right: 70px;
    left: 20px;
    display: flex;
    min-height: 32px;
    box-sizing: border-box;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 4px 0;
    border: 0;
    background: transparent;
    pointer-events: none;
}

.c3-image-viewer-details,
.c3-image-viewer-actions {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
}

.c3-image-viewer-details strong {
    min-width: 0;
    overflow: hidden;
    color: #fff;
    font-size: 13px;
    line-height: 1.25;
    text-overflow: ellipsis;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
    white-space: nowrap;
}

.c3-image-viewer-details span {
    color: #ddd;
    font-size: 11px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
    white-space: nowrap;
}

.c3-image-viewer-actions {
    pointer-events: none;
}

.c3-image-viewer-original {
    pointer-events: auto;
    color: #fff !important;
    font-size: 12px !important;
    font-weight: 650;
    text-decoration: none !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
}

.c3-image-viewer-original:hover,
.c3-image-viewer-original:focus {
    color: #f28c28 !important;
    text-decoration: underline !important;
}

.c3-image-viewer-close,
.c3-image-viewer-nav {
    display: grid;
    box-sizing: border-box;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .42);
    background: rgba(0, 0, 0, .35);
    color: #fff;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease;
}

.c3-image-viewer-close {
    position: fixed;
    z-index: 5;
    top: 14px;
    right: 18px;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 50%;
    font: 400 24px/1 Arial, sans-serif;
}

.c3-image-viewer-nav {
    position: fixed;
    z-index: 5;
    top: 50%;
    width: 48px;
    height: 48px;
    padding: 0 0 4px;
    border-radius: 50%;
    font: 300 40px/1 Arial, sans-serif;
    transform: translateY(-50%);
}

.c3-image-viewer-nav.is-previous { left: 4vw; }
.c3-image-viewer-nav.is-next { right: 4vw; }

.c3-image-viewer-close:hover,
.c3-image-viewer-close:focus,
.c3-image-viewer-nav:hover,
.c3-image-viewer-nav:focus {
    border-color: rgba(255, 255, 255, .8);
    background: rgba(255, 255, 255, .2);
    outline: 2px solid transparent;
}

.c3-image-viewer-stage {
    position: fixed;
    z-index: 2;
    inset: 12vh 12vw;
    display: flex;
    min-height: 0;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0;
    background: transparent;
}

.c3-image-viewer-stage figure {
    position: relative;
    display: flex;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    overflow: hidden;
    color: #fff;
    text-align: center;
}

.c3-image-viewer-stage img {
    display: block;
    max-width: 100%;
    max-height: calc(100% - 32px);
    width: auto;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
}

.c3-image-viewer-stage figcaption {
    max-width: 850px;
    max-height: 4em;
    margin-top: 9px;
    overflow: hidden;
    color: #ddd;
    font-size: 13px;
    line-height: 1.45;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
    white-space: pre-wrap;
}

.c3-image-viewer-error {
    margin: 18px;
    color: #fff;
    font-size: 14px;
}

.c3-image-viewer.is-loading .c3-image-viewer-stage figure::before {
    position: absolute;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(255, 255, 255, .25);
    border-top-color: #fff;
    border-radius: 50%;
    content: "";
    animation: c3-image-viewer-spin .7s linear infinite;
}

.c3-image-viewer.is-loading .c3-image-viewer-stage img {
    opacity: 0;
}

@keyframes c3-image-viewer-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 680px) {
    .c3-image-viewer-bar {
        top: 9px;
        right: 58px;
        left: 12px;
    }

    .c3-image-viewer-close {
        top: 9px;
        right: 10px;
        width: 32px;
        height: 32px;
    }

    .c3-image-viewer-stage {
        inset: 10vh 42px 9vh;
    }

    .c3-image-viewer-nav {
        width: 38px;
        height: 38px;
        font-size: 32px;
    }

    .c3-image-viewer-nav.is-previous { left: 7px; }
    .c3-image-viewer-nav.is-next { right: 7px; }

    .c3-image-viewer-stage img {
        max-height: calc(100% - 25px);
    }

    .c3-image-viewer-original {
        display: none;
    }
}
