@page {
  width: 85.60mm;
  height: 53.98mm;
  margin: 0;
}

@media print {
  body {
    display: block;
  }
  div#input {
    display: none !important;
  }
  div#card {
    display: block;
  }
  div#card object {
    page-break-after: always;
  }
  select#vorlage {
    display: none !important;
  }
  div#backside {
    display: block !important;
  }
}

@font-face {
  font-display: swap; /* Check https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display for other options. */
  font-family: 'Days One';
  font-style: normal;
  font-weight: 400;
  src: url('fonts/days-one-v19-latin-regular.woff2') format('woff2'); /* Chrome 36+, Opera 23+, Firefox 39+, Safari 12+, iOS 10+ */
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body, div#photoControls {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  align-content: center;
}

body > div, div#photoControls > * {
  flex: 1 1 100%;
}

div#input {
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: center;
  align-content: center;
  height: 100vh;
}

div#input > div#form {
  flex: 0 0 auto;
  width: 100%;
}

div#input > div#photoContainer {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

input, select, textarea {
  box-sizing: border-box;
  border: 1px solid #888;
  width: 100%;
  font-size: 16pt;
}

textarea {
  resize: vertical;
}

select#camera option:first-child {
  font-style: italic;
}

video, img, div.croppr-container {
  width: 100%;
  height: 100%;
}

div.croppr-container {
  text-align: center;
}

video {
  display: none;
  max-height: max-content;
}

#autoComplete_list_1 {
  box-sizing: border-box;
  position: absolute;
  background: #ffffff;
  width: 50%;
  margin: 0;
  padding: 10px;
  font-size: 16pt;
  border: 1px solid #888;
  z-index: 999;
}

#autoComplete_list_1 li {
  margin: 0;
  padding: 4px 0;
  list-style: none;
  cursor: pointer;
}

div#card object {
  width: 100%;
}

div#backside {
  width: 85.60mm;
  height: 53.36mm; /* normally 53.98mm, but above this a page-break appears behind */
  box-sizing: border-box;
  padding: 4mm;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: space-between;
  gap: 4mm;
  transform-origin: 0 0;
  display: none;
  aspect-ratio: 1006 / 640;
}

div#backside > * {
  flex: 0 0 auto;
}

div#lostfound {
  width: 50%;
  font-family: 'Days One';
  font-size: 6pt;
}

div#lostfound .large {
  font-size: 8pt;
}

@media (orientation: portrait) {
  body, div#photoControls {
    flex-direction: column;
  }
  
  div#input, div#card {
    width: 100%;
  }
}

