@import url(./header.css);

.wrapper {
  width: 100%;
  height: fit-content;
  display: flex;
  flex-direction: column;
  background-color: var(--green-light-color);
}
.container {
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 80%;
  height: 100%;
}
main {
  flex: 1;
  width: 100%;
  height: fit-content;
}
.main__container {
  position: relative;
  display: flex;
  flex-direction: column;

  background-color: white;
  border-radius: 20px;
  margin: 5rem auto;
  background-image: url(../img/bg2.jpg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 0 1rem;
  height: 100%;
}
.main__container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 20px;
}
.recipe__filtering {
  display: flex;
  align-items: center;
  justify-content: space-between;

  width: 100%;
  height: 100%;
  padding: 4rem;
  gap: 2rem;
}

.loader {
  display: none;
  color: var(--green-dark-color);
  font-size: 45px;
  text-indent: -9999em;
  overflow: hidden;
  width: 1em;
  height: 1em;
  justify-content: center;
  align-items: center;
  border-radius: 50%;
  position: relative;
  transform: translateZ(0);
  animation: mltShdSpin 1.7s infinite ease, round 1.7s infinite ease;
}

@keyframes mltShdSpin {
  0% {
    box-shadow: 0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em,
      0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em;
  }
  5%,
  95% {
    box-shadow: 0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em,
      0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em;
  }
  10%,
  59% {
    box-shadow: 0 -0.83em 0 -0.4em, -0.087em -0.825em 0 -0.42em,
      -0.173em -0.812em 0 -0.44em, -0.256em -0.789em 0 -0.46em,
      -0.297em -0.775em 0 -0.477em;
  }
  20% {
    box-shadow: 0 -0.83em 0 -0.4em, -0.338em -0.758em 0 -0.42em,
      -0.555em -0.617em 0 -0.44em, -0.671em -0.488em 0 -0.46em,
      -0.749em -0.34em 0 -0.477em;
  }
  38% {
    box-shadow: 0 -0.83em 0 -0.4em, -0.377em -0.74em 0 -0.42em,
      -0.645em -0.522em 0 -0.44em, -0.775em -0.297em 0 -0.46em,
      -0.82em -0.09em 0 -0.477em;
  }
  100% {
    box-shadow: 0 -0.83em 0 -0.4em, 0 -0.83em 0 -0.42em, 0 -0.83em 0 -0.44em,
      0 -0.83em 0 -0.46em, 0 -0.83em 0 -0.477em;
  }
}

@keyframes round {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.recipe {
  display: flex;
  align-self: flex-start;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: auto;
  width: 100%;
}
.recipe__no {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}
.recipe__no i {
  font-size: 5rem;
  color: black;
}
.recipe__no p {
  color: black;
  font-size: 3rem;
  height: 100%;
}
.recipe__items {
  display: flex;

  flex-direction: row;
  flex: 1 0 auto;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
  height: 100%;
  gap: 3rem;
}
.recipe__item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  width: 12rem;
  height: 20rem;
  border: none;
  border-radius: 10px;
  padding-bottom: 0.5rem;
  cursor: pointer;
  box-shadow: rgba(99, 58, 57, 0.5) 0px 5px 15px;
  background-color: #fff;

  transition: 0.5s;
}
.recipe__item:hover {
  transform: scale(1.1);
}
.recipe__item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.4);
  border-radius: 10px;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.recipe__item:hover::after {
  opacity: 1;
}
.recipe__img {
  width: 80%;
  height: 55%;
  object-fit: cover;
  padding-top: 10%;
}
.recipe__img img {
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  width: 100%;
  height: 100%;
  object-fit: cover;
  overflow: hidden;
}
.recipe__title {
  position: relative;
  width: 90%;
  font-weight: 400;
  text-align: center;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--main-font-color);
}
.recipe__title::after {
  position: absolute;
  width: 25%;
  content: '';
  bottom: -10px;
  left: 37.5%;
  background-color: var(--green-dark-color);
  height: 1px;
}
.recipe__cuisine {
  width: 90%;
  color: var(--green-dark-color);
  overflow-wrap: break-word;
  text-align: center;
  text-transform: uppercase;
  font-size: 0.6rem;
}
.recipe__dish {
  width: 90%;
  color: var(--recipe-dish-color);
  text-align: center;
  line-height: 1rem;
  font-size: 0.75rem;
  margin-top: 1rem;
}
.recipe__search {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: flex-end;
  padding: 0 5rem;
  padding-top: 5rem;
}
.recipe__input {
  position: relative;

  display: flex;
  flex-direction: row;
  right: 0;
  height: 2.5rem;
  width: 30rem;
  border: none;
  background-color: none;
  border-bottom: 1px solid black;
}
.recipe__input input {
  background: transparent;
  border: none;
  width: 100%;

  font-size: 1rem;

  color: black;
  outline: none;
}
.recipe__input input::placeholder {
  color: var(--grey-font-blue);
}

