.hero {
  min-height: 0;
  padding: 42px 42px 54px;
}
.hero-location {
  margin-top: 0;
}
.hero-date {
  margin-top: 6px;
}
.temperature-row {
  margin-top: 10px;
}

/* Search overlay — isolated from the weather dashboard */
.search-overlay {
  z-index: 100;
  padding: 24px 16px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  background: rgba(4, 16, 34, 0.68);
  backdrop-filter: blur(18px);
  overscroll-behavior: contain;
}
.search-panel {
  position: relative;
  width: min(620px, 100%);
  max-height: min(760px, calc(100dvh - 48px));
  margin: 0;
  overflow: hidden;
  padding: 24px;
  border-radius: 28px;
  background: linear-gradient(
    155deg,
    rgba(43, 105, 181, 0.98),
    rgba(25, 68, 127, 0.98)
  );
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
  display: flex;
  flex-direction: column;
}
.search-header {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}
.search-header h2 {
  margin: 3px 0 18px;
  font-size: 27px;
  line-height: 1.1;
}
.search-header .eyebrow {
  color: rgba(255, 255, 255, 0.68);
}
.close-search {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
  font-size: 27px;
  line-height: 1;
  cursor: pointer;
}
.close-search:active {
  transform: scale(0.96);
}
.search-form {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  flex: 0 0 auto;
}
.search-form input {
  width: 100%;
  height: 54px;
  min-width: 0;
  padding: 0 42px 0 46px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  outline: 0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  color: #172235;
  font-size: 17px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
}
.search-form input::placeholder {
  color: #66758b;
}
.search-form input:focus {
  border-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 0 3px rgba(126, 219, 255, 0.22);
}
.search-form .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 21px;
  height: 21px;
  z-index: 2;
  pointer-events: none;
  color: #6f8096;
}
.search-form .search-icon svg,
.use-location svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.search-form button {
  height: 54px;
  min-width: 104px;
  padding: 0 18px;
  border: 0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.search-form button:hover {
  background: rgba(255, 255, 255, 0.23);
}
.use-location {
  width: 100%;
  height: 52px;
  margin-top: 10px;
  padding: 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 11px;
  text-align: left;
  cursor: pointer;
  font-weight: 600;
}
.use-location:hover {
  background: rgba(255, 255, 255, 0.15);
}
.search-status {
  flex: 0 0 auto;
  min-height: 22px;
  margin: 15px 3px 8px;
  padding: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}
.search-results {
  min-height: 0;
  overflow-y: auto;
  display: grid;
  gap: 9px;
  padding: 2px 2px 4px;
  overscroll-behavior: contain;
}
.search-results::-webkit-scrollbar {
  width: 5px;
}
.search-results::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 99px;
}
.search-results::-webkit-scrollbar-track {
  background: transparent;
}
.result-button {
  width: 100%;
  min-height: 76px;
  padding: 12px 13px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 11px;
  text-align: left;
  cursor: pointer;
  transition:
    background 0.16s ease,
    transform 0.16s ease,
    border-color 0.16s ease;
}
.result-button:hover,
.result-button:focus-visible {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.24);
  transform: translateY(-1px);
  outline: none;
}
.result-button:before {
  content: "⌖";
  width: 42px;
  height: 42px;
  margin: 0;
  border-radius: 13px;
  background: rgba(130, 205, 255, 0.18);
  color: #e7f9ff;
  display: grid;
  place-items: center;
  font-size: 19px;
}
.result-button div {
  min-width: 0;
  padding: 0;
}
.result-button strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 16px;
  line-height: 1.25;
}
.result-button span {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  line-height: 1.2;
}
.result-button b {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 25px;
  font-weight: 400;
}
@media (max-width: 600px) {
  .hero {
    padding: 26px 17px 40px;
  }
  .hero-location {
    font-size: 23px;
  }
  .temperature-row {
    margin-top: 5px;
  }
  .search-overlay {
    padding: 12px 10px max(12px, env(safe-area-inset-bottom));
    align-items: flex-start;
  }
  .search-panel {
    width: 100%;
    max-height: calc(100dvh - 24px);
    padding: 18px 14px 14px;
    border-radius: 24px;
  }
  .search-header h2 {
    font-size: 25px;
    margin: 3px 0 15px;
  }
  .close-search {
    width: 40px;
    height: 40px;
  }
  .search-form {
    grid-template-columns: minmax(0, 1fr) 84px;
    gap: 8px;
  }
  .search-form input {
    height: 52px;
    font-size: 16px;
    border-radius: 17px;
  }
  .search-form button {
    height: 52px;
    min-width: 0;
    padding: 0 10px;
    border-radius: 17px;
  }
  .use-location {
    height: 50px;
    margin-top: 9px;
    border-radius: 16px;
  }
  .search-status {
    margin: 13px 3px 7px;
  }
  .search-results {
    gap: 8px;
  }
  .result-button {
    min-height: 72px;
    grid-template-columns: 42px minmax(0, 1fr) 20px;
    padding: 10px 11px;
    border-radius: 17px;
    gap: 9px;
  }
  .result-button:before {
    width: 40px;
    height: 40px;
  }
  .result-button strong {
    font-size: 15px;
  }
  .result-button span {
    font-size: 11px;
  }
  .result-button b {
    font-size: 22px;
  }
}
@media (max-width: 360px) {
  .search-form {
    grid-template-columns: 1fr;
  }
  .search-form button {
    width: 100%;
  }
  .search-panel {
    padding: 16px 12px;
  }
  .search-header h2 {
    font-size: 23px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .result-button {
    transition: none;
  }
}
