main {
  padding: 16px;
}

main a {
  text-decoration: none;
  color: #604080;
}

/*class for tables with inputs like create- and update-endpoints.*/
.input-form {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.input-form table {
  border-collapse: collapse;
  margin-top: 16px;
  margin-bottom: 16px;
}

.input-form th,
.input-form tr,
.input-form td {
  height: 36px;
  padding: 6px 16px;
}

.input-form tr:nth-child(odd) {
  background-color: #f1f1f1;
}

.input-form input,
.input-form select {
  width: 100%;
  float: right;
  font-family: inherit;
  font-size: 1rem;
  padding: 2px;
  border: 1px solid #00000099;
  border-radius: 5px;
  background-color: transparent;
}

input:disabled,
select:disabled {
  opacity: 0.5;
}

input:focus,
select:focus {
  outline: none;
  box-shadow: #a080c0 0px 0px 0px 2px;
}

/*hides the default checkboxes and creates the nice one with purple input.*/
input[type="checkbox"] {
  float: right;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  background-color: transparent;
  border: 1px solid black;
  border-radius: 4px;
  display: grid;
  place-content: center;
}

input[type="checkbox"]::before {
  content: "";
  width: 24px;
  height: 24px;
  background-color: #604080;
  border: 1px solid #604080;
  border-radius: 4px;
  transform: scale(0);
  transition: 120ms transform ease-in-out;
}

input[type="checkbox"]:checked::before {
  transform: scale(.6);
}

input[type="checkbox"]:disabled {
  opacity: 0.5;
}

/*class for tables without inputs like list- and view-endpoints.*/
.list-style {
  width: 100%;
  margin: 16px auto;
  border-collapse: collapse;
}

.list-style th,
.list-style tr,
.list-style td {
  height: 36px;
  padding: 6px 16px;
  text-align: left;
}

.list-style tr:nth-child(odd) {
  background-color: #f1f1f1;
}

.list-style th {
  background-color: #bfbfbf;
}

/* class for all buttons on bottom of sites to align proper. */
.button-alignment {
  display: inline-flex;
  flex-direction: row;
  justify-content: flex-end;
  gap: 8px;
}

/*class for the image-checkboxes in fieldsets like casting-process and materials.*/
.image-checkbox {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: flex-start;
  padding: 16px;
}

.image-checkbox input[type="checkbox"] {
  display: none;
}

.image-checkbox label {
  width: 150px;
  height: 225px;
  box-shadow: #604080 0px 0px 0px 2px;
  border-radius: 4px;
  opacity: 0.5;
  filter: saturate(0%);
}

.image-checkbox img {
  width: 150px;
  height: 225px;
  border-radius: 8px;
  padding: 4px;
  position: relative;
}

.image-checkbox input[type="checkbox"]:checked + label {
  width: 150px;
  height: 225px;
  opacity: 1;
  filter: saturate(100%);
}

/* class for the menu that appears directly below the header*/
.page-menu {
  display: flex;
  border: 2px solid #e3e3e3;
  margin: 16px;
  align-items: center;
  justify-content: center;
}

.page-menu-buttons {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  padding-right: 16px;
}

.page-menu-breadcrumb {
  display: block;
  margin-right: auto;
  background-color: #f1f1f1 ;
  padding: 16px;
}

fieldset {
  border: 2px solid #e3e3e3;
  margin-top: 16px;
  margin-bottom: 16px;
}

fieldset legend {
  margin-left: 24px;
  padding: 0px 16px 0px 16px;
  font-weight: bold;
}

/* Enables groups of form input elements to be hidden by a checkbox. */
tr:has(input[type="checkbox"].toggle_hidden_if:checked) ~ tr:has(input.hidden_if) {
  display: none;
}

/* style for all of the info endpoints. */
.info-page {
  display: flex;
  flex-direction: column;
  padding: 32px 64px 32px 64px;
}

.info-page h1 {
  text-align: left;
  font-size: 30px;
  margin-bottom: 16px;
}

.info-page h2 {
  font-size: 22px;
  text-align: left;
  margin-bottom: 4px;
  margin-top: 16px;
}

.info-page h3 {
  text-align: left;
  margin-bottom: 4px;
  margin-top: 16px;
}

.info-page ul {
  list-style-type: square;
  list-style-position: inside;
  margin-bottom: 8px;
  padding-left: 16px;
}

.info-page ul li {
  padding: 4px 0px 4px 0px;
}

.info-page li::marker {
  color: #604080;
}

.info-page img {
  width: 35%;
  padding: 16px 0px 16px 0px;
}

.info-page table {
  border-collapse: collapse;
  outline: 2px solid #e3e3e3;
  margin-top: 16px;
  margin-bottom: 16px;
}

.info-page th, 
.info-page tr,
.info-page td {
  width: 50%;
  padding: 8px;
  text-align: left;
  vertical-align: bottom;
}

.info-page tr:nth-child(odd) {
  background-color: #f1f1f1;
}