.recipe__input .search-icon {
  position: absolute;
  right: 0;
  top: 0.6rem;
  color: var(--main-color);
  font-size: 1.5rem;
  font-weight: 500;
  border: none;
}
.recipe__input .close {
  display: none;
  cursor: pointer;
  position: absolute;
  top: 0.6rem;
  color: var(--main-color);
  font-size: 1.5rem;
  font-weight: 500;
  border: none;
  left: 0;
}
.recipe__pagination {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}
.recipe__pagination-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  color: var(--main-color);
  border: 1px solid var(--main-color);
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.5s ease;
}
.recipe__pagination-btn:hover {
  background-color: #d5e0b0;
  cursor: pointer;
}
.active {
  background-color: var(--green-dark-color);
  color: white;
}

.filters {
  display: flex;
  align-items: start;
  justify-content: start;
  align-self: flex-start;
  width: 40%;
  height: 100%;
}
.arrow {
  cursor: pointer;
}
.filters__block {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: center;
  width: 100%;
  gap: 2rem;
  padding: 2rem;
  box-shadow: rgba(99, 58, 57, 0.5) 0px 5px 15px;
  border-radius: 10px;
  background-color: #fff;
}
.filter__block {
  height: 10rem;
  overflow-y: auto;
}

.filter__group {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: start;
  gap: 1rem;
  width: 100%;
}
.filter__group p {
  color: black;
}

.filter__cuisines label,
.filter__dishs label,
.filter__diets label {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  color: var(--main-color);
}

.filter__group input {
  color: black;
  width: 1rem;
  height: 1rem;
}

.filter-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  color: black;
}
.filter-title i {
  color: black;
}
.filter__cuisines,
.filter__dishs,
.filter__diets {
  position: relative;
  display: none;
  flex-direction: column;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

footer {
  position: relative;
  flex-shrink: 0;
  margin-top: auto;
  width: 100%;
  height: 10rem;
  background-color: var(--green-dark-color);
}
.footer__container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3rem;
}

.footer__social {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2rem;
}
.footer__social > a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background-color: var(--green-light-color);
  border: 1px solid var(--main-color);
  cursor: pointer;
}
.footer__social > a > i {
  transition: 0.5s ease;
  color: var(--main-color);
}

.footer__social a :hover {
  transform: scale(1.1);
}

@media only screen and (max-width: 1250px) {
  .container {
    width: 90%;
  }
  /* .recipe {
    justify-content: center;
  }*/
  .recipe__input {
    width: 70%;
  }
  .recipe__search {
    justify-content: center;
    padding: 0;
    padding-top: 3rem;
  }
  .recipe__items {
    justify-content: center;
  }
  .recipe__filtering {
    flex-direction: column;
    align-items: center;
  }
  .filters {
    flex-direction: row;
    width: 100%;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
  }
  .filters__block {
    flex-direction: row;
    width: 100%;
    justify-content: space-between;
    gap: 3rem;
    background-color: transparent;
    border: none;
    box-shadow: none;
    padding: 1rem;
  }
  .filter__block {
    position: relative;
    z-index: 2;
    display: none;
    overflow-y: auto;
    height: 10rem;
    background-color: white;
  }
  .filter__group {
    background-color: #fff;
    padding: 1rem;
    border-radius: 10px;
    width: 100%;
  }
}
@media only screen and (max-width: 768px) {
  header {
    height: auto;
  }
  h1 {
    font-size: 3rem;
    padding-bottom: 10rem;
    line-height: 4rem;
  }
  .to__recipes {
    display: none;
  }
}
@media only screen and (max-width: 600px) {
  .recipe__filtering {
    padding: 1rem 0;
  }
  .filters__block {
    flex-direction: column;
    align-items: center;
    width: 90%;
  }
}
@media only screen and (max-width: 460px) {
  .recipe__item {
    width: 90%;
    height: 20rem;
  }
}
.filter__block-chosen {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  width: auto;
  gap: 0.5rem;
  border: 1px solid grey;
  padding: 0.25rem;
}
.chosen__filter {
  color: black;
}
.filters__chosen {
  position: relative;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.filters__chosen p,
i {
  color: black;
}
