/* 0 default settings */
/* 0.1 full reset */
* {
  margin: 0px;
  padding: 0px;
  box-sizing: border-box;
}

/* 0.2 setting rem value */
html {
  font-size: 62.5%;
  font-family: "Open Sans", sans-serif;
}

/* 1 generic styling */

.flex {
  display: flex;
}

.grid {
  display: grid;
}

.hide {
  display: none;
}

.relative-position {
  position: relative;
}

.flex-center {
  display: flex;
  justify-content: center;
  align-content: center;
  flex-wrap: wrap;
}

.center-absolute {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* no display */
.no-display {
  background: none !important;
}

/* 2. main container */
.main-app-background {
  width: 100vw;
  height: 100vh;
  position: relative;
  background-image: url("/images/utrecht.jpg");
  background-repeat: no-repeat;
  background-size: cover;
  /* background-color: rgb(103, 186, 224); */
}

.main-app-overlay {
  width: 100vw;
  height: 100vh;
  background-color: rgb(0, 0, 0, 0.5);
}

.main-app-container {
  width: 110rem;
  background: linear-gradient(
    0turn,
    rgba(138, 130, 130, 0.75),
    rgba(202, 198, 198, 0.75)
  );
  /* background-color: rgba(196, 186, 186, 0.7); */
  box-shadow: 0 13px 21px rgba(0, 0, 0, 0.05);
  /* background: linear-gradient(135deg, #3f76dd, #824bdb); */
  /* box-shadow: 10px 10px 30px 0px rgba(0, 0, 0, 0.2); */
  border-radius: 7.5rem;

  /* position the block in the center of the screen */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* 2.1 city input */
.city-input-container {
  margin-top: 3rem;
}

#city-input {
  width: 35rem;
  height: 6rem;
  padding: 1rem 5rem;
  border: none;
  font-size: 2rem;
  background-color: rgba(0, 0, 0, 0);
  border-radius: 5rem;
  background-color: white;
}

#city-input:focus {
  outline: none;
}

.city-submit-styling {
  width: 6rem;
  height: 6rem;
  padding: 0.7rem;
  margin-left: 1rem;
  border: none;
  font-size: 1.5rem;
  border-radius: 100%;
  background-color: white;
}

/* 2.1.1 invalid input error message */
.invalid-input #city-input {
  border: solid 0.15em red;
}

.invalid-input-message {
  color: red;
  font-size: 2em;
  font-weight: 700;
  width: 100%;
  text-align: center;
}

/* 2.2 show temperature */

.temperature-container {
  grid-column-start: 1;
  grid-column-end: 2;
  grid-row-start: 1;
  grid-row-end: 3;
}

.weather-icon-container {
  width: 100%;
  height: 7rem;
  text-align: center;
}

.weather-icon {
  width: 10rem;
  height: 10rem;
}

.temperature {
  width: 100%;
}

.temperature-celsius {
  padding-top: 1.5rem;
  padding-left: 0.5rem;
  font-size: 2.5rem;
  color: white;
}

.temperature-text-styling {
  font-size: 7rem;
  color: white;
}

/* 2.2.1 show weather forecast */
.forecast-container {
  grid-column-start: 1;
  grid-column-end: 2;
  grid-row-start: 3;
  grid-row-end: 4;
}

.forecast-block {
  min-width: 25%;
  flex-direction: column;
}

.forecast-celsius {
  padding-top: 0.5rem;
  padding-left: 0.3rem;
  font-size: 1.2rem;
  color: white;
  font-weight: 400;
}

.forecast-date {
  font-size: 1.5rem;
  color: white;
  font-weight: 400;
  text-align: center;
}

.forecast-text-styling {
  font-size: 3rem;
  font-weight: 500;
  color: white;
}

/* show city */
.city {
  font-size: 3rem;
  color: white;
}

/* 2.3 costs overview */

.costs-overview {
  padding: 5rem 5rem;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 1rem;
}

/* cost blocks styling */
.costs-overview-block {
  min-height: 10rem;
  /* background-color: grey; */
  justify-items: center;
  padding: 1rem 0rem;
}

.costs-icon-styling {
  height: 4rem;
  width: 4rem;
  fill: white;
  margin-bottom: 0.5rem;
}

.costs-text {
  font-size: 1.8rem;
  font-weight: 500;
  color: white;
  text-align: center;
}

.costs-number {
  font-size: 2.5rem;
  font-weight: 600;
  color: white;
}

/* 2.3.1 extra information button styling */

.information-button {
  height: 2.5em;
  width: 2.5em;
  stroke: white;
  margin-left: 0.5em;
}

.information-button:hover {
  stroke: rgb(202, 200, 200);
}

.information-button:hover + .information-container {
  display: block;
}

.information-container {
  position: absolute;
  min-height: 10em;
  width: 30em;
  background-color: rgb(202, 200, 200);
  z-index: 99;
  opacity: 0.96;
  margin-top: -14em;
  border-radius: 25px;
  transform: translate(-50%, 0%);
}

.information-container-fastfood,
.information-container-three-course,
.information-container-renting {
  margin-top: -15.5em;
}

.information-container-basic-utilities {
  margin-top: -17.5em;
}

.information-container:before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 0;
  border: 40px solid transparent;
  border-top-color: rgb(202, 200, 200);
  border-bottom: 0px;
  border-right: 0;
  margin-left: -0.5em;
  margin-bottom: -1.5em;
  transform: translate(-50%, 0%);
}

.information-container-text {
  color: black;
  font-weight: 600;
  font-size: 1.6em;
  margin: 1.5em;
}

