@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;700&display=swap");
:root {
  --dark-black: #222831;
  --light-black: #393e46;
  --blue: #00adb5;
  --white: #eeeeee;
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  font-family: "Poppins", sans-serif;
  font-weight: 18px;
}
body {
  background-image: url(./icons/background.jpg);
  background-position: center;
  background-size: cover;
  height: 100vh;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.container {
  padding: 2rem 0;
  display: flex;
  border-radius: 20px;
  max-width: 800px;
  width: 100%;
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.5);
}
.left {
  border-right: 1px solid rgba(255, 255, 255, 0.5);
  padding: 0 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  max-width: 360px;
  gap: 1.5rem;
}
.search-section {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  background-color: var(--white);
  padding: 5px;
  border-radius: 20px;
}
.search-section input {
  flex: 1;
}
.search-section input,
button {
  border: none;
  background-color: transparent;
  padding: 0.5rem 0.8rem;
}
input:focus {
  outline: none;
}
.search-section button {
  background-color: #15caf4;
  color: white;
  box-shadow: 6px 4px 10px hsla(0, 0%, 0%, 0.123);
  cursor: pointer;
  transition: 0.2s ease background-color;
  border-radius: 20px;
}
button:hover {
  background-color: #3959d1;
}
.city-weather {
  color: var(--white);
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.city-weather figure {
  width: 100%;
  height: 150px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.city-weather figure img {
  height: 100px;
  width: 100%;
  object-fit: contain;
  object-position: center;
}
.city-weather h1 {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
}
.city-weather h2 {
  font-size: 1.5rem;
  font-weight: 500;
  text-transform: capitalize;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 3px;
}
.city-weather p {
  margin: 0.5rem;
  font-weight: 300;
}
.weather-info {
  display: flex;
  justify-content: space-between;
  width: 100%;
  color: rgb(255, 255, 255);
}
.info-item figure {
  width: 100%;
}
.weather-info .info-item {
  text-align: center;
}
.info-item h1 {
  font-size: 1.2rem;
  font-weight: 500;
}
.info-item p {
  font-weight: 300;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.808);
}
.weather-info figure {
  display: flex;
  justify-content: center;
}
.weather-info img {
  width: 35px;
  height: 35px;
}
.weather-info figure {
  margin-bottom: 0.3rem;
}
hr {
  width: 100%;
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.384);
}
.hide {
  display: none;
}
.error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex: 1;
}
.error figure {
  width: 100%;
  display: flex;
  justify-content: center;
}
.error figure img {
  width: 80px;
}
.error p {
  color: var(--white);
  font-size: 1.5rem;
  line-height: 1.2;
  text-align: center;
  font-weight: 500;
}
.error.hide {
  display: none;
}

.right {
  padding: 0 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  gap: 1.5rem;
}
.right > * {
  color: var(--white);
}
.week-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  justify-content: space-between;
  gap: 0.5rem;
}
.right h1 {
  font-size: 1.5rem;
  font-weight: 500;
  text-transform: capitalize;
}
.week-container hr:last-child {
  display: none;
}
.db-info {
  width: 100%;
  border-radius: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 2fr 2fr 1fr;
  align-items: center;
}
.week-box > * {
  text-align: center;
}
.db-info > p {
  font-weight: 400;
}
.week-box .date {
  text-align: left;
  font-weight: 300;
  font-size: 0.65rem;
  color: #eeeeeeee;
}
.week-box p:first-child {
  text-transform: uppercase;
}
.week-box figure img {
  width: 50px;
  height: 25px;
  object-fit: contain;
  object-position: center;
}

img {
  overflow: visible;
}

/* Media query for mobile layout */
@media (max-width: 768px) {
  body {
    background-repeat: repeat;
    background-size: cover;
    background-position: center;
    height: 100%;
  }
  .container {
    flex-direction: column;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0;
    gap: 3rem;
    background-size: cover;
    background-position: center;
  }
  .search-section > * {
    font-size: 0.75rem;
  }
  .left {
    height: 100vh;
    max-width: 100%;
    border: none;
  }
  .city-weather figure img {
    height: 80px;
  }
  .city-weather h2 {
    font-size: 1.3rem;
  }
  .city-weather h1 {
    font-size: 2.8rem;
  }
  .city-weather p {
    font-size: 0.9rem;
  }
  .weather-info img {
    height: 32px;
    width: 32px;
  }
  .info-item h1 {
    font-size: 1rem;
  }
  .info-item p {
    font-size: 0.75rem;
  }
  .right h1 {
    font-size: 1.3rem;
  }
  .db-info > p {
    font-size: 0.85rem;
  }
  .week-box figure img {
    width: 45px;
    height: 20px;
  }
}
