@font-face {
  font-family: "Comic Sans";
  src: url("/fonts/comic.ttf") format("truetype");
  font-weight: normal;
  font-display: swap;
  font-style: normal;
}

@font-face {
  font-family: "Comic Sans";
  src: url("/fonts/comicbd.ttf") format("truetype");
  font-weight: bold;
  font-display: swap;
  font-style: normal;
}

@font-face {
  font-family: "Comic Sans";
  src: url("/fonts/comici.ttf") format("truetype");
  font-weight: normal;
  font-display: swap;
  font-style: italic;
}

@font-face {
  font-family: "Comic Sans";
  src: url("/fonts/comicz.ttf") format("truetype");
  font-weight: bold;
  font-display: swap;
  font-style: italic;
}

:root {
  --comic-sans: "Comic Sans MS", "Comic Sans", cursive, sans-serif;
  --serif: "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

body {
  text-align: center;
  background: #a8e1f2;
  margin: 0;
  padding: 12px;
  height: 100dvh;
  width: 100%;
  display: flex;
  flex-direction: column;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header > img {
  width: 70px;
}

h1 {
  font-family: var(--comic-sans);
  position: relative;
  color: #000;
  background: #fff;
  mix-blend-mode: multiply;
  overflow: hidden;
  font-weight: normal !important;

  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  padding: 2px 4px 6px;
  margin: -2px -4px -6px;
}
h1::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: -100%;
  background: white
    repeating-linear-gradient(
      90deg,
      #14ffe9 0%,
      #ffc800 16.66666%,
      #ff00e0 33.33333%,
      #14ffe9 50%
    );
  mix-blend-mode: screen;
  pointer-events: none;
  animation: move 1s linear infinite;
}

@keyframes move {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(50%);
  }
}

@supports not (mix-blend-mode: multiply) {
  h1 {
    -webkit-text-fill-color: transparent;
    background-clip: text !important;
    background: white
      repeating-linear-gradient(90deg, #14ffe9, #ffc800, #ff00e0, #14ffe9);
    text-shadow: none;
  }
  h1::before {
    content: none;
  }
}

main {
  flex: 1 1 0;
  max-height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

p {
  font-family: var(--serif);
  font-style: italic;
  color: blue;
  margin: 0;
}

#camera {
  width: 100%;
  aspect-ratio: 2/1;
}

.barcode-gifs {
  margin-top: 8px;
  display: flex;
  justify-content: space-evenly;
  width: 100%;
}
.barcode-gifs img {
  width: 130px;
}

footer {
  display: grid;
  grid-template: repeat(3, 15px) / repeat(3, 80px);
  grid-auto-flow: column;
  gap: 0px;
  justify-content: center;
  padding: 12px 0;
}
footer > img:nth-child(2) {
  grid-row: span 2 / span 2;
}
footer > img:last-child {
  grid-row: span 3 / span 3;
}

table {
  margin: 50px auto;
  border: 2px solid red;
  background-color: yellow;
}

.products {
  flex: 1 1 0;
  max-height: 100%;
  min-height: 0;
  list-style: none;
  padding: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.products > :not(:last-child) {
  padding-bottom: 2em;
  border-bottom: 8px dashed salmon;
  margin-bottom: 2em;
}

.products img {
  max-width: 70%;
}

.product-name {
  color: black;
  font-size: 1.3em;
}

.product-price {
  color: green;
  font-family: var(--comic-sans);
  font-size: 3em;
  margin-top: 0.2em;
}

.product-meta {
  color: black;
  font-size: 0.8em;
}

#back-button {
  background-color: magenta;
  color: white;
  border: none;
  padding: 0.5em 1em;
  font-size: 1.1em;
  font-family: var(--comic-sans);
  font-weight: bold;
  cursor: pointer;
}

.error-message {
  color: red;
  font-weight: bold;
  animation: spin 2s linear infinite;
}

.error-imgs {
  display: flex;
  justify-content: space-evenly;
  width: 100%;
}

.error-imgs img {
  width: 130px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