/* 2.4 intro container styling */
.intro-heading {
  font-size: 5rem;
  font-weight: 700;
  color: white;
  text-align: center;
  padding-bottom: 3rem;
}

/* 3. error message */

.error-message-modal {
  border-radius: 25px;
  width: 30%;
  height: 20%;
  background: linear-gradient(
    0turn,
    rgba(138, 130, 130, 1),
    rgba(202, 198, 198, 1)
  );
  /* background: white; */
}

.error-message-modal-background {
  z-index: 2;
  position: absolute;
  width: 100vw;
  height: 100vh;
  background-color: rgb(0, 0, 0, 0.5);
}

.error-heading {
  text-align: center;
  font-size: 2.5em;
  padding-bottom: 0.5em;
}

.error-paragraph {
  font-size: 1.6em;
}

.error-text-block {
  min-width: 70%;
}

/* 4. responsiveness */
/*  4.1 responsiveness desktop */
/* layout change desktop for max 550px height and max 992px width*/
@media screen and (orientation: landscape) and (max-height: 610px) and (min-width: 1200px) {
  .main-app-container {
    position: static;
    margin: auto;
    top: 0;
    left: 0;
    transform: none;
    margin: 1.5em auto;
  }

  .main-app-background {
    position: absolute;
    width: 100%;
    height: 610px;
  }

  .main-app-overlay {
    position: absolute;
    width: 100%;
    height: 610px;
    background-color: rgb(0, 0, 0, 0.5);
  }
}

/*  4.1 responsiveness desktop */
@media only screen and (max-width: 1200px) {
  /* resize rem values */
  html {
    font-size: 56%;
  }

  .error-message-modal {
    width: 50%;
    height: 20%;
  }
}

/* landscape tablet */
@media only screen and (max-width: 992px) {
  /* resize rem values */
  html {
    font-size: 56%;
  }

  .costs-overview {
    padding: 5rem 5rem;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
  }

  .temperature-container {
    grid-column-start: 1;
    grid-column-end: 4;
    grid-row-start: 4;
    grid-row-end: 4;
    margin-top: 5rem;
  }

  .forecast-container {
    grid-column-start: 2;
    grid-column-end: 3;
    grid-row-start: 5;
    grid-row-end: 5;
    margin: 0rem 0%;
    /* margin: 0rem auto; */
  }

  .main-app-container {
    width: 90vw;
    height: auto;
  }
}

/* portrait tablet */
@media only screen and (max-width: 768px) {
  /* resize rem values */
  html {
    font-size: 50%;
  }

  .forecast-container {
    grid-column-start: 1;
    grid-column-end: 4;
    grid-row-start: 5;
    grid-row-end: 5;
    margin: 0rem 25%;
  }
}

/*  layout change tablet for smooth transition*/
@media screen and (orientation: landscape) and (max-height: 550px) and (min-width: 992px) and (max-width: 1200px) {
  .main-app-background {
    height: 550px;
  }

  .main-app-overlay {
    height: 550px;
  }
}

/* layout change tablet landscape for max height 800px and min 600px width*/
@media screen and (orientation: landscape) and (max-height: 800px) and (max-width: 992px) and (min-width: 660px) {
  .main-app-container {
    position: static;
    margin: auto;
    top: 0;
    left: 0;
    transform: none;
    margin: 2em auto;
  }

  .main-app-background {
    position: absolute;
    width: 100%;
    height: 800px;
  }

  .main-app-overlay {
    position: absolute;
    width: 100%;
    height: 800px;
  }
}

/* mobile*/
@media only screen and (max-width: 600px) {
  /* resize rem values */
  html {
    font-size: 50%;
  }

  .temperature-container {
    grid-column-start: 1;
    grid-column-end: 3;
    grid-row-start: 6;
    grid-row-end: 6;
    margin-top: 5rem;
  }

  .forecast-container {
    grid-column-start: 1;
    grid-column-end: 3;
    grid-row-start: 7;
    grid-row-end: 7;
    margin: 0rem 10%;
  }

  .costs-overview {
    padding: 5rem 5rem;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
  }

  .main-app-container {
    position: static;
    width: 90vw;
    height: auto;
    margin: 5rem 5%;

    /* position the block in the center of the screen */
    position: static;
    top: 0%;
    left: 0%;
    transform: translate(0%, 0%);
  }

  .main-app-background {
    width: 100vw;
    height: auto;
    position: relative;
    background-image: url("/images/utrecht.jpg");
    background-repeat: no-repeat;
    background-size: cover;
  }

  .main-app-overlay {
    width: 100vw;
    height: auto;
    padding: 1rem 0rem 1rem 0rem;
  }

  .no-display {
    height: 80vh;
  }

  .mobile-layout {
    height: 100vh;
  }

  .forecast-block {
    margin: 2rem 0rem 0rem 0rem;
  }

  #city-input {
    width: 30rem;
  }

  .city-input-container {
    margin-top: 5rem;
  }

  .error-message-modal {
    width: 80%;
    height: 20%;
  }
}

@media only screen and (max-width: 450px) {
  /* extra information button styling mobile */
  .information-button-overlay {
    position: absolute;
    right: -5%;
  }

  .costs-text {
    max-width: 6em;
  }
}

/* layout change mobile landscape for max height 800px and min 600px width*/
@media screen and (max-height: 710px) and (max-width: 768px) and (min-width: 600px) {
  .main-app-background {
    height: 720px;
  }

  .main-app-overlay {
    height: 720px;
  }
}
