* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

#container {
  height: 100vh;
  padding: 8px;

  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}

.form, .controls, .status {
  flex: none;
  display: flex;
  justify-content: center;
}

.controls.file-loader {
  flex-wrap: wrap;
  gap: 4px;
}

.controls.file-loader > * {
  flex: 0 0 auto;
}

.file-loader .file {
  width: 200px;
}

.file-loader .sample-images {
  width: 150px;
  text-overflow: ellipsis;
}

.file-loader .sample-images .empty {
  display: none;
}

.partial-load .slider-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.partial-load .slider {
  flex: 1;
  margin: 0;
}

.partial-load .percentage {
  flex: none;
  display: inline-block;
  width: 72px;
  height: 1.25rem;
  line-height: 1.25rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.partial-load .bytes {
  height: 1rem;
  line-height: 1rem;
  margin-top: 4px;
  text-align: right;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.image-container {
  flex: 1;
  position: relative;
  min-height: 0;
  overflow: auto;
}

.image-container.scale-down {
  overflow: hidden;
}

.image-container.scale-down > img {
  width: 100%;
  height: 100%;
  object-fit: scale-down;
}

.image-container > .error {
  display: none;
  position: absolute;
  inset: 0;
  padding: 8px;
  background-color: rgb(0 0 0 / 0.5);
  text-align: center;
  color: white;
}

.image-container > .error.show {
  display: block;
}

.image.loading {
  opacity: 0.5;
  transition: opacity 0.2s;
}

.footer {
  height: 1rem;
  line-height: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 0.8rem;
}

.footer .divider {
  width: 1px;
  height: 0.8rem;
  background-color: black;
}

