img {
  max-width: 100%;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 500;
  background-color: #03012d;
  color: #fff;
  padding-block-end: 80px;
}

h1 {
  font-family: Georgia, "Times New Roman", serif;
}

input,
button,
textarea,
select {
  font: inherit;
  width: 100%;
  border: none;
}

.wrapper {
  display: grid;
  grid-template-columns: 1fr 1216px 1fr;

  > * {
    grid-column: 2;
  }
}

.main {
  display: grid;
  row-gap: 32px;
}

.dashboard {
  display: grid;
  gap: 48px 32px;
  grid-template-columns: repeat(3, 1fr);
  grid-template-areas:
    "current current hourly"
    "daily daily hourly";
}

.dropdown {
  background-color: #252641;
  color: #fff;
  border: 0;
  font-size: 1rem;
  border-radius: 8px;
}

.block {
  background-color: #252641;
  border: 1px solid #3b3c5e;
  border-radius: 12px;
}

.header {
  .header__content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-block-start: 16px;
  }

  .header__logo {
    width: 75px;
    height: 50px;
  }

  .header__dropdown {
    max-width: 15ch;
    background-image: url("./assets/images/icon-units.svg");
    background-repeat: no-repeat;
    background-position: 16px center;
    padding: 12px 35px;
  }
}

.hero {
  .hero__content {
    display: grid;
    justify-items: center;
    padding-block-start: 48px;
  }

  .hero__title {
    font-size: 3.25rem;
    margin-block-end: 48px;
    text-align: center;
  }

  .hero__search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px 16px;
    width: 100%;
    max-width: 656px;
  }

  .hero__textbox {
    background-image: url("./assets/images/icon-search.svg");
    background-repeat: no-repeat;
    background-position: 24px center;
    background-color: #252641;
    font-size: 1.25rem;
    padding: 16px 20px 16px 60px;
    color: #d4d3d8;
    border-radius: 12px;

    &:focus {
      outline: 2px solid #d4d3d8;
    }
  }

  .hero__button {
    background-color: #4361d1;
    border-radius: 12px;
    font-size: 1.25rem;
    color: #fff;
    padding: 16px 24px;
    transition: background-color 120ms ease-in-out;

    &:hover {
      background-color: #321b9c;
      cursor: pointer;
    }
  }
}

.current {
  grid-area: current;

  .current__weather {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-block-end: 20px;
    padding: 40px 24px;
    padding-block: 83px;
    background-image: url("./assets/images/bg-today-large.jpeg");
    background-repeat: no-repeat;
    background-color: #321b9c;
    background-size: cover;
    background-position: center bottom;
    border-radius: 20px;
    overflow: clip;
  }

  .current__location {
    text-align: center;
  }

  .current__city {
    font-size: 1.75rem;
    font-weight: 700;
    margin-block-end: 12px;
  }

  .current__date {
    font-size: 1.125rem;
    color: #d4d3d8;
  }

  .current__info {
    display: flex;
    align-items: center;
    gap: 20px;
  }

  .current__icon {
    width: 120px;
    height: auto;
  }

  .current__temp {
    font-size: 6rem;
    letter-spacing: -2%;
    font-weight: 600;
    font-style: italic;
  }

  .current__conditions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
  }

  .current__condition {
    padding: 20px;
  }

  .current__condition-title {
    font-size: 1.125rem;
    color: #d4d3d8;
    margin-block-end: 24px;
  }

  .current__condition-value {
    font-size: 2rem;
    font-weight: 300;
  }
}

.daily {
  grid-area: daily;

  .daily__title {
    font-size: 1.25rem;
    margin-block-end: 20px;
  }

  .daily__forecast {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 16px;
    min-height: 166px;
  }

  .daily__day {
    display: grid;
    justify-items: center;
    gap: 16px;
    padding: 16px 10px;
    text-align: center;
  }

  .daily__day-title {
    font-size: 1.125rem;
  }

  .daily__day-icon {
    width: 60px;
    height: auto;
  }

  .daily__day-temps {
    justify-self: stretch;
    display: flex;
    justify-content: space-between;
    font-size: 1rem;
  }

  .daily__day-low {
    color: #d4d3d8;
  }
}

.hourly {
  grid-area: hourly;
  position: relative;

  .hourly__content {
    background-color: #252641;
    border-radius: 20px;
    padding: 20px 16px;
    position: absolute;
    height: 100%;
    overflow-y: scroll;
  }

  .hourly__header {
    display: flex;
    gap: 40px;
    justify-content: space-between;
    align-items: center;
    margin-block-end: 16px;
  }

  .hourly__title {
    font-size: 1.25rem;
    font-weight: 600;
  }

  .hourly__select {
    background-color: #2f304b;
    width: auto;
    padding: 8px 16px;
  }

  .hourly__hours {
    display: grid;
    gap: 16px;
  }

  .hourly__hour {
    display: grid;
    grid-template-columns: auto auto 1fr;
    gap: 8px;
    align-items: center;
    padding: 10px 16px 10px 12px;
    background-color: #2f304b;
    border: 1px solid #3b3c5e;
    border-radius: 8px;
    min-height: 60px;
  }

  .hourly__hour-icon {
    width: 40px;
    height: auto;
  }

  .hourly__hour-time {
    font-size: 1.25rem;
  }

  .hourly__hour-temp {
    font-size: 1rem;
    justify-self: end;
  }
}
