/* The same full-screen photo viewer is used by every installation guide. */
.install-guide-image-open {
    position: relative;
    display: flex;
    flex: 1 1 0;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    border: 0;
    border-radius: inherit;
    padding: 0;
    background: transparent;
    color: inherit;
    cursor: zoom-in;
    overflow: hidden;
}
.install-guide-image-open img { display: block; width: 100%; height: 100%; object-fit: contain; }
.install-guide-image-open::after {
    content: '⤢';
    position: absolute;
    right: 8px;
    bottom: 8px;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 1px solid #ffffff55;
    border-radius: 9px;
    background: #101014cc;
    color: #fff;
    font-size: 22px;
    line-height: 1;
    pointer-events: none;
}
.install-guide-image-open:focus-visible { outline: 3px solid #ff6987; outline-offset: -3px; }
html.install-guide-image-viewer-active { overflow: hidden; }
.install-guide-image-viewer {
    box-sizing: border-box;
    width: calc(100vw - 24px);
    height: calc(100vh - 24px);
    height: calc(100dvh - 24px);
    max-width: none;
    max-height: none;
    margin: auto;
    padding: 8px;
    border: 1px solid #ffffff33;
    border-radius: 16px;
    background: #101014;
    color: #fff;
    overflow: hidden;
}
.install-guide-image-viewer[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 8px; }
.install-guide-image-viewer::backdrop { background: #000d; }
.install-guide-image-viewer__toolbar { display: flex; align-items: center; gap: 12px; min-width: 0; }
.install-guide-image-viewer__caption { flex: 1; min-width: 0; margin: 0; padding-left: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.install-guide-image-viewer__close { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: 1px solid #ffffff44; border-radius: 10px; background: #ffffff0d; color: #fff; font-size: 32px; line-height: 1; cursor: pointer; }
.install-guide-image-viewer__close:hover { background: #ffffff22; }
.install-guide-image-viewer__close:focus-visible { outline: 3px solid #ff6987; outline-offset: 2px; }
.install-guide-image-viewer__canvas { display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 0; }
.install-guide-image-viewer__canvas img { display: block; width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; }
@media (max-width: 700px) {
    .install-guide-image-viewer { width: calc(100vw - 8px); height: calc(100vh - 8px); height: calc(100dvh - 8px); padding: 4px; border-radius: 10px; gap: 4px; }
    .install-guide-image-viewer__caption { font-size: 12px; }
}
.install-guide-image-viewer__canvas img { cursor: zoom-out; }


/* Shared compact image treatment for every installation guide. */
body.ci-install-shell .ci-wizard-step .ci-stage-images,
body.ci-install-shell .install-screen-body .install-guide-images,
body.ci-install-shell .install-password-step :is(.ci-stage-images, .install-guide-images),
body.ci-install-shell .install-media-fit .install-media-fit__gallery,
body.ci-install-shell .install-media-consistent .install-media-fit__gallery {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-auto-rows: auto;
    align-content: start;
    justify-items: center;
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    flex: 0 0 auto;
    gap: .65rem;
    overflow: visible;
}

body.ci-install-shell .ci-wizard-step .ci-stage-images :is(.ci-step-image, .install-guide-image),
body.ci-install-shell .install-screen-body .install-guide-images :is(.ci-step-image, .install-guide-image),
body.ci-install-shell .install-password-step :is(.ci-step-image, .install-guide-image),
body.ci-install-shell .install-media-fit .install-media-fit__gallery :is(.ci-step-image, .install-guide-image),
body.ci-install-shell .install-media-consistent .install-media-fit__gallery :is(.ci-step-image, .install-guide-image) {
    display: block;
    box-sizing: border-box;
    width: min(100%, 420px);
    max-width: 420px;
    height: auto;
    min-height: 0;
    max-height: none;
    margin: .45rem auto;
    flex: none;
    overflow: hidden;
    border-radius: .85rem;
    line-height: normal;
}

body.ci-install-shell [data-guide-copy] .install-guide-inline-image {
    display: block;
    box-sizing: border-box;
    width: min(100%, 420px);
    max-width: 420px;
    height: auto;
    min-height: 0;
    max-height: none;
    margin: .65rem auto;
    overflow: hidden;
    border-radius: .85rem;
}

body.ci-install-shell .ci-stage-images .install-guide-image-open,
body.ci-install-shell .install-guide-images .install-guide-image-open,
body.ci-install-shell .install-media-fit__gallery .install-guide-image-open,
body.ci-install-shell [data-guide-copy] .install-guide-inline-image .install-guide-image-open,
body.ci-install-shell .ci-stage-images img,
body.ci-install-shell .install-guide-images img,
body.ci-install-shell .install-media-fit__gallery img,
body.ci-install-shell .install-password-step :is(.ci-step-image, .install-guide-image) img,
body.ci-install-shell [data-guide-copy] .install-guide-inline-image img {
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    flex: none;
    border-radius: inherit;
    object-fit: contain;
}

/* Remove the empty text line boxes produced around block thumbnails in guide markup. */
body.ci-install-shell :is(figure.ci-step-image, figure.install-guide-image, .install-guide-inline-image),
body.ci-install-shell :is(figure.ci-step-image, figure.install-guide-image, .install-guide-inline-image) .install-guide-image-open {
    line-height: 0;
}

body.ci-install-shell :is(figure.ci-step-image, figure.install-guide-image, .install-guide-inline-image) figcaption {
    line-height: 1.35;
}