@import url(./reset.css);

@font-face {
  font-family: gameboy;
  src: url("./font/BoldPixels.otf");
}

@font-face {
  font-family: fragile;
  src: url("./font/Fragile Bombers.otf");
}

body {
  height: 100vh;
  font-family: fragile;
}
header {
  background-color: #ef5350;
  display: flex;
  align-content: center;
  flex-wrap: wrap;
  justify-content: space-between;
  .title {
    width: fit-content;
    margin: 0;
    padding: 0.5rem 0;

    h1 {
      background: url(img/pokefutur.webp) 0 0 no-repeat;
      background-size: 400px;
      display: block;
      height: 150px; /* your image height */
      text-indent: -99999em;
      width: 400px; /* your image width */
      overflow: hidden;
      margin: 0 1rem;
    }
  }
  .search__result {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-content: center;
    .search__result__name {
      font-family: gameboy;
      font-size: 5rem;
      width: fit-content;
      margin: auto;
      color: darkslateblue;
    }
  }

  .search {
    font-size: 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-content: center;

    input {
      display: block;
      height: 4rem;
      padding: 0.5rem 1rem;
      margin: 0.5rem;
    }
  }
}

main {
  display: flex;
  height: calc(100vh - 150px - 1rem);
  background-color: rgb(211, 211, 211);

  nav {
    display: flex;
    flex-direction: column;
  }

  #pager {
    display: flex;
    align-content: center;
    flex-wrap: wrap;
    flex-direction: column;
    position: fixed;
    width: fit-content;
    margin: auto;
    padding: 1rem;
    background: linear-gradient(
      180deg,
      rgba(211, 211, 211, 1) 0%,
      rgba(211, 211, 211, 1) 80%,
      rgba(211, 211, 211, 0) 100%
    );
    height: 7rem;

    .navigation {
      display: flex;
      align-content: center;
      flex-wrap: wrap;
      justify-content: space-between;
      font-size: 2rem;
      font-weight: bold;

      & span {
        transition: transform 0.1s ease-out;

        &.enabled:hover {
          cursor: pointer;
          transform: scale(1.3);
        }

        &.disabled {
          color: dimgray;
        }
      }
    }
    .position {
      display: flex;
      align-content: center;
      flex-wrap: wrap;
      justify-content: space-between;
      width: 90px;

      font-size: 1.5rem;

      span {
        display: block;
        width: fit-content;
      }
    }
  }

  .species-list {
    min-height: calc(100vh - 150px - 1rem);
    overflow: scroll;
    display: flex;
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */

    .window {
      margin-top: 5rem;
      display: none;

      &.active {
        display: block;
      }
    }
    /* Hide scrollbar for Chrome, Safari and Opera */
    &::-webkit-scrollbar {
      display: none;
    }

    li {
      list-style: none;
      margin: 0 1rem;
      text-align: center;
      &.species {
        &:hover {
          cursor: pointer;
        }
      }
    }
  }

  #separator {
    display: block;
    width: 0.3rem;
    margin: 1rem 0;
  }

  .separator--black {
    background: linear-gradient(
      180deg,
      rgba(34, 49, 63, 0) 0%,
      rgba(34, 49, 63, 1) 5%,
      rgba(34, 49, 63, 1) 95%,
      rgba(34, 49, 63, 0) 100%
    );
  }
  .separator--blue {
    background: linear-gradient(
      180deg,
      rgba(83, 39, 240, 0) 0%,
      rgba(83, 39, 240, 1) 5%,
      rgba(83, 39, 240, 1) 95%,
      rgba(83, 39, 240, 0) 100%
    );
  }
  .separator--brown {
    background-color: #83580b;
    background: linear-gradient(
      180deg,
      rgba(131, 88, 11, 0) 0%,
      rgba(131, 88, 11, 1) 5%,
      rgba(131, 88, 11, 1) 95%,
      rgba(131, 88, 11, 0) 100%
    );
  }
  .separator--gray {
    background-color: gray;
  }
  .separator--green {
    background: linear-gradient(
      180deg,
      rgba(125, 216, 125, 0) 0%,
      rgba(125, 216, 125, 1) 5%,
      rgba(125, 216, 125, 1) 95%,
      rgba(125, 216, 125, 0) 100%
    );
  }
  .separator--pink {
    background: linear-gradient(
      180deg,
      rgba(255, 116, 140, 0) 0%,
      rgba(255, 116, 140, 1) 5%,
      rgba(255, 116, 140, 1) 95%,
      rgba(255, 116, 140, 0) 100%
    );
  }
  .separator--purple {
    background: linear-gradient(
      180deg,
      rgba(163, 80, 239, 0) 0%,
      rgba(163, 80, 239, 1) 5%,
      rgba(163, 80, 239, 1) 95%,
      rgba(163, 80, 239, 0) 100%
    );
  }
  .separator--red {
    background: linear-gradient(
      180deg,
      rgba(239, 83, 40, 0) 0%,
      rgba(239, 83, 40, 1) 5%,
      rgba(239, 83, 40, 1) 95%,
      rgba(239, 83, 40, 0) 100%
    );
  }
  .separator--white {
    background: linear-gradient(
      180deg,
      rgba(255, 255, 255, 0) 0%,
      rgba(255, 255, 255, 1) 5%,
      rgba(255, 255, 255, 1) 95%,
      rgba(255, 255, 255, 0) 100%
    );
  }
  .separator--yellow {
    background: linear-gradient(
      180deg,
      rgba(255, 213, 0, 0) 0%,
      rgba(255, 213, 0, 1) 5%,
      rgba(255, 213, 0, 1) 95%,
      rgba(255, 213, 0, 0) 100%
    );
  }

  #species-details {
    position: relative;
    width: 100%;
    overflow: scroll;
    .species-details {
      display: none;
      height: calc(100% - 2rem);
    }
    .species-details.species-details--selected {
      display: block;
      margin: 1rem;
      margin-left: 2rem;
    }

    .species-details__name {
      font-family: gameboy;
      font-size: 5rem;
      width: fit-content;
      margin: auto;
    }

    .description {
      display: flex;
      align-content: center;
      flex-wrap: wrap;
      justify-content: space-around;
      background: white;
      border-radius: 10px;
      box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
      margin: 1rem 10%;
      position: relative;
      min-height: 70%;

      img {
        position: absolute;
        width: 400px;
        filter: drop-shadow(40px 30px 15px);
        top: 1rem;
        left: -5rem;
      }
      .flavor-text {
        width: 50%;
        font-size: 2rem;
      }
    }
  }
}

.species-details.species-details--selected {
  animation: turn-on 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  animation-fill-mode: forwards;
}

@keyframes turn-on {
  0% {
    opacity: 0;
    transform: translateX(300%);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes turn-off {
  0% {
    opacity: 1;
    transform: translateX(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-300%);
  }
}
