.searchformwrapper .search input[type='submit'] {
	/* Hide the text. */
    text-indent: -9999px;
    background: transparent url(search-button.jpg) no-repeat center;
    background-size: 20px;
    color: transparent;
    cursor: pointer;
}

@media screen and (max-width: 870px) {
    .custom-header {
        width:  100%;
    }
}

div.sphinxsidebar hr {
    width: 100%;
}

.language-switcher {
    text-align: center;
}

div.footer {
    text-align: center;
}

/* The v2 documentation link — set apart from the list of external links: it is a
   different version of this product, not a neighbouring site. */
.ps-v2-link {
    margin-top: 0.6em;
}

/* PDF download box — spacing from the search input above it. */
div.pdfbox {
    margin-top: 1.5em;
}

/* PDF box: the download link and the "open in browser" icon on one line with a
   clear gap between them (flex gap). --ps-blue/--ps-red come from brand.css. */
.pdfbox-item {
    display: flex;
    align-items: center;
    gap: 0.7em;
}
.pdfbox-download {
    overflow-wrap: anywhere;     /* a long file name wraps instead of stretching the line */
}
.pdfbox-view {
    flex: 0 0 auto;              /* the icon never shrinks */
    display: inline-flex;
    align-items: center;
    line-height: 0;
    color: var(--ps-blue, #2a21db);
    border-bottom: none;        /* no underline, unlike the textual links */
}
.pdfbox-view:hover,
.pdfbox-view:focus {
    color: var(--ps-red, #ff392b);
    outline: none;
}
.pdfbox-view-icon {
    display: block;
}

/* Diagram lightbox — clicking an SVG figure opens it full-screen. */
img.diagram-zoomable {
    cursor: zoom-in;
    transition: opacity 0.15s ease;
}
img.diagram-zoomable:hover,
img.diagram-zoomable:focus {
    opacity: 0.82;
    outline: none;
}
.diagram-lightbox {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.88);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2em;
    box-sizing: border-box;
    cursor: zoom-out;
    animation: diagram-lightbox-fade 0.15s ease;
}
@keyframes diagram-lightbox-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.diagram-lightbox-stage {
    max-width: 100%;
    max-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.diagram-lightbox img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    background: #fff;
    border-radius: 4px;
    padding: 1em;
    box-sizing: border-box;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    cursor: default;
}
.diagram-lightbox-close {
    position: absolute;
    top: 1em;
    right: 1em;
    width: 2.5em;
    height: 2.5em;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.8em;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.diagram-lightbox-close:hover,
.diagram-lightbox-close:focus {
    background: rgba(255, 255, 255, 0.32);
    outline: none;
}