/* Universal viewer custom and fixes for common Omeka themes */
@media all {
    .universal-viewer {
        height: 70vh;
        min-height: 600px;
    }
    .universal-viewer .headerPanel .centerOptions .mode label {
        width: auto;
        min-width: 31px;
    }
    /* The viewer sets a fixed width (425px) on the search box, so the box and
       its button overflow the panel when the viewer is narrower than about
       441px (the panel keeps a margin of 8px on each side). Keep the width
       when there is room, but never overflow. A long label (French, German…)
       wraps the box on two lines and makes the overflow more visible. */
    /* In uv3 the element ".uv" is inside ".universal-viewer", but in uv4 both
       classes are set on the same element, so two selectors are needed. The
       viewer injects its own styles when it starts, so after this file: they
       win with the same specificity and "important" is required here. */
    .universal-viewer .uv .footerPanel .searchOptions,
    .universal-viewer.uv .footerPanel .searchOptions {
        width: min(480px, 100%) !important;
        box-sizing: border-box;
    }
    .universal-viewer .uv .footerPanel .searchOptions .searchTextContainer,
    .universal-viewer.uv .footerPanel .searchOptions .searchTextContainer,
    .universal-viewer .uv .footerPanel .searchOptions .searchText,
    .universal-viewer.uv .footerPanel .searchOptions .searchText {
        max-width: 100% !important;
        box-sizing: border-box;
    }
    /* Fix for v4 when not embedded. */
    .uv {
        word-wrap: initial;
    }
    /* UV4 renders inline in the dom, not iframe or shadow dom,
       so global theme selectors may override the uv ones, so reset them. */
    .uv button,
    .uv a,
    .uv input,
    .uv select,
    .uv label,
    .uv textarea {
        all: revert;
    }
}
.play.fullscreen,
.play.fullscreen > .universal-viewer {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
}

/* Pan of the pdf with the mouse (see js/uv-pdf.js). */
.pdfContainer {
    cursor: grab;
}
.pdfContainer.is-panning {
    cursor: grabbing;
    user-select: none;
}

/* The content of the center panel of the viewer has the id "content", like the
   main div of most themes, so the styles of the theme apply to it: a padding
   makes it overflow the panel, that is hidden, and the attribution is cut.
   To be removed when the viewer prefixes this id. */
.uv #content {
    padding: 0;
}
