main {
  max-width: 520px;
  padding: 2.5rem;
  border: 1px solid #ddd;
  border-radius: 0 0 4px 4px;
  background: #fbfbfb;
  position: relative;
}

input, textarea {
  box-sizing: border-box;
  color: #444;
  border-radius: 4px;
  border: 1px solid #ccc;
  background-color: #fff;
  box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
}

input[type=file] {
  /* padding: 1rem 0 3rem;*/
  padding: 3rem 0;
  position: relative;
  left: -1px;
  text-align: center;
}

#form-add-item > label,
#mobile-label-choose-images {
  margin-top: 1.3rem;
  margin-bottom: -3px;
  z-index: 100;
  position: relative;
  font-weight: 500;
  color: #444;
  left: 3px;
}

label:nth-of-type(-n+2) {
  display: block;
}

textarea {
  width: 100%;
  padding: .9rem;
  resize: vertical;
  min-height: 5rem;
  max-height: 50vh;
}

input {
  transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
  padding: 6px 12px;
  line-height: 1.42857143;
  font-size: 1.2rem;
}


input[type=text] {
  width: 100%;
  box-sizing: border-box;
}

#label-price {
  display: inline-block;
  margin-right: 9px;
}


details {
  margin: 1.6rem 0 2rem;
}

details input[type=checkbox]{
  margin-right: 0;
}

h4 {
  margin-bottom: 1px;
}

#image-upload-background,
#image-upload {
  width: 100%;
  /* height: 30rem; */
  max-height: 25vh;
  /* min-height: 10rem; */
  cursor: pointer;
}

#image-upload-background {
  position: absolute;
  left 0;
  top: 0;
  box-sizing: border-box;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dotted #cfcfcf;
  border-radius: 2px;
  background: #fff;
}

#image-upload {
  /* opacity: 0;
  display: block; */
  margin-top: 2rem;
  z-index: 100;
  position: relative;
}

#preview button { display: block; margin: 0 auto 2rem; }

#preview {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  padding-top: 1rem;
}
#preview img {
  width: calc(33% - .5rem);
  height: 130px;
  object-fit: cover;
  box-sizing: border-box;
  margin-bottom: 1rem;
  background: #fff;
  padding: 10px;
  border: 1px solid #ddd; max-height: 30vh;
}


input[type=number] {
  padding-bottom: 4px;
  width: 6.5rem;
  padding-left: 7px;
}

.button {
  padding: 6px 12px;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 3px;
  font-size: .9rem;
}

.button.doit {
  color: #fff;
  background-color: #5cb85c;
  border-color: #4cae4c;
}

.button.doit:hover {
  background-color: #449d44;
  border-color: #398439;
}

nav ul {
  position: relative!important;
  text-align: center;
}

nav li {
  display: inline-block;
  margin: 0 6px;
}

#item-size-container {
  display: none;
  margin: .4rem 0 .4rem;
}

#pick-up-ok ~ * {
  display: none;
}

#pick-up-ok:checked + div {
  display: block;
}



#new-user-also h4 {
  margin-top: 42px;
  margin-bottom: 0;
}

#new-user-also h4 + p {
  margin-bottom: 10px;
  margin-top: 2px;
}

#page-item-edit img { max-width: 100%; max-height: 50vh; }


#page-items-create-multiple #still-uploading {
  display: none;
  text-align: center;
  margin-bottom: 0 auto 13vh;
  padding-top: calc( 2rem + 13vh);
  max-width: 40rem;
}

#page-items-create-multiple #info-lots-of-images {
  margin-bottom: 0
}

#page-items-create-multiple h1 {
  font-size: 1rem;
  display: block;

}



/* Wide screens, wide width */
@media screen and (min-device-width: 800px) and (min-width: 800px) and (min-height: 484px) {
  #go-to-add-item,
  #go-to-add-items {
    position: absolute;
    top: -2rem;
  }

  #go-to-add-item {
    left: 0;
  }
  #go-to-add-items {
    float: right;
    right: -2rem;
  }
}

#go-to-add-item:before {
  content: "← "
}
#go-to-add-items:after {
  content: " ⇾"
}

/* Mobile */
@media screen and (max-device-width: 800px) {

  body {
    margin: 0 0 1rem!important;
    padding: 0!important;
  }

  main {
    border: none!important;

  }

  #go-to-add-item,
  #go-to-add-items {
    font-size: 1.2rem;
    display: inline-block;
    top: -.5rem;
    position: relative;
  }

  #go-to-add-item {
    left: -.5rem;
  }
  #go-to-add-items {
    float: right;
    margin-left: -3rem;
    right: -.5rem;
  }

  #go-to-add-item + h1,
  #go-to-add-items + h1 {
    margin-top: 4.2rem;
    font-size: 1.3rem;
    text-align: center;
  }

  main {
    padding: 2rem;
  }

  textarea, input {
    font-size: 16px;
  }

  #label-price {
    display: block;
  }

  footer {
    margin: 0;
  }

  footer nav {
    position: relative!important;
  }
}


/* Narrow screen, and medium not mobile */
@media screen and (min-device-width: 801px) and (max-width: 700px),
(max-device-width: 800px) {

  #preview img {
    width: calc(50% - .5rem);
    height: 200px;
  }
}
