* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Helvetica", sans-serif;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: min-content;

  column-gap: 1vw;
  row-gap: 2vw;
  padding: 2vw;
  align-items: start;
  gap: 2vw;
}

img {
  filter: brightness(0);
}

.header-card {
  display: flex;
  flex-direction: column;
  grid-column: 1 / 2;
  grid-row: 1 / 3;
}

.header {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 3rem;
}

.weather-search-container {
  position: relative;
  flex: 1;
  min-width: 150px;
}

.header-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.display-mode {
  display: flex;
  align-items: center;
  gap: 1vw;
}

.location-icon {
  width: 2.5vw;
  height: 2.5vw;
  min-width: 24px;
}

.search-mode {
  display: none;
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #6d6d6d;
  pointer-events: none;
  font-size: 0.9rem;
  z-index: 5;
}

.city-input {
  width: 100%;
  height: clamp(35px, 4vw, 45px);
  border: 0.15vw solid #000000;
  border-radius: 2rem;
  padding: 0 1rem 0 2.5rem;
  font-size: 1rem;

  font-family: "Font Awesome 6 Free", sans-serif;
  font-weight: 600;
  letter-spacing: 0.02em;
}

input::placeholder {
  font-size: 0.8rem;
  letter-spacing: 0.1rem;
}

.dropdown-content {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: white;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  z-index: 10;
  border-radius: 0 0 1rem 1rem;
  margin-top: 5px;
  max-height: 300px;
  overflow-y: auto;
}

.list-item {
  display: flex;
  align-items: center;
  padding: 1rem;
}

.location-icon.small {
  margin-right: 1rem;
}

.secondary-text {
  font-size: 0.9rem;
  color: #6d6d6d;
}

.units-toggle {
  display: flex;
  flex-shrink: 0;
  white-space: nowrap;
}

.unit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.2s;
}

.unit-btn .degree {
  font-size: 1.2rem;
  margin-right: 2px;
}

.units-toggle .degree {
  font-size: clamp(1.2rem, 2vw, 2rem);
  font-weight: 900;

  display: inline-block;
  vertical-align: middle;
  line-height: 1;
}

.units-toggle > button {
  background-color: transparent;
  border: none;

  padding: 0.2rem;

  font-family: "Font Awesome 6 Free", sans-serif;
  font-size: 1rem;
  letter-spacing: 0.1rem;
}

.header-current-temp {
  display: flex;
  flex-direction: column;
  margin: 3vw 0 5vw;
}

.current-temp {
  font-size: clamp(4rem, 8vw, 7rem);
}

.desc {
  font-weight: 500;
}

.header-info {
  font-size: 1rem;
}

.hilo-temp {
  display: flex;
}

.hilo-temp img {
  width: 1rem;
  height: 1rem;
}

.hi-temp,
.lo-temp {
  display: flex;
  align-items: center;
}

.day-section {
  display: contents;
}

.day-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-self: center;

  width: 100%;
  max-width: 180px;
  overflow: hidden;

  padding: 0 0 1.5vw 0;
  background-color: #fff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
}

.day-card-day {
  background-color: #000000;
  color: white;
  font-size: clamp(1.2rem, 2.5vw, 2.2rem);
  width: 100%;
  text-align: center;
  padding: 0.8vw 0;

  box-shadow: 0 4px 4px rgba(0, 0, 0, 0.2);
  z-index: 1;
}

.day-card div:nth-child(2) {
  margin: 2vw 0 0;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
}

.day-card-desc {
  font-size: clamp(1rem, 1.8vw, 1.6rem);
}

/* Mobile */
@media (max-width: 600px) {
  body {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 15px;
  }

  .header-card {
    grid-column: 1 / -1;
  }

  .header {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
  }

  .location-icon {
    width: 28px;
    height: 28px;
    min-width: 28px;
  }

  .weather-search-container {
    flex: 1;
    min-width: 0;
  }

  .city-input {
    width: 100%;
    height: 40px;
    font-size: 16px;
    padding-left: 2.5rem;
  }

  .units-toggle {
    flex-shrink: 0;
  }

  .day-card {
    width: 100%;
    max-width: 200px;
    padding-bottom: 15px;
  }

  .day-card-day {
    width: 100%;
  }
}
