@import url("https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@600&display=swap");

:root {
  --bg-gray: #fafafa;
  --time-gray: #717171;
  --card-large-font-size: 60px;
}

* {
  box-sizing: border-box !important;
  /* outline: 1px solid red; */
}

body {
  overflow: scroll;
  display: grid;
  height: 100vh;
  width: 100vw;

  padding: 0em 1em 0 0;

  font-family: "Source Sans Pro", sans-serif;
  grid-template-columns: 1fr 4fr;
  grid-template-rows: 1fr 1.5fr 1.5fr;
  grid-template-areas: "s a" "s b" "s c";
  background-color: var(--bg-gray);
  /* background-color: red; */
  gap: 1em;
}

.hide {
  visibility: hidden;
}

.sidebar {
  grid-area: s;
  background-color: white;
  /* margin-right: 1em; */
}

.sidebar > div {
  display: flex;
  flex-direction: column;
  gap: 1em;
  padding: 20px;
  position: sticky;
  top: 0;
}

.sidebar .weather-icon {
  flex: 1;
}

#uv-card {
  gap: 1em;
}

.card {
  display: flex;
  flex-direction: column;
  color: var(--time-gray);
  font-size: 20px;
  padding: 15px;
  background-color: white;
}

.temperature {
  display: flex;
}
.sidebar .number,
.row2 .number,
.row3 .number {
  font-size: var(--card-large-font-size);
}
.sidebar .symbol,
.row2 .symbol,
.row3 .symbol {
  font-size: 40px;
}

.card .number {
  color: black;
}
.card .symbol {
  color: var(--time-gray);
}
.date {
  font-size: 20px;
}
.date .day {
  font-weight: 600;
}
.date .time {
  color: var(--time-gray);
}

.search-bar {
  display: flex;
  height: 30px;
  background-color: var(--bg-gray);
  border-radius: 16px;
  padding: 10px;
  gap: 1em;
  align-items: center;
}
.search-bar input {
  flex: 1;
  font-size: 14px;
}

/* row 1 start */
.row1 {
  margin-top: 1em;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2em;
  grid-area: a;
  background-color: blue;
}
.row1 .card {
  max-height: 200px;
  gap: 1em;
}

.row1 .stats {
  gap: 0.1em;
}
.row1 .card-title {
  text-align: center;
  font-weight: 600;
  color: black;
}

.row1 img {
  width: 100%;
  margin-right: auto;
}
.row1 .stats {
  display: flex;
  justify-content: center;
}
/* row 1 end */

/* row 2 start */
.row2 {
  display: flex;
  flex-direction: column;
  gap: 2em;
  grid-area: b;
}

.row2 h2 {
  font-size: 30px;
  font-weight: 600;
}

.row2 .card-container {
  display: grid;
  gap: 2em;
  grid-template-columns: repeat(3, 1fr);

  width: 100%;
  height: 100%;
}
/* row 2 end */

/* row 3 start */
.row3 {
  margin-bottom: 1em;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2em;
  grid-area: c;
  background-color: yellow;
}

.row3 .stats-container {
  flex: 1;
  width: 100%;
  display: flex;
  justify-content: space-between;
}
/* row 3 end */
.row1 .card-title,
.row2 .card-title,
.row3 .card-title {
  font-size: 16px;
}
.row1,
.row2,
.row3 {
  background-color: transparent;
}

.country-info {
  position: relative;
}

.country-title {
  display: flex;
  width: 100%;
  justify-content: center;
  color: white;
  position: absolute;
  z-index: 99;
  top: 10px;
}

.country-title div {
  display: flex;
  gap: 0.5em;
}

.country-img {
  border-radius: 10px;
}

.card .stats {
  display: flex;
  align-items: center;
  gap: 0.5em;
}

#sun-card {
  gap: 1.5em;
}
#sun-card .time {
  font-size: 25px;
  color: black;
}
#sun-card .container {
  display: flex;
  align-items: center;
  gap: 1em;
}

#visibility-card .stats-container {
  display: flex;
  flex: 1;
  justify-content: center;
}

#wind-card .stats-container {
  height: 100%;
  display: grid;
  place-items: center;
}

.status {
  font-weight: 500;
  font-size: 16px;
}
.status.good::after {
  content: " Good";
  color: var(--progress-bar1-col);
}
.status.average::after {
  content: " Average";
  color: var(--progress-bar2-col);
}
.status.bad::after {
  content: " Bad";
  color: var(--progress-bar3-col);
}

@media screen and (max-width: 600px) {
  :root {
    --card-large-font-size: 50px;
  }
  body {
    display: flex;
    flex-direction: column;
    height: auto;
    padding: 0;
    gap: 2em;
    padding: 5px;
  }

  .row1,
  .row2,
  .row3 {
    margin-right: 0;
  }

  #wind-card {
    width: 100%;
  }
  .card {
    box-sizing: border-box;
    min-width: none;
  }
  .search-bar {
    padding: 0;
    border-radius: 12px;
  }

  .sidebar > div {
    gap: 1em;
    padding: 0;
    position: relative;
  }

  .sidebar .weather-icon {
    width: 120px;
    align-self: center;
  }
  .row1 {
    box-sizing: border-box;
    margin-top: 0;
  }
  #city-img {
    display: block;
    margin: auto;
    width: 300px;
  }
  .row1 {
    overflow-x: scroll;
  }

  .row3 {
    padding-bottom: 0;
  }
  .row2,
  .row3,
  .row2 .card-container {
    gap: 2em;
    height: auto;
    display: flex;
    flex-direction: column;
  }
}
