body {
  margin: 1vh 1vw;
  background-color: #ffffff;
  /* max-height: 100vh; */
}
h1 {
  cursor: pointer;
}
ul,
fieldset,
legend {
  border: 1px solid;
  background-color: #ffffff;
}
ul {
  padding: 0;
  font-family: monospace;
}
li,
legend {
  list-style-type: none;
  padding: 0.2em 0.5em;
  background-color: #ACE1AF;
}
li:nth-of-type(even) {
  background-color: inherit;
}

/* Adjust labels and input in header form */
#inventory-form fieldset p {
    display: flex;
    flex-direction: column;
    margin: 3px;
}

/* Saved inventory li style */
.savedinv {
  display: flex;
  justify-content: space-between;
}
.savedinv a {
  margin: 0 5px;
  text-decoration: underline;
  cursor: pointer;
}

/* Fix height of rows form */
.rows-fieldset {
  max-height: 50vh;
  overflow-y: auto;
}

/* Custom row style */
.inv-row{
  border-radius: 5px;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 10px;
}
.inv-row input {
  margin: 2px;
}
.inv-row select {
  margin: 2px;
}
.inv-row:nth-of-type(even){
  background-color: #D5D4D4;
}
.inv-row:nth-of-type(odd){
  background-color: #F5F5F5;
}
/* Place the label up to the input el */
.input-group {
  display: flex;
  flex-direction: column;
  flex: 1 1 0; /* allows the inputs to grow and shrink evenly */
  min-width: 150px; /* optional minimum width */
}

/* Define the selected row background color */
.selected {background-color: #93E7FC !important;}

.autocomplete {
  /*the container must be positioned relative:*/
  position: relative;
  display: inline-block;
}

.autocomplete-items {
  position: absolute;
  border: 1px solid #d4d4d4;
  border-bottom: none;
  border-top: none;
  z-index: 99;
  /*position the autocomplete items to be the same width as the container:*/
  top: 100%;
  left: 0;
  right: 0;
}

.autocomplete-items div {
  padding: 10px;
  cursor: pointer;
  background-color: #ffffff;
  border-bottom: 1px solid #d4d4d4;
}

.autocomplete-items div:hover {
  /*when hovering an item:*/
  background-color: #e9e9e9;
}
.autocomplete-active {
  /*when navigating through the items using the arrow keys:*/
  background-color: DodgerBlue !important;
  color: #ffffff;
}

/* Image panel */
.img-container {
  background-color: #d4d4d4;
  border: 2px solid black;
  border-radius: 5px;
  font-size: 1.3em;
  /* Centering the div */
  /* height/2 + padding-top + top = 50vh */
  height: 60vh;
  padding: 5vh 5vw;
  top: 15vh;
  /* width/2 + padding-lef + left = 50vw */
  width: 86vw;
  left: 2vw;

  position: absolute;
  overflow: auto;
  z-index: 5;
}

.img-container-controlls {
  display: flex;
  justify-content: space-around;
}

.img-preview {
  border: 2px dashed grey;
  border-radius: 5px;
  margin: auto;
  padding: 5px;
}

.img-preview p {
  display: flex;
  align-items: center;
  justify-content: space-around;
  font-size: 0.8em;
}

.img-preview img {
  display: block;
  height: auto;
  margin: auto;
  width: 40vw;
}

/* Fake button */
/* Hide an input element (transparent 100%) */
/* Put then a 'fake' button with custom style */
/* When the user taps the button first input will be clicked. */
.fakebtn-container {
  position: relative;
}

/* Displayed button (style to show) */
.fakebtn {
  position: absolute;
  top: 0px;
  left: 0px;
  width: 100%;
  z-index: 1;
}

.fakebtn button {
  padding: 3px 10px;
  background-color: white;
  border-radius: 5px;
  border: none;
  appearance: none;
  text-decoration: none;
  color: black;
  font-weight: 400;
}

/* Input file type*/
.transparent {
  position: relative;
  opacity: 0;
  width: 100%;
  z-index: 2;
}

/* Put a div below the add image box to block the app */
.block-app-div {
  background-color: #0009;
  width: 100vw;
  height: 100vh;
  padding: 0;
  margin: 0;
  position: fixed;
  top: 0;
  left: 0;
}

/* Cross to close styling */
.cross-to-close {
  position: relative;
  top: -4%;
  left: -3%;
}

.cross-to-close span {
  color: black;
  cursor: pointer;
  font-family: monospace;
  font-weight: bold;
  font-size: 1.4em;
}

/* Bottom container with logos */
.copyright-box {
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: 100%;
  margin: 10vh auto;
}

/* Info tooltip button next to the rows fieldset */
.tooltip {
    font-family: monospace;
    background-color: black;
    border-radius: 50%;
    padding: 0.3vh 0.9vw;
    color: white;
    margin-left: 1vw;
}

/* Tooltip menu core functionalities */
/* Raul Barrera https://codepen.io/raubaca/pen/PZzpVe */
.tab {
  position: relative;
}
.tab input {
  position: absolute;
  opacity: 0;
  z-index: -1;
}
.tab__content {
  max-height: 0;
  overflow: scroll;
  transition: all 0.35s;
}
.tab input:checked ~ .tab__content {
  max-height: 10rem;
}

/* Visual styles */
.accordion {
  color: #2b2d42;
  border: 2px solid;
  border-radius: 0.5rem;
  overflow: hidden;
}
.tab__label,
.tab__close {
  display: flex;
  color: white;
  background: #2b2d42;
  cursor: pointer;
}
.tab__label {
  justify-content: space-between;
  padding: 0.5rem;
}
.tab__label::after {
  content: "\276F";
  width: 1em;
  height: 1em;
  text-align: center;
  transform: rotate(90deg);
  transition: all 0.35s;
}
.tab input:checked + .tab__label::after {
  transform: rotate(270deg);
}
.tab__content p {
  margin: 0;
  padding: 1rem;
}
.tab__close {
  justify-content: flex-end;
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
}

/* Arrow animation */
.tab input:not(:checked) + .tab__label:hover::after {
  animation: bounce .5s infinite;
}
@keyframes bounce {
  25% {
    transform: rotate(90deg) translate(.25rem);
  }
  75% {
    transform: rotate(90deg) translate(-.25rem);
  }
}

/* Tooltip tables style */
/* Rizky https://codepen.io/rzkytmgr/pen/oNXVGoP */
.table-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 30vh;
}

table {
  border-collapse: collapse;
  background-color: white;
  overflow: hidden;
  width: 500px;
  border-radius: 10px;
}

th, td {
  font-family:'Motnserrat',sans-serif;
  text-align: left;
  font-size: 12px;
  padding: 10px;
}

th {
  background-color: #5f638b;
  color: white;
}