.lot-pdf [hidden] {
  display: none !important;
}

.lot-pdf__controls {
  align-items: center;
  background: #f5f6f8;
  border: 1px solid #d9dce5;
  color: #222;
  display: flex;
  flex-wrap: wrap;
  font-size: 14px;
  gap: 12px;
  justify-content: space-between;
  line-height: 1.4;
  padding: 12px;
}

.lot-pdf__navigation {
  align-items: center;
  display: grid;
  flex: 0 1 auto;
  gap: 8px;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-width: 0;
}

.lot-pdf__counter {
  font-variant-numeric: tabular-nums;
  line-height: 1;
  padding: 4px 8px 0;
  text-align: center;
  white-space: nowrap;
}

.lot-pdf__zoom {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  margin-left: auto;
}

.lot-pdf__controls button {
  align-items: center;
  background: #fff;
  border: 1px solid #223168;
  border-radius: 4px;
  color: #223168;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  gap: 6px;
  justify-content: center;
  line-height: 1;
  margin: 0;
  min-height: 44px;
  min-width: 44px;
  /* Compensate for the theme font's high baseline to visually center the text. */
  padding: 10px 12px 6px;
  white-space: nowrap;
}

.lot-pdf__button-icon {
  flex: 0 0 auto;
  font-size: 20px;
  line-height: 1;
}

.lot-pdf__zoom button {
  font-size: 20px;
  padding: 10px 6px 6px;
  width: 44px;
}

@media (hover: hover) {
  .lot-pdf__controls button:not(:disabled):hover {
    background: #223168;
    color: #fff;
  }
}

.lot-pdf__controls button:not(:disabled):active {
  background: #18234b;
  color: #fff;
}

.lot-pdf__controls button:disabled {
  cursor: default;
  opacity: 0.45;
}

.lot-pdf__controls button:focus-visible,
.lot-pdf__viewport:focus-visible {
  outline: 2px solid #223168;
  outline-offset: 2px;
}

.lot-pdf__viewport {
  background: #eee;
  max-height: 75vh;
  overflow: auto;
  padding: 12px;
}

.lot-pdf__viewport canvas {
  background: #fff;
  display: block;
  margin: 0 auto;
  max-width: none;
}

@media (max-width: 640px) {
  .lot-pdf__controls {
    gap: 8px;
  }

  .lot-pdf__navigation {
    flex-basis: 100%;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    width: 100%;
  }

  .lot-pdf__button-label {
    display: none;
  }

  .lot-pdf__navigation button {
    padding: 10px 6px 6px;
    width: 44px;
  }

  .lot-pdf__zoom {
    margin: 0 auto;
  }

  .lot-pdf__counter {
    white-space: normal;
  }
}
