.spv-viewer {
    position: relative;
    width: 100%;
    max-width: 100%;
    border: 0px solid #dcdcde;
    background: #f0f0f1;
    box-sizing: border-box;
    overflow: hidden;
}

.spv-toolbar {
    min-height: 46px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 7px 10px;
    background: #fff;
    border-top: 0px solid #dcdcde;
    box-sizing: border-box;
	margin-top: 10px;
}

.spv-btn.spv-zoom-out, .spv-btn.spv-fit, .spv-btn.spv-width-fit, .spv-btn.spv-zoom-in, .spv-btn.spv-fullscreen {
  margin: 10px 0px 0px;
}

.spv-btn.spv-fit {
  padding: 0;
}

.spv-btn.spv-width-fit {
    display: none;
}

.spv-fullscreen-active .spv-btn.spv-width-fit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.spv-btn.spv-fit img,
.spv-btn.spv-fit svg,
.spv-btn.spv-width-fit img,
.spv-btn.spv-width-fit svg {
    display: block;
    width: 43px;
    height: 20px;
    object-fit: contain;
}

.spv-btn.spv-fit svg,
.spv-btn.spv-width-fit svg {
    fill: currentColor;
}

.spv-btn.spv-download:hover,
.spv-btn:focus,
.spv-btn.spv-download:focus,
.spv-page-nav:focus{
  border-radius: 999px;
	background: var(--spv-icon-hover-bg, #fff);
	border-color: var(--spv-icon-hover-bg, #fff);
}

.spv-btn {
      appearance: none;
  border: 1px solid #c3c4c7;
  background: #fff;
  color: #1d2327;
  border-radius: 99px;
  min-width: 45px;
  height: 45px;
  padding: 0 0px;
  font: inherit;
    line-height: inherit;
  line-height: 30px;
  cursor: pointer;
}

.spv-btn:hover,
.spv-btn:focus-visible {
    border-color: var(--spv-icon-hover-bg, #fff);
    outline: none;
}

.spv-zoom-label {
    flex: 0 0 100%;
    min-width: 52px;
    text-align: center;
    font-size: 13px;
    color: #50575e;
}

.spv-viewer:fullscreen {
    width: 100vw;
    height: 100vh;
    max-width: none;
    background: #f0f0f1;
}

.spv-viewer:fullscreen.spv-slideshow-black-bg,
.spv-viewer.spv-fullscreen-active.spv-slideshow-black-bg {
    background: #000;
}

.spv-viewer:fullscreen .spv-stage {
    height: var(--spv-fullscreen-stage-height, calc(100dvh - var(--spv-fullscreen-toolbar-height, 106px)));
    max-height: none;
}


.spv-stage {
    width: 100%;
    height: var(--spv-height, 78vh);
    max-height: none;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: scroll;
    overscroll-behavior-x: contain;
    overscroll-behavior-y: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
    cursor: default;
    box-sizing: border-box;
}


.spv-is-zoomed .spv-stage {
    overflow-x: auto;
    cursor: grab;
    touch-action: none;
}

.spv-dragging .spv-stage {
    cursor: grabbing;
}

.spv-document {
    width: 100%;
    min-width: 0;
    min-height: 100%;
    padding: 10px 0px 0px;
    box-sizing: border-box;
	
}

.spv-is-zoomed .spv-document {
    width: max-content;
    min-width: 100%;
}

.spv-page {
    position: relative;
    margin: 0 auto 12px;
    background: #fff;
    box-shadow: 0 1px 5px rgba(0,0,0,.18);
    flex: 0 0 auto;
    overflow: hidden;
}

.spv-page canvas {
    display: block;
    max-width: none !important;
    height: auto;
}


.spv-annotation-link {
    position: absolute;
    display: block;
    z-index: 30;
    pointer-events: auto !important;
    cursor: pointer !important;
    touch-action: manipulation;
    background: transparent;
    text-decoration: none;
}

.spv-annotation-link:hover,
.spv-annotation-link:focus-visible,
.spv-text-layer .spv-text-url,
.spv-text-layer .spv-text-url:hover,
.spv-text-layer .spv-text-url:focus-visible {
    cursor: pointer !important;
}

.spv-text-layer .spv-text-url {
    pointer-events: auto;
}

.spv-text-layer {
    position: absolute;
    inset: 0;
    overflow: hidden;
    opacity: 1;
    line-height: 1;
    text-align: initial;
    text-size-adjust: none;
    forced-color-adjust: none;
    transform-origin: 0 0;
    user-select: text;
    -webkit-user-select: text;
    z-index: 2;
}

.spv-text-layer :is(span, br) {
    position: absolute;
    color: transparent;
    white-space: pre;
    cursor: text;
    transform-origin: 0% 0%;
    user-select: text;
    -webkit-user-select: text;
    -webkit-touch-callout: default;
}

.spv-text-layer span::selection {
    background: rgba(0, 100, 255, .28);
}

.spv-dragging .spv-text-layer,
.spv-dragging .spv-text-layer * {
    user-select: none;
    -webkit-user-select: none;
}

.spv-loading,
.spv-error {
    padding: 30px 18px;
    text-align: center;
    color: #50575e;
}

@media (max-width: 782px) {
    .spv-stage {
        height: var(--spv-height, 78vh);
        max-height: none;
        min-height: 0;
    }

    .spv-viewer:fullscreen .spv-stage {
        height: var(--spv-fullscreen-stage-height, calc(100dvh - var(--spv-fullscreen-toolbar-height, 62px)));
        max-height: none;
    }
}

.spv-fullscreen {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.spv-fullscreen img,
.spv-fullscreen svg {
    display: block;
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.spv-fullscreen svg {
    fill: currentColor;
}

.spv-fullscreen-exit-icon {
    display: none;
}

.spv-viewer:fullscreen .spv-fullscreen-enter-icon {
    display: none;
}

.spv-viewer:fullscreen .spv-fullscreen-exit-icon {
    display: inline-flex;
}

/* Fullscreen toolbar collapse control */
.spv-toolbar {
    position: relative;
}

.spv-toolbar-toggle {
    display: none;
    appearance: none;
    position: absolute;
    left: 50%;
    top: -38px;
    transform: translateX(-50%);
    width: 76px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #fff;
    cursor: pointer;
    z-index: 4;
}

.spv-toolbar-toggle span {
    display: block;
    width: 16px;
    height: 16px;
    margin: 4px auto 0;
    border-right: 2px solid #000;
    border-bottom: 2px solid #000;
    transform: rotate(45deg);
    transition: transform 1s ease;
}

.spv-toolbar-toggle:hover,
.spv-toolbar-toggle:focus{
  background-color: #fff;
	box-shadow: none;
}

.spv-fullscreen-active {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    max-width: none;
    background: #f0f0f1;
}

.spv-fullscreen-active .spv-toolbar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    margin-top: 0;
    transition: transform 1s ease;
}

.spv-fullscreen-active .spv-toolbar-toggle {
    display: block;
}

.spv-fullscreen-active .spv-stage {
    height: var(--spv-fullscreen-stage-height, calc(100dvh - var(--spv-fullscreen-toolbar-height, 106px)));
    max-height: none;
    min-height: 0;
    transition: height 1s ease;
}

.spv-fullscreen-active.spv-toolbar-collapsed .spv-toolbar {
    transform: translateY(100%);
}

.spv-fullscreen-active.spv-toolbar-collapsed .spv-toolbar-toggle span {
    transform: rotate(225deg);
}

.spv-fullscreen-active.spv-toolbar-collapsed .spv-stage {
    height: var(--spv-fullscreen-stage-height, 100dvh);
}

.spv-fullscreen-active .spv-fullscreen-enter-icon {
    display: none;
}

.spv-fullscreen-active .spv-fullscreen-exit-icon {
    display: inline-flex;
}

.spv-viewer.spv-fullscreen-active:not(:fullscreen) {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    overflow: hidden;
}

@supports not (height: 100dvh) {
    .spv-fullscreen-active,
    .spv-fullscreen-active.spv-toolbar-collapsed .spv-stage {
        height: 100vh;
    }
    .spv-fullscreen-active .spv-stage {
        height: calc(100vh - var(--spv-fullscreen-toolbar-height, 106px));
    }
}

/* Print, download, fullscreen page navigation and slideshow */
.spv-btn.spv-print,
.spv-btn.spv-download,
.spv-btn.spv-slideshow,
.spv-btn.spv-thumbnails {
    margin: 10px 0 0;
}

.spv-btn.spv-print,
.spv-btn.spv-download,
.spv-btn.spv-slideshow,
.spv-btn.spv-thumbnails,
.spv-page-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.spv-btn.spv-print img,
.spv-btn.spv-print svg,
.spv-btn.spv-download img,
.spv-btn.spv-download svg,
.spv-btn.spv-slideshow img,
.spv-btn.spv-slideshow svg,
.spv-btn.spv-thumbnails img,
.spv-btn.spv-thumbnails svg,
.spv-page-nav img,
.spv-page-nav svg {
    display: block;
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.spv-btn.spv-print svg,
.spv-btn.spv-download svg,
.spv-btn.spv-slideshow svg,
.spv-btn.spv-thumbnails svg,
.spv-page-nav svg {
    fill: currentColor;
}

.spv-btn.spv-download {
    text-decoration: none;
}

.spv-btn.spv-slideshow {
    display: none;
}

.spv-pause-icon {
    display: none;
}

.spv-fullscreen-active .spv-btn.spv-slideshow {
    display: inline-flex;
}

.spv-fullscreen-active.spv-slideshow-playing .spv-play-icon {
    display: none;
}

.spv-fullscreen-active.spv-slideshow-playing .spv-pause-icon {
    display: inline-flex;
}

.spv-page-nav {
    display: none;
    appearance: none;
    position: fixed;
    top: calc((100dvh - var(--spv-fullscreen-toolbar-height, 106px)) / 2);
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    padding: 0;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: 99px;
    background: rgba(255,255,255,.88);
    color: #1d2327;
    cursor: pointer;
    z-index: 15;
}

.spv-page-prev { left: 20px; }
.spv-page-next { right: 20px; }

.spv-fullscreen-active .spv-page-nav {
    display: inline-flex;
}

.spv-fullscreen-active.spv-toolbar-collapsed .spv-page-nav {
    top: 50dvh;
}

.spv-single-page .spv-page-nav,
.spv-single-page .spv-btn.spv-slideshow,
.spv-single-page .spv-btn.spv-thumbnails,
.spv-single-page .spv-thumbnails-popup {
    display: none !important;
}

.spv-slide-fading {
    opacity: 0;
}

/* During fullscreen slideshow only the active PDF page may be visible.
   Hidden pages keep their layout space so existing page navigation remains unchanged. */
.spv-fullscreen-active.spv-slideshow-playing .spv-page:not(.spv-slideshow-current) {
    visibility: hidden;
}

.spv-print-frame {
    position: fixed !important;
    width: 1px !important;
    height: 1px !important;
    right: 0 !important;
    bottom: 0 !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

@supports not (height: 100dvh) {
    .spv-page-nav {
        top: calc((100vh - var(--spv-fullscreen-toolbar-height, 106px)) / 2);
    }
    .spv-fullscreen-active.spv-toolbar-collapsed .spv-page-nav {
        top: 50vh;
    }
}

/* Fullscreen slideshow progress */
.spv-slideshow-progress {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    z-index: 2147483647;
    pointer-events: none;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.spv-slideshow-progress svg {
    display: block;
    width: 40px;
    height: 40px;
    overflow: visible;
    transform: rotate(-90deg);
    pointer-events: none;
}

.spv-slideshow-progress-track,
.spv-slideshow-progress-value {
    fill: none;
    stroke-width: 3px;
}

.spv-slideshow-progress-track {
    stroke: rgba(204, 0, 0, .18);
}

.spv-slideshow-progress-value {
    stroke: #cc0000;
    stroke-linecap: round;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
}

.spv-fullscreen-active.spv-slideshow-playing .spv-slideshow-progress {
    display: block;
    pointer-events: auto !important;
    cursor: pointer;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
}

.spv-fullscreen-active.spv-slideshow-playing .spv-slideshow-progress-value {
    animation: spv-slideshow-progress var(--spv-slideshow-cycle, 6s) linear infinite;
}

.spv-fullscreen-active.spv-slideshow-playing.spv-slideshow-paused .spv-slideshow-progress-value {
    animation-play-state: paused;
}

.spv-single-page .spv-slideshow-progress {
    display: none !important;
}

@keyframes spv-slideshow-progress {
    from { stroke-dashoffset: 100; }
    to { stroke-dashoffset: 0; }
}


/* Slideshow auto-hide controls */
.spv-fullscreen-active .spv-toolbar,
.spv-fullscreen-active .spv-page-nav {
    opacity: 1;
    transition: opacity .5s ease, transform 1s ease;
}

.spv-fullscreen-active.spv-slideshow-playing.spv-slideshow-ui-hidden .spv-toolbar,
.spv-fullscreen-active.spv-slideshow-playing.spv-slideshow-ui-hidden .spv-page-nav {
    opacity: 0;
    pointer-events: none;
}

/* Zoomed fullscreen single-click/tap control visibility */
.spv-fullscreen-active.spv-zoom-ui-hidden:not(.spv-slideshow-playing) .spv-toolbar,
.spv-fullscreen-active.spv-zoom-ui-hidden:not(.spv-slideshow-playing) .spv-page-nav {
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity .5s ease, transform 1s ease;
}


/* Page thumbnails popup */
.spv-thumbnails-popup {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: var(--spv-height, 78vh);
    z-index: 40;
    box-sizing: border-box;
    padding: 20px;
    overflow: auto;
    background: rgba(240,240,241,.98);
    -webkit-overflow-scrolling: touch;
}

.spv-thumbnails-popup[hidden] {
    display: none !important;
}

.spv-fullscreen-active .spv-thumbnails-popup {
    height: var(--spv-fullscreen-stage-height, 100dvh);
}

.spv-thumbnails-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.spv-thumbnail-item {
    appearance: none;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 10px;
    border: 2px solid #fff;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    overflow: hidden;
}

.spv-thumbnail-item:hover,
.spv-thumbnail-item:focus-visible {
    border-color: #2271b1;
    outline: none;
	background-color: #fff;
}

.spv-thumbnail-item.is-active,
.spv-thumbnail-item.is-active:hover,
.spv-thumbnail-item.is-active:focus-visible {
    border: 2px solid #f00 !important;
}

.spv-thumbnail-item canvas {
    display: block;
    width: 100% !important;
    height: auto !important;
    max-width: 180px;
    box-shadow: 0 1px 5px rgba(0,0,0,0);
	border-radius: 6px;
}

.spv-thumbnail-number {
    position: absolute;
    right: 8px;
    bottom: 8px;
    min-width: 24px;
    height: 24px;
    padding: 0 5px;
    border-radius: 12px;
    background: rgba(0,0,0,.72);
    color: #fff;
    font-size: 12px;
    line-height: 24px;
    text-align: center;
    box-sizing: border-box;
}

/* Fullscreen slideshow: use the entire stage for the active page. */
.spv-fullscreen-active.spv-slideshow-playing .spv-document {
    padding-top: 0;
}
.spv-fullscreen-active.spv-slideshow-playing .spv-page {
    margin-bottom: 0;
}


/* Configurable icon hover colors */
.spv-custom-svg-icon {
    display: block;
    width: 18px;
    height: 18px;
    background-color: currentColor;
    -webkit-mask-image: var(--spv-icon-url);
    mask-image: var(--spv-icon-url);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.spv-btn.spv-fit .spv-custom-svg-icon,
.spv-btn.spv-width-fit .spv-custom-svg-icon {
    width: 43px;
    height: 20px;
}

.spv-fullscreen .spv-custom-svg-icon,
.spv-page-nav .spv-custom-svg-icon,
.spv-btn.spv-print .spv-custom-svg-icon,
.spv-btn.spv-download .spv-custom-svg-icon,
.spv-btn.spv-slideshow .spv-custom-svg-icon,
.spv-btn.spv-thumbnails .spv-custom-svg-icon {
    width: 18px;
    height: 18px;
}

.spv-btn:hover,
.spv-btn:focus-visible,
.spv-page-nav:hover,
.spv-page-nav:focus-visible {
    color: var(--spv-icon-hover-color, #2271b1);
    background-color: var(--spv-icon-hover-bg, #ffffff);
}
