@font-face {
  font-family: 'PokemonHollow';
  src: url('./assets/fonts/pokemon_hollow.ttf') format('truetype');
}
@font-face {
  font-family: 'PokemonSolid';
  src: url('./assets/fonts/pokemon_solid.ttf') format('truetype');
}
@font-face {
  font-family: 'Roboto';
  src: url('./assets/fonts/roboto-regular.ttf') format('truetype');
}

@font-face {
  font-family: 'Arcade';
  src: url('./assets/fonts/arcade.ttf') format('truetype');
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: black;
  color: white;
  font-family: 'Roboto', Arial, sans-serif;
  padding: 1rem;
  margin: 2rem;
}

#loading-screen {
  text-align: center;
  padding: 2em;
  font-size: 1.5em;
}


h1 {
  text-align: center;
  font-size: 3rem;
  font-family: 'PokemonHollow', 'Roboto', Arial, sans-serif;
  margin-bottom: 1rem;
}

h2 {
  text-align: center;
  font-family: 'PokemonHollow', 'Roboto', Arial, sans-serif;

}

/* FORM */
#search-box {
  text-align: center;
  margin-bottom: 20px;
}

#search-box input,
#search-box select {
  padding: 10px;
  margin-top: 8px;
  margin-bottom: 16px;
  border-radius: 8px;
  border: none;
  font-size: 1rem;
  width: 100%;
  max-width: 766px;
}

#search-box select {
  cursor: pointer;
}

#error-message {
  height: 32px;
  margin-bottom: 10px;
  color: red;
}

/* CONTAINER LAYOUT */
.container {
  display: flex;
  flex-wrap: wrap;
  background-color: #d32f2f;
  gap: 10px;
  justify-content: space-between;
  overflow: hidden;
  border: 2px solid white;
  border-radius: 8px;
  padding: 10px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
}

.col {
  flex: 1 1 30%;
  padding: 10px;
  height: 420px;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid white;
  border-radius: 5px;
}

.col-header {
  font-family: 'PokemonHollow', 'Roboto', Arial, sans-serif;
  font-size: 1.5rem;
  margin-bottom: 10px;
  text-align: center;
  color: white;
}


#favorites-box,
#poke-content {
  border-radius: 0.25rem;
  overflow: hidden;
  background-color: yellow;
  color: black;
}

/* MAIN POKE CONTENT BOX */
#poke-content {
  background-color: #d32f2f;
  color: white;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
}

#poke-list,
#poke-info {
  flex: 1;
  padding: 10px;
  overflow-y: auto;
}

#poke-info {
  width: 100%;
  text-align: center;
}

#poke-img {
  width: 100%;
  max-width: 180px;
  height: auto;
  background-color: silver;
  border: 0.125rem solid white;
}

#poke-description {
  background-color: silver;
  border: 0.125rem solid white;
  color: black;
  font-size: 1.5vw;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px;
  max-height: 50%;
}

#poke-list,
#favorites-list {
  width: 100%;
  flex: 1;
  margin-right: 10px;
  padding: 10px;
  color: white;
  overflow-y: auto;
}

.poke-name {
  background-color: silver;
  color: black;
  padding: 10px;
  cursor: pointer;
  transition: background-color 0.2s;
  font-size: 1.5vw;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  border: 1px solid white;
  position: relative;
  font-family: 'Arcade', 'Roboto', Arial, sans-serif;
}

.poke-name:hover {
  background-color: grey;
}

.poke-name.selected {
  background-color: grey;
}

/* FAVORITES BOX */
#favourites-col {
  background-color: yellow;
}

/* HEART */
.heart {
  cursor: pointer;
  color: red;
  margin-left: 5px;
  font-size: 1.5vw;
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
}

/* TYPE TAGS */
#poke-types {
  margin-bottom: 0.25rem;
}

.type {
  display: inline-block;
  padding: 6px 2px;
  border-radius: 10px;
  font-size: 0.8rem;
  border: 1px solid white;
}

.normal { background-color: beige; color: black; }
.fire { background-color: orange; color: white; }
.grass { background-color: green; color: white; }
.water { background-color: blue; color: white; }
.ice { background-color: lightblue; color: black; }
.electric { background-color: gold; color: black; }
.fighting { background-color: darkred; color: white; }
.flying { background-color: skyblue; color: black; }
.bug { background-color: yellowgreen; color: white; }
.ghost { background-color: purple; color: white; }
.rock { background-color: sienna; color: white; }
.ground { background-color: burlywood; color: black; }
.steel { background-color: silver; color: black; }
.dark { background-color: darkgray; color: white; }
.psychic { background-color: palevioletred; color: white; }
.fairy { background-color: pink; color: black; }
.dragon { background-color: teal; color: white; }
.poison { background-color: darkviolet; color: white; }



@media (max-width: 768px) {
  body {
    margin: 1rem;
  }

  h2 {
    font-size: 1.2rem;
  }

  .col {
    flex: 1 1 100%;
    border: 1px solid white;
    box-sizing: border-box;
    height: 200px;
    padding: 0.5rem;
  }

  #poke-content {
    flex-direction: column;
    border: 1px solid white;
  }

  #poke-list,
  #poke-info, #favorites-list {
    width: 100%;
    flex: 1 1 auto;
    align-items: center;
  }

  #poke-list {
    max-height: 300px;
  }

  #poke-list,
  #favorites-list {
    overflow-y: visible;
    max-height: unset;
  }

  #poke-list, #poke-description{
    font-size: 1rem;
  }

  .poke-name {
    font-size: 0.8rem;
  }

}
