body {
  background-color: rgba(249, 240, 229, 0.2);
  background-image: url("../resources/texture.png");
  background-repeat: repeat;
}

header img {
  width: 30px;
  aspect-ratio: 1/1;
  margin-right: 12px;
}

main {
  display: flex;
  height: calc(100vh - var(--header-footer-height) * 2);
  flex-direction: column;
  gap: 20px;
  align-items: center;
  margin: 0 auto;
  padding: 20px;
  overflow: hidden;

  & .control-panel {
    position: relative;
  }
}

#lang-switch {
  padding-left: 6px;
  padding-right: 6px;
  color: rgb(255, 112, 90);

  &:active {
    background-color: var(--border-color);
  }
}

#search {
  border: 2px solid var(--border-color);
  &:focus {
    border: 2px solid rgb(230, 149, 0);
  }
}

#reset {
  color: rgb(255, 112, 90);
  cursor: pointer;
  &:active {
    background-color: var(--border-color);
  }
}

#dropdown {
  position: absolute;
  background-color: var(--theme-color);
  border: 1px solid var(--border-color);
  width: 100%;
  max-height: 240px;
  overflow-y: auto;
  box-shadow: 0 4px 10px #0004;

  & span {
    display: block;
    cursor: pointer;

    &:hover {
      background-color: rgb(160, 160, 160);
    }
  }
}

#results {
  margin-top: 18px;
  & div {
    margin-bottom: 8px;
    font-weight: bold;

    & span {
      font-weight: normal;
    }
  }
  & hr {
    margin: 15px 0;
  }

  & .bird-photo {
    width: 240px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 4px;

    & img {
      width: 100%;
      &.loading {
        animation: flickering 0.5s ease infinite alternate;
      }
    }
  }
}

@keyframes flickering {
  from {
    opacity: 0.7;
  }
  to {
    opacity: 0.3;
  }
}

footer {
  display: flex;
  flex-direction: column;
  a {
    color: inherit;
  }
}

@media (max-width: 480px) {
  main {
    align-items: normal;

    & .control-panel {
      margin: 0 auto;
    }
  }
}
