body {
  background-color: white;
  font-family: "Open Sans";
  margin: 0;
}

h1 {
  text-align: left;
  margin-bottom: 0;
  margin-top: 0;
  font-family: "Eczar";
  font-style: normal;
  font-weight: 500;
  font-size: 28px;
  padding: 5px 0 0 10px;
}

h2 {
  font-family: "Eczar";
}

.text-container {
  padding-bottom: 20px;
  padding-left: 100px;
  padding-right: 100px;
}

#papyri-info {
  position: relative;
}

#imageContainer {
  /* width: 100%; */
  /* background-image: linear-gradient(45deg, #fff 25%, transparent 25%), linear-gradient(-45deg, #fff 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #fff 75%), linear-gradient(-45deg, transparent 75%, #fff 75%); */
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
  position: relative;
  margin: auto;
  height: 75vh;
}

#imageContainer img {
  width: auto;
  position: absolute;
  display: block;
  object-fit: fill;
  z-index: 0;
}

/* #imageContainer img.background { */
/*     width: 100%; */
/* } */

#frontImage {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
}

#backImage {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  transform: scaleX(-1);
}

label {
  display: inline-block;
}

.rotate-handle {
  position: absolute;
  width: 20px;
  height: 20px;
  background-repeat: no-repeat;
  background-size: 100%;
  cursor: pointer;
  z-index: 1000;
  border: 1px solid black;
  transform: translate(-50%, -50%); /* Added to center the handle */
  top: 10px; /* Move the handle down by 5 pixels */
  left: 50%; /* Position at the middle of the selected image */
}

.background {
  pointer-events: none;
}

.navbar {
  list-style-type: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: #a5243d;
  font-size: 14px;
}

.navbar-item {
  float: left;
}

.navbar-item a {
  display: block;
  color: white;
  text-align: center;
  padding: 7px 30px;
  text-decoration: none;
  font-family: "Open Sans";
}

.navbar-item a:hover {
  background-color: #631524;
}

#content {
  position: relative;
  margin: 20px;
}

button,
label,
select {
  font-family: "Open Sans";
}

.buttonContainer {
  width: min(24vw, 300px);
}

button {
  background-color: white;
  border-radius: 5px;
  padding: 6px;
  margin: 0 5px 5px 0;
  font-size: min(14px, 1vw);
}

button:hover {
  box-shadow: 0 5px 5px 0 rgba(0, 0, 0, 0.13), 0 17px 30px 0 rgba(0, 0, 0, 0.07);
}

button:active {
  background-color: #ddd;
  transform: translateY(3px);
}

#options {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 20px;
  justify-content: flex-start;
  font-size: min(14px, 1vw);
  margin-bottom: 10px;
}

#options > * {
  padding-right: 20px;
  border-right: solid black 3px;
  height: 6em;
}

#documentSelectorContainer,
#itemSelectorContainer {
  display: flex;
  justify-content: space-between;
  flex-direction: row;
}

select {
  font-size: min(12px, 1vw);
  width: 12em;
  margin-bottom: 10px;
}

#selectorContainer {
  width: min(28vw, 450px);
}

#checkboxContainer {
  display: flex;
  flex-direction: column;
  width: min(18vw, 230px);
}

#enableAnimateContainer,
#showBackgroundContainer {
  display: flex;
  justify-content: space-between;
  flex-direction: row;
}
.howtouse {
  position: relative;
  text-align: center;
  background-color: #a5243d;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 14px;
  line-height: 26px;
  margin-bottom: 3px;
}

.howtouse:before {
  content: "?";
  font-weight: bold;
  color: #fff;
}

.howtouse:hover p {
  display: block;
  transform-origin: 100% 0%;

  -webkit-animation: fadeIn 0.3s ease-in-out;
  animation: fadeIn 0.3s ease-in-out;
  background-color: white;
  z-index: 999;
}

#headerContainer {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 15px;
}

.howtouse p {
  display: none;
  text-align: left;
  background-color: white;
  padding: 20px;
  width: 300px;
  position: absolute;
  border-radius: 3px;
  left: 50px;
  top: -30px;
  color: black;
  border-style: solid;
  border-color: black;
  font-size: 13px;
  line-height: 1.4;
}

@-webkit-keyframes fadeIn {
  0% {
    opacity: 0;
    transform: scale(0.6);
  }

  100% {
    opacity: 100%;
    transform: scale(1);
  }
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 100%;
  }
}

#background {
  pointer-events: none;
}

.loader {
  display: inline-block;
  border: 5px solid #f3f3f3; /* Light grey */
  border-top: 5px solid #3498db; /* Blue */
  border-radius: 50%;
  width: 0.5em;
  height: 0.5em;
  margin: 10px;
  margin-bottom: 0px;
  animation: spin 0.5s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.enhanceCloseButton {
  position: absolute;
  opacity: 0.8;
  color: red;
  font-size: 4em;
  text-shadow: -1px -1px 0 white, 1px -1px 0 white, -1px 1px 0 white, 1px 1px 0 white;
  vertical-align: top;
  line-height: 1em;
}

.enhanceCloseButton:hover {
  opacity: 1;
}

#timeline {
  height: 50%;
}

#metadata-fragment {
  overflow: auto;
  width: 20em;
  height: 6em;
  font-size: max(10px, min(1vw, 14px));
}
