/* ----- general ----- */

/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type=number] {
  -moz-appearance: textfield;
}

/* ----- custom styles ----- */

.container {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: repeat(6, auto);
  gap: 10px;
}

.title_container {
  display: flex;
  justify-content: space-between;
}

.box {
  background-color: #F5F5F5;
  position: initial;
  padding: 1%;
  grid-row: auto;
  grid-column: 1;
}

.product_description {
  display: flex;
  justify-content: space-between;
}

.shapes {
  display: flex;
  justify-content: space-around;
}

.shape_container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  max-width: 90%;
}

.shape_label {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  border: 4px solid transparent;
}

.shape_img {
  justify-self: center;
  padding: 2%;
}

.shape_input:checked + .shape_label {
  border: 4px dashed #2C6AD1;
  border-radius: 6px;
}

.shape_input {
  position: fixed;
  opacity: 0;
  pointer-events: none;
}

.color_container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  row-gap: 35px;
}

.color {
  display: flex;
  justify-content: center;
}

.colors p {
  margin: 0 0 1%;
}

.color_label {
  padding: 4px;
  border: 4px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.color_label img {
  margin-bottom: 5px;
}

.color_input:checked + .color_label {
  border: 4px dashed #2C6AD1;
  border-radius: 6px;
}

.color_input {
  position: fixed;
  opacity: 0;
  pointer-events: none;
}

.measurement {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 30px;
}

.measurement_round {
  grid-template-rows: 1fr;
}

.measurement_hint p {
  margin: 0 0 1%;
}

.measurement.round {
  grid-template-rows: 1fr;
}

.option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}

.option label {
  font-size: 20px;
}

.option_input_container {
  display: flex;
  align-items: center;
}

.option img {
  margin: 5px 0;
}

.option_fields {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
}

.option_input {
  margin-left: 5px;
  width: 100px;
  height: 1.6em;
  font-size: 20px;
}

.option_input::placeholder {
  text-align: center;
  font-size: 20px;
}

.info_container {
  display: grid;
  grid-template-columns: 1fr 4fr;
  gap: 10px;
  align-items: end;
}

.info_input {
  width: 25%;
}

.p5_container {
  min-height: 380px;
  position: relative;
  top: 0;
}

.button_container {
  padding: 1%;
  display: flex;
  justify-content: flex-end;
  grid-row: -1;
}

.hide {
  display: none;
}

.js-collapsed {
  max-height: 1000px;
  opacity: 1;
  overflow: hidden;
  transition: max-height 500ms ease-in-out,
              opacity 500ms ease-in-out;
  
}

.js-collapsed.hidden {
  max-height: 0;
  opacity: 0;
}

.texture_undefined {
  background-color: white;
}

.error {
  border-color: red;
}

.error_straps {
  font-size: .8em;
  color: red;
  padding: 1em;
}

@media screen and (max-width: 1350px) {
  .product_description {
    flex-direction: column;
    align-items: center;
  }

  .color_container {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
  }
}

@media screen and (max-width: 1020px) {
  .color_container {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(4, 1fr);
  }

  .measurement {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 1fr);
  }

}

@media screen and (max-width: 800px) {
  .color_container {
    grid-template-columns: repeat(1, 1fr);
    grid-template-rows: repeat(8, 1fr);
  }

  .measurement {
    grid-template-columns: repeat(1, 1fr);
    grid-template-rows: repeat(auto, 1fr);
  }
}

@media screen and (max-width: 600px) { 
  .p5Canvas {
    width: 100%;
    height: auto;
  }

  .texture {
    width: 100%;
    height: auto;
  }
  
  .product_description_image {
    width: auto;
  }

  .product_description_image img {
    width: 100%;
    height: auto;
  }
}

@media screen and (max-width: 460px) {
  .shapes {
    flex-direction: column;
    align-items: center;
  }
}
