header {
  width: 100%;
  & h1 {
    text-align: center;
  }
  border-bottom: 1px solid #232323;
}

nav {
  max-width: 630px;
  margin: auto;

  & ul {
    display: flex;
    flex-direction: row;
    list-style: none;
    gap: 1em;

    & li {
      background: white;
      border: 1px solid #232323;
      padding: 0.5em;
      border-radius: 10px;

      & a {
        text-decoration: none;
        color: black;
      }
    }

    & li:has(a[aria-current="true"]) {
      background: black;

      & a {
        color: white;
      }
    }
  }
}

.binder {
  max-width: 630px;
  max-height: 900px;

  background: black;
  display: flex;
  margin: auto;
  margin-top: 1em;

  padding: 0.5em;
}

.controls {
  width: 630px;
  margin: auto;
  margin-top: 1em;
  display: flex;
  justify-content: space-between;

  & button {
    width: 45%;
    height: 50px;
    background: white;
    font-size: 1.3em;
    border: 1px solid black;
    border-radius: 5px;
    text-transform: uppercase;
    font-family: "Open Sans";
  }
}

.page {
  min-width: 630px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  grid-column-gap: 0px;
  grid-row-gap: 0px;
}

/* Card/notes flip animation is based on https://vanslaars.io/articles/create-a-card-flip-animation-with-css/ */
.slot {
  border: 1px solid #232323;
  max-height: 300px;
  max-width: 210px;
  display: flex;
  position: relative;

  & button {
    box-sizing: border-box;
    transition: transform 0.5s ease;
    position: absolute;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }
}

.slot img {
  max-width: 100%;
  max-height: 100%;
  margin: auto;
  border-radius: 5px;

  &.hidden {
    display: none;
  }
}

.slot .card-button {
  transform: perspective(1000px) rotateY(0deg);

  &.flipped {
    transform: perspective(1000px) rotateY(-180deg);
  }
}

.card-button {
  border: none;
  background: none;
  padding: 0;
  transform: perspective(1000px) rotateY(0deg);
}

img[src="/assets/missing.webp"] {
  max-width: 95%;
  max-height: 95%;
  filter: grayscale(100);
}

.missing-name {
  align-items: center;
  background: gray;
  color: white;
  display: flex;
  font-size: 1.5em;
  height: 40px;
  justify-content: center;
  position: absolute;
  text-align: center;
  top: 50%;
  width: 100%;
  z-index: 2;
}

.notes {
  position: absolute;
  color: black;
  padding: 1em;
  border: 1px solid black;
  margin: auto;
  min-height: 100%;
  min-width: 100%;
  max-width: 100%;

  display: flex;
  flex-direction: column;
  text-align: left;

  & h2 {
    font-size: 1.2em;
  }

  transform: perspective(1000px) rotateY(180deg);

  background-color: #ebf4ff;

  &.flipped {
    transform: perspective(1000px) rotateY(0deg);
  }
}

.slot-1,
.slot-10 {
  grid-area: 1 / 1 / 2 / 2;
}
.slot-2,
.slot-12 {
  grid-area: 1 / 2 / 2 / 3;
}
.slot-3,
.slot-13 {
  grid-area: 1 / 3 / 2 / 4;
}
.slot-4,
.slot-14 {
  grid-area: 2 / 1 / 3 / 2;
}
.slot-5,
.slot-15 {
  grid-area: 2 / 2 / 3 / 3;
}
.slot-6,
.slot-16 {
  grid-area: 2 / 3 / 3 / 4;
}
.slot-7,
.slot-17 {
  grid-area: 3 / 1 / 4 / 2;
}
.slot-8,
.slot-18 {
  grid-area: 3 / 2 / 4 / 3;
}
.slot-9,
.slot-19 {
  grid-area: 3 / 3 / 4 / 4;
}
