/* global styles  */
*,
*::after,
*::before {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}
.error {
  color: red;
  font-weight: bold;
  font-size: 20px;
}
.display {
  display: block !important;
}


header{
  max-width: 100%;
  padding: 1rem;
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin-bottom: 1.5rem;
  background-color: rgba(0, 0, 0, 0.88);
}
header img{
  max-width: 100%;
  width:60px;
  height: 60px;
}
header .logo-box{
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}
header .logo-box h1{
  font-size: 2.5rem;
  color: aliceblue;
  font-family: "JetBrains Mono ExtraBold";
  word-spacing: -5px;
}
header form{
  display: flex;
  gap: 0.5rem;
}
header form input[type='text']{
  height: 35px;
  border-radius: 10px;
  border: none;
  padding: 0 0.5rem;
  background-color: rgba(0, 0, 0, 0.36);
  color: aliceblue;
  font-size: 1rem;
  font-weight: bold;
}
header form button#search-btn{
  height: 35px;
  padding: 0 0.5rem;
  border: none;
  border-radius: 10px;
  font-weight: bold;
  font-size: 1rem;
  text-align: center;
  background-color: #FF9D00;
  transition: all 0.3 ease-in-out;
}
header form button#search-btn:hover{
  cursor: pointer;
  background-color: rgb(255, 255, 255);
  border: 1px solid #FF9D00;
}

.app-heading-box{
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: "JetBrains Mono ExtraBold";
  text-shadow: 2px 2px 2px #FF9D00;
  margin-bottom: 1rem;
}
.error-container{
  display: none;
  text-align: center;
  background-color: rgba(255, 0, 0, 0.66);
  padding: 0.5rem;
  border: 2px solid red;
}
.error-container  .error{
  font-family: monospace;
  font-size: 1.5rem;
  text-shadow: 2px 2px 2px rgba(0, 0, 0, 0.88);
}
main{
  display: flex;
  max-width: 1020px;
  margin: 0 auto;
  padding: 1rem;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 1.5rem;
}
main .section-top{
  display: flex;
  justify-content: space-around;
  align-items: center;
  width: 100%;
}
.primary-weatherInfos{
  width: 30%;
  background-color: #CFCDCD;
  border-radius: 15px;
  padding: 0.6rem;
  display: flex;
  flex-direction: column;
  box-shadow: 2px 2px 15px rgba(0, 0, 0, 0.76);
}

.primary-weatherInfos .city-title{
  font-family: "JetBrains Mono ExtraBold";
  font-size: 1.5rem;
  margin: 0;
  word-spacing: -15px;
}
.weather-main-infos {
  margin: 1.4rem 0 !important;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.primary-weatherInfos .weather-icon img{
  width: 10rem;
  margin: 0;
}
.weather-main-infos .weather-description{
  font-family: "JetBrains Mono ExtraBold";
  text-align: center;
  font-size: 1.2rem;
}
.max-min-temp {
  display: flex;
  gap: 1.5rem;
  font-weight: bold;
  font-size: 1rem;
}
.max-min-temp img{
  width: 1.2rem;
}
.max-min-temp div{
  display: flex;
  justify-content: center;
  align-items: center;
}
.city-temp{
  align-self: center;
  font-weight: bold;
  font-size: 2.5rem;

}
.date-time-box{
  display: flex;
  flex-direction: column;
  margin-top: 1.5rem;
}
.date-time-box h4{
  font-weight: bold;
  font-size: 1.5rem;
  font-family: "JetBrains Mono ExtraBold";
}
.weather-main-infos-time{
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.weather-main-infos-time p:first-of-type{
  font-size: 1rem;
  font-family: "JetBrains Mono ExtraBold";
}
.weather-main-infos-time p:last-of-type{
  font-family: "JetBrains Mono ExtraBold";
  font-weight: bold;
  font-size: 1.5rem;
}

.secondary-weatherInfos{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 1.5rem;
}
.secondary-weatherInfos .secondary-weatherInfos-boxes{
  background-color: #f2f3f4;
  border-radius: 15px;
  padding: 1rem;
  box-shadow: 2px 2px 15px rgba(0, 0, 0, 0.76);
}
.secondary-weatherInfos-boxes h2{
  font-family: "JetBrains Mono ExtraBold";
}
.secondary-weatherInfos-boxes .secondary-weatherInfos-boxes_bottom{
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
}
.secondary-weatherInfos-boxes_bottom h4{
  font-size: 1.2rem !important;
  font-family: "JetBrains Mono", sans-serif;
  font-weight: bold;
}

#next5Days-container{
  width: 100%;
  padding: 0.3rem;
}
#next5Days-container h2{
  font-family: "JetBrains Mono ExtraBold";
  font-size: 1.5rem;
}
#five-forecast-container{
  width: 100%;
  display: flex;
  margin-top: 1rem;
  align-items: center;
  column-gap: 2rem;
  justify-content: center;
}
#five-forecast-container .five-forecast-box{
  width: 60%;
  background-color: #f2f3f4;
  padding: 0.5rem;
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  text-align: center;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.53);
}
#five-forecast-container .five-forecast-box .five-forecast-title h4{
  font-family: "JetBrains Mono ExtraBold";
  font-size: 1.1rem;
}
#five-forecast-container .five-forecast-box .five-forecast-title p{
  font-family: "JetBrains Mono NL Medium";
  font-size: 0.9rem;
}
#five-forecast-container .five-forecast-box img{
  width: 4rem;
}
#five-forecast-container .five-forecast-box .five-forecast-temp p{
  font-family: monospace;
  font-weight: bold;
  font-size: 1.1rem;
}

/* Media queries*/
@media only screen and (max-width: 756px){
  header{
    flex-direction: column;
    gap: 1rem;
  }
  .section-top{
    flex-direction: column;
    row-gap: 2.5rem;
  }
  .primary-weatherInfos{
    width: 100% !important;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.76);
  }
  .secondary-weatherInfos{
    width: 100%;
  }
  #five-forecast-container{
    gap: 1.5rem;
    flex-wrap: wrap;
  }
  #five-forecast-container .five-forecast-box{
    width: 100%;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
  }
}

@media only screen and (max-width: 970px){
  .secondary-weatherInfos{
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 1rem;
  }
  .primary-weatherInfos{
    width: 40%;
    padding: 0.5rem;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.76);
  }
}