:root {
  /* ## Layout */

  /* The designs were created to the following widths: */

  --Mobile: 375px;
  --Desktop: 1440px;

  /* ## Colors */

  /* ### Neutral */

  --Dark_Mode_Elements: hsl(209, 23%, 22%);
  --Dark_Mode_Background: hsl(207, 26%, 17%);
  --Light_Mode_Text: hsl(200, 15%, 8%);
  --Light_Mode_Input: hsl(0, 0%, 52%);
  --Light_Mode_Background: hsl(0, 3%, 94%);
  --Light-Mode-Elements: hsl(0, 0%, 100%);
  --Dark_Mode_Text: hsl(0, 0%, 100%);

  /* ## Typography */

  /* ### Body Copy */

  --Homepage-Items: 14px;
  --Detail-Page: 16px;

  /* ### Fonts */

  --Family: "Nunito Sans", sans-serif;
  --Weights: 300, 600, 800;
}
@import url("https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@300;600;800&display=swap");

* {
  box-sizing: border-box;
  color: var(--Dark_Mode_Text);
}
body {
  font-family: var(--Family);
  margin: 0;
  padding: 0;
  background-color: var(--Dark_Mode_Background);
  width: 100%;
}

/* Top bar constant */
.navBar {
  color: var(--Dark_Mode_Text);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
  background-color: var(--Dark_Mode_Elements);
  position: sticky;
  top: 0;
  z-index: 10;
}
.navBar h2 {
  margin: auto 5rem;
  font-weight: 800;
}
.navBar h4 {
  margin: auto 4rem;
  position: relative;
}
.navBar img {
  width: 1.3rem;
  float: left;
}
.darkMode-btn {
    cursor: pointer;
}
.darkMode-btn > img{
  margin-right: 0.5rem;
}
/* Main section -> filter and search bar  */
.main {
  min-width: 100%;
  font-size: var(--Homepage-Items);
}

.srchFilterBar {
  margin-top: 2rem;
  display: flex;
  justify-content: space-between;
}
.search {
  display: flex;
  align-items: center;
  height: 3rem;
  width: 28rem;
  /* border: 2px solid wheat; */
  margin: auto 4rem;
  background-color: var(--Dark_Mode_Elements);
  border-radius: 0.5rem;
}
#searchIcon {
  margin: 1rem;
  color: var(--Dark_Mode_Text);
}
#searchText {
  margin: auto 1rem;
  height: 100%;
  width: 100%;
  background: none;
  border: none;
}
#filter {
  height: 3rem;
  width: 12rem;
  /* border: 2px solid wheat; */
  margin: auto 4rem;
  padding: 1rem;
  background-color: var(--Dark_Mode_Elements);
  border-radius: 0.5rem;
}
#filterButton {
  width: 100%;
  padding: 0;
  width: 100%;
  margin: 0;
  background: transparent;
  border: none;
}
#filterButton select,
option {
  width: 100%;
  color: var(--Dark_Mode_Text);
  padding: 0;
  width: 100%;
  margin: 5px auto;
  background: var(--Dark_Mode_Elements);
  border: none;
}

#searchText:focus,
#searchText:active {
  outline: none;
}

select:focus,
select:active {
  outline: none;
}
/* #filterButton img{
    width: 1.2rem;
    float: right;
} */

/* Cards Container  */

#cardsContainer {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-evenly;
  gap: 1rem;
  padding: 2rem;
  overflow: hidden;
}
.card {
  width: 20%;
  height: 20rem;
  border-radius: 0.5rem;
  background: var(--Dark_Mode_Elements);
  margin-bottom: 2rem;
  overflow: hidden;
  box-shadow: 2px 3px 8px 0px black;
}

.card:hover{
    transform: scale(1.01);
}
#filter:hover{
    transform: scale(1.02);
}
.card img {
  width: 100%;
  height: 50%;
  object-fit: cover;
}
.detailsInCard {
  margin-left: 1.5rem;
}

/* loading screen  */
#loadingIcon {
  width: 100vw;
  height: 100vh;
  background-color: rgba(190, 188, 188, 0.5);
  position: fixed;
  top: 0;
  left: 0;
}
.loader {
  position: absolute;
  left: 48%;
  top: 40%;
  width: 60px;
  height: 60px;
  border: 10px solid #ff046c;
  border-bottom: none;
  border-top: none;
  /* transform: translate(-50%, -50%); */
  border-radius: 30%;
  animation: rotate1 1s ease-in-out infinite normal;
}
@keyframes rotate1 {
  50% {
    transform: rotate(180deg);
    border-color: black;
  }
  100% {
    transform: rotate(360deg);
  }
}


/* Responsive settings */

@media screen and (max-width: 600px) {
  .navBar {
    justify-content: space-evenly;
  }
  .navBar h2 {
    font-size: 90%;
    margin: auto 0rem;
  }
  .navBar h4 {
    margin: auto 1rem;
    position: relative;
    font-size: 0.8rem;
  }
  .card {
    width: 90%;
    box-shadow: 1px 1px 8px 0px rgb(58, 58, 58);
}
#cardsContainer {
    flex-direction: column;
    justify-content: center;
  }

  .srchFilterBar {
    margin-top: 1.5rem;
    justify-content: space-between;
    flex-direction: column;
  }
  .search{
    width: 22rem;
    margin: auto 1rem;
  }
  #filter {
    width: 11rem;
    margin: 1rem 1rem;
  }
  #cardsContainer {
      width: 100%;
    margin-top: -1rem;
    align-items: center;
  }
  .loader {
    position: absolute;
    left: 45%;
    top: 48%;
    width: 40px;
    height: 40px;
  }
  
}
