/* =========================================================
   Documentation image zoom
   ========================================================= */

/* Wrapper added around documentation images */
.docfx-image-zoom {
    position: relative;
    display: inline-block;
    max-width: 100%;
    vertical-align: top;
    line-height: 0;
}

.docfx-image-zoom > a,
.docfx-image-zoom > picture {
    display: inline-block;
    max-width: 100%;
}

.docfx-image-zoom img {
    max-width: 100%;
    height: auto;
}

/* Zoom button displayed over the original image */
.docfx-image-zoom__button {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;

    width: 38px;
    height: 38px;
    padding: 8px;

    color: #ffffff;
    background: rgba(0, 0, 0, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 4px;

    cursor: pointer;
    opacity: 0;
    pointer-events: none;

    transition:
        opacity 0.2s ease,
        background-color 0.2s ease,
        transform 0.2s ease;
}

.docfx-image-zoom__button svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.docfx-image-zoom:hover .docfx-image-zoom__button,
.docfx-image-zoom:focus-within .docfx-image-zoom__button {
    opacity: 1;
    pointer-events: auto;
}

.docfx-image-zoom__button:hover,
.docfx-image-zoom__button:focus {
    color: #ffffff;
    background: rgba(0, 0, 0, 0.9);
    outline: 2px solid #ffffff;
    outline-offset: 2px;
    transform: scale(1.05);
}

/* Always expose the zoom button on touch devices */
@media (hover: none) {
    .docfx-image-zoom__button {
        opacity: 1;
        pointer-events: auto;
    }
}

/* =========================================================
   Full-page lightbox
   ========================================================= */

.docfx-image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2147483646;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;

    background: rgba(0, 0, 0, 0.88);
}

.docfx-image-lightbox[hidden] {
    display: none !important;
}

.docfx-image-lightbox__stage {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    overflow: hidden;
}

.docfx-image-lightbox__viewport {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    overflow: hidden;
    touch-action: none;
}

/* Enlarged image */
.docfx-image-lightbox__image {
    display: block;

    max-width: 94vw;
    max-height: 84vh;

    width: auto;
    height: auto;

    object-fit: contain;
    background: #ffffff;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.65);

    cursor: zoom-in;

    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;

    transform-origin: center center;

    transition: transform 0.15s ease;
    will-change: transform;
}

.docfx-image-lightbox__image.is-zoomed {
    cursor: grab;
}

.docfx-image-lightbox.is-dragging
.docfx-image-lightbox__image {
    cursor: grabbing;
    transition: none;
}

/* =========================================================
   Close button
   ========================================================= */

.docfx-image-lightbox__close {
    position: fixed;
    top: 18px;
    right: 24px;
    z-index: 2147483647;

    width: 46px;
    height: 46px;
    padding: 0;

    color: #ffffff;
    background: rgba(0, 0, 0, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 50%;

    font-family: Arial, sans-serif;
    font-size: 32px;
    font-weight: 300;
    line-height: 40px;
    text-align: center;

    cursor: pointer;
}

.docfx-image-lightbox__close:hover,
.docfx-image-lightbox__close:focus {
    color: #ffffff;
    background: rgba(0, 0, 0, 0.95);
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* =========================================================
   Zoom controls
   ========================================================= */

.docfx-image-lightbox__controls {
    position: fixed;
    left: 50%;
    bottom: 22px;
    z-index: 2147483647;

    display: flex;
    align-items: center;
    gap: 6px;

    padding: 6px;

    background: rgba(0, 0, 0, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 6px;

    transform: translateX(-50%);
}

.docfx-image-lightbox__control {
    min-width: 42px;
    height: 38px;
    padding: 0 10px;

    color: #ffffff;
    background: transparent;
    border: 0;
    border-radius: 4px;

    font-family: Arial, sans-serif;
    font-size: 21px;
    line-height: 38px;
    text-align: center;

    cursor: pointer;
}

.docfx-image-lightbox__control:hover,
.docfx-image-lightbox__control:focus {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    outline: 2px solid #ffffff;
    outline-offset: 1px;
}

.docfx-image-lightbox__control:disabled {
    color: rgba(255, 255, 255, 0.4);
    background: transparent;
    cursor: default;
    outline: none;
}

.docfx-image-lightbox__percentage {
    display: inline-block;
    min-width: 54px;

    color: #ffffff;
    font-size: 14px;
    line-height: 38px;
    text-align: center;
}

/* Prevent page scrolling while the lightbox is open */
body.docfx-image-lightbox-open {
    overflow: hidden;
}

/* =========================================================
   Mobile behavior
   ========================================================= */

@media (max-width: 600px) {
    .docfx-image-lightbox {
        padding: 12px;
    }

    .docfx-image-lightbox__image {
        max-width: 96vw;
        max-height: 78vh;
    }

    .docfx-image-lightbox__close {
        top: 10px;
        right: 10px;
    }

    .docfx-image-lightbox__controls {
        bottom: 10px;
    }
}