/* Reset */
html {
  box-sizing: border-box;
  font-size: 16px;
}

*,
*:before,
*:after {
  box-sizing: inherit;
}

/* prettier-ignore */
body, h1, h2, h3, h4, h5, h6, p, ol, ul {
    margin: 0;
    padding: 0;
    font-weight: normal;
}

img {
  max-width: 100%;
  height: auto;
}

body {
  font-family: 'Lato', sans-serif;
  /* padding: 2rem; */
  background-color: #474646;
  color: #fff;
  background: url('img/gradient-mountain-landscape.jpg') no-repeat center center
    fixed;
  background-color: #02426f;
  background-size: cover;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  isolation: isolate;
}

body::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  background: #001b28;
  opacity: 0.5;
}

.app {
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 2fr minmax(auto, 1fr) 1fr;
  grid-template-rows: minmax(1fr, auto) 3fr 2fr;
  /* gap: 2rem; */
  flex-grow: 1;
}

/* MAIN CURRENT WEATHER CONDITIONS */

.city {
  font-size: 3.2em;
}

.conditions__icon {
  padding: 1rem;
  align-self: center;
}

.icon--current {
  font-size: 96px;
}

.date,
.time {
  font-size: 1.5em;
}

.current__temp {
  font-size: 7em;
  font-weight: 300;
}

.container--temp {
  display: flex;
  align-items: baseline;
  gap: 1.5em;
}

.temp__toggle {
  font-size: 2em;
  font-weight: 300;
  cursor: pointer;
}

.conditions__description {
  font-size: 2.6em;
}

.current__primary {
  grid-column: 1 / 2;
  grid-row: 2 / 3;
  justify-self: center;
  align-self: start;
}

.form__input--location {
  background-color: rgba(0, 0, 0, 0);
  color: #fff;
  border: none;
  border-bottom: 2px solid #fff;
  padding: 0.4em;
  font-size: 1.2em;
}

input:focus {
  outline: none;
}

.form__btn--location {
  cursor: pointer;
  border: none;
  background-color: rgba(0, 0, 0, 0);
  color: #fff;
}

.ph-magnifying-glass {
  font-size: 1.2em;
}

/* SECONDARY CONDITIONS */

.current__secondary {
  grid-column: 3;
  grid-row: 2 / 3;
  justify-self: center;
  align-self: start;
}

.conditions--current {
  font-size: 1.6em;
}

.conditions__label {
  font-size: 1em;
  margin-block-start: 2em;
}

/* FORECAST */

.forecast--container {
  grid-row: 3 / 4;
  grid-column: 1 / -1;
  justify-self: end;
  align-self: center;
  display: flex;
  gap: 5em;
}

.day {
  font-size: 1.6em;
}

.max-temp {
  font-size: 2em;
  font-weight: 300;
}

.conditions--forecast {
  font-size: 1em;
  margin-top: 0.4em;
}

.footer {
  text-align: center;
  font-weight: 400;
  font-size: 0.8rem;
  padding-bottom: 1rem;
}

a {
  color: #fff;
}

/* Media queries */
@media only screen and (max-width: 700px) {
  .current__primary,
  .current__secondary {
    font-size: 0.7rem;
    align-self: start;
  }

  .form__input--location {
    font-size: 1em;
  }

  footer {
    display: none;
  }
}

@media only screen and (max-width: 400px) {
  .forecast--container {
    font-size: 0.8rem;
    gap: 0.8em;
  }
}
