/**
 * @file
 * CSS overrides to isolate the Universal Viewer from Drupal theme styles.
 *
 * The gavias_daudo theme applies broad rules to h1-h3, a, nav.pager, input,
 * .button, etc. that break UV's compact header bar and pager. These overrides
 * reset those rules inside the .uv container so UV's own styles take effect.
 */

/* Reset heading transforms inside UV */
.uv h1,
.uv h2,
.uv h3,
.uv h4,
.uv h5,
.uv h6 {
    text-transform: none;
    font-family: inherit;
    margin: 0;
    padding: 0;
    letter-spacing: normal;
    line-height: normal;
}

/* Reset link color inside UV */
.uv a {
    color: inherit;
    text-decoration: none;
}

/* Prevent theme's nav.pager margin from pushing UV pager to second row */
.uv nav.pager,
.uv .pager {
    margin-top: 0;
    margin-bottom: 0;
}

/* Reset input sizing — all:revert nukes theme styles, then restore UV's own look */
.uv input,
.uv input[type="text"],
.uv input[type="search"],
.body-page .uv input,
.body-page .uv input[type="text"],
.body-page .uv input[type="search"] {
    all: revert;
    height: 24px !important;
    line-height: 1.2 !important;
    padding: 2px 6px !important;
    font-size: 12px !important;
    max-width: none !important;
    box-sizing: border-box !important;
    box-shadow: none !important;
    vertical-align: middle;
    /* Restore UV's dark input background after revert */
    background-color: #2E2E2E !important;
    color: #fff !important;
    border: 1px solid #555 !important;
    margin-top: 0px !important;

}

.uv .headerPanel .total {
    margin-top: 2px !important;
}

.uv .headerPanel .centerOptions .mode {
    margin-top: 6px !important;
}

/* Reset button sizing inside UV — preserve UV background colors */
.uv button,
.uv .btn,
.body-page .uv button {
    height: auto !important;
    line-height: 1.2 !important;
    padding: 2px 6px !important;
    font-size: 12px !important;
    box-shadow: none !important;
    vertical-align: middle;
}

/* Prevent UV header panel elements from wrapping */
.uv .headerPanel .options {
    white-space: nowrap;
    flex-wrap: nowrap;
    display: flex;
    align-items: center;
}

/* Keep pager/canvas navigator on a single row */
.uv .headerPanel .pagingHeaderPanel,
.uv .headerPanel .centerOptions {
    white-space: nowrap;
    flex-wrap: nowrap;
    display: flex;
    align-items: center;
}

/* Ensure UV's canvas index input stays compact */
.uv .headerPanel input.canvasIndex {
    width: 40px;
    text-align: center;
}

/* Single-column thumbnail list in the left panel. UV sets thumb widths
   inline, so !important is required to override. Archival items are
   loose leaves, not bound openings — recto/verso pairing is misleading. */
.uv .leftPanel .thumbsView .thumb {
    width: 95% !important;
    float: none !important;
    display: block;
    margin: 0 auto 12px !important;
    clear: both;
}

.uv .leftPanel .thumbsView .thumb .wrap {
    margin: 0 auto;
    background-color: transparent !important;
    border: none !important;
    padding: 0 !important;
}

.uv .leftPanel .thumbsView .thumb .wrap img {
    display: block;
    background-color: transparent !important;
    border: none !important;
}

.uv .leftPanel .thumbsView .thumb .info,
.uv .leftPanel .thumbsView .thumb .label {
    padding: 2px 0 !important;
    margin: 0 !important;
    line-height: 1.2 !important;
    min-height: 0 !important;
    background-color: transparent !important;
}