.tiff-viewer .hide {
    display: none !important;
}

.tiff-viewer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 345px;
    min-height: 200px;
    width: 100%;
    height: 100%;
    overflow: hidden;
    box-sizing: border-box;
    background-color: #525659;
    border: 2px solid #323639;
    color: whitesmoke;
    position: relative;
    font-family: system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue","Noto Sans","Liberation Sans",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";
}

.tiff-viewer .tiff-loading {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0,0,0,0.5);
    width: 100%;
    height: 100%;
    color: white;
}

.tiff-viewer .dialog-container {
    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(255,255,255,0.4);
    width: 100%;
    height: 100%;
}

.tiff-viewer .dialog-container .dialog-content {
    display: flex;
    flex-direction: column;
    background-color: white;
    color: black;
    max-width: 95%;
    max-height: 95%;
    padding: 1rem;
    overflow: auto;
    border-radius: 0.5rem;
    box-shadow: 0 .5rem 1rem rgba(0,0,0,.15);
}

.tiff-viewer .dialog-container .dialog-content h5.title {
    margin-bottom: 0;
    margin-top: 0;
    line-height: 1.5;
    font-size: 1.25rem;
}

.tiff-viewer .dialog-container .dialog-content .body {
    position: relative;
    flex: 1 1 auto;
    padding: 1rem 0;
}

.tiff-viewer .dialog-container .dialog-content.center {
    align-items: center;
    justify-content: center;
}

.tiff-viewer .tiff-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: .5rem;
    background-color: #323639;
    box-sizing: border-box;
}

.tiff-viewer .tiff-controls div.controls-left {
    display: flex;
    justify-content: center;
    align-items: center;
}

.tiff-viewer .tiff-controls div.controls-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.tiff-viewer .tiff-controls div.controls-right {
    display: flex;
    justify-content: center;
    align-items: center;
}

.tiff-viewer .tiff-controls input[type=text] {
    text-align: center;
    font-size: .8rem;
    background-color: black;
    border: none;
    color: whitesmoke;
    width: 5ch;
}

.tiff-viewer .tiff-controls input[type=text]:focus-visible {
    outline: none;
}

.tiff-viewer .tiff-controls input[type=text]:read-only {
    background-color: rgba(0,0,0,0) !important;
}

.tiff-viewer .tiff-controls button {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(255,255,255,0);
    border: none;
    color: whitesmoke;
    width: 1.8rem;
    height: 1.8rem;
    cursor: pointer;
    border-radius: 50%;
    margin: 0 5px;
}

.tiff-viewer .tiff-controls button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.tiff-viewer .tiff-controls button[name="expandtowidth"] svg {
    transform: rotate(90deg);
}

.tiff-viewer .tiff-controls span.page-sep {
    padding: 0 0 0 0.25rem;
    color: whitesmoke;
}

.tiff-viewer .tiff-controls div.ctrl-sep {
    border-left: 0.05em solid rgba(255,255,255,0.25);
    margin: auto 0.5rem;
    height: .8rem;
}

.tiff-viewer .tiff-pages {
    display: flex;
    flex-grow: 2;
    flex-direction: column; 
    overflow: auto;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
}

.tiff-viewer .tiff-pages.rotated-90 div.tiff-page {
    transform: rotate(-90deg);
}

.tiff-viewer .tiff-pages.rotated-180 div.tiff-page {
    transform: rotate(-180deg);
}

.tiff-viewer .tiff-pages.rotated-270 div.tiff-page {
    transform: rotate(-270deg);
}

.tiff-viewer .tiff-pages div.tiff-page {
    padding: 0 15px 15px 15px;
    margin: 0 auto 0 auto;
    min-width: 30%;
    max-width: 300%;
    box-sizing: border-box;
    text-align: center;
}

.tiff-viewer .numpage-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    background-color: white;
    color: black;
}

.tiff-viewer .tiff-pages div.tiff-page small.numpage {
    display: inline-block;
}

.tiff-viewer .tiff-pages div.tiff-page small.numpage::before {
    content: "Página ";
}

.tiff-viewer .tiff-pages div.tiff-page img {
    width: 100%;
}

.tiff-viewer .tiff-pages div.image-wrapper {
    border: 5px solid whitesmoke;
    -webkit-box-shadow: 0px 0px 20px 0px rgba(0,0,0,0.75);
    -moz-box-shadow: 0px 0px 20px 0px rgba(0,0,0,0.75);
    box-shadow: 0px 0px 20px 0px rgba(0,0,0,0.95);
}

.tiff-viewer div.tiff-progress {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    height: 0.3rem;
}

progress[value] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: none;
    width: 100%;
    height: 0.3rem;
    flex-grow: 1;
  }
  progress[value]::-webkit-progress-bar {
    background-color: #eee;
    border-radius: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25) inset;
  }
  progress::-webkit-progress-value {
      background: rgb(0,117,255); 
  }
  progress[value]::-moz-progress-bar { 
    background-color: rgb(0,117,255);
    border-radius: 0;
  }

  .lds-dual-ring {
    display: inline-block;
    width: 80px;
    height: 80px;
  }
  .lds-dual-ring:after {
    content: " ";
    display: block;
    width: 64px;
    height: 64px;
    margin: 8px;
    border-radius: 50%;
    border: 6px solid #fff;
    border-color: #fff transparent #fff transparent;
    animation: lds-dual-ring 1.2s linear infinite;
  }
  @keyframes lds-dual-ring {
    0% {
      transform: rotate(0deg);
    }
    100% {
      transform: rotate(360deg);
    }
  }