
:root {
  --background-primary: #000000d0;
  --background-secondary: #7c7c7c2b;
  --background-secondary-hover: #7c7c7c6b;
  --text-color: white;
  --border-radius-lg: 30px;
  --border-radius-md: 24px;
  --border-radius-sm: 5px;
  --font-family: 'Open Sans', sans-serif;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  font-family: var(--font-family);
  background-color: #222;
  background-size: cover;
  font-size: 120%;
}

.card {
  background: var(--background-primary);
  color: var(--text-color);
  padding: 2em;
  border-radius: var(--border-radius-lg);
  width: 100%;
  max-width: 420px;
  margin: 1em;
}

.search {
  display: flex;
  align-items: center;
  justify-content: center;
}

button {
  margin: 0.5em;
  border-radius: 50%;
  border: none;
  height: 44px;
  width: 44px;
  outline: none;
  background: var(--background-secondary);
  color: var(--text-color);
  cursor: pointer;
  transition: 0.2s ease-in-out;
}

input.search-bar {
  border: none;
  outline: none;
  padding: 0.4em 1em;
  border-radius: var(--border-radius-md);
  background: var(--background-secondary);
  color: var(--text-color);
  font-family: inherit;
  font-size: 105%;
  width: calc(100% - 100px);
}

button:hover {
  background: var(--background-secondary-hover);
}

h1.temp {
  margin: 0;
  margin-bottom: 0.4em;
}

.flex {
  display: flex;
  align-items: center;
}

.description {
  text-transform: capitalize;
  margin-left: 8px;
}

.weather.loading {
  visibility: hidden;
  max-height: 20px;
  position: relative;
}

.weather.loading:after {
  visibility: visible;
  content: "Loading...";
  color: var(--text-color);
  position: absolute;
  top: 0;
  left: 20px;
}

.hourly-forecast {
  display: flex;
  overflow-x: auto;
  margin-top: 1.5em;
  padding-bottom: 1.5em;
  scrollbar-width: thin;
  scrollbar-color: var(--background-secondary-hover) var(--background-secondary);
}

.hourly-forecast::-webkit-scrollbar {
  height: 8px;
}

.hourly-forecast::-webkit-scrollbar-track {
  background: var(--background-secondary);
  border-radius: 4px;
}

.hourly-forecast::-webkit-scrollbar-thumb {
  background-color: var(--background-secondary-hover);
  border-radius: 4px;
}

.hourly-forecast-item {
  flex-shrink: 0;
  text-align: center;
  margin: 0 10px;
}

.hourly-forecast-time {
    font-size: 0.8em;
    color: #aaa;
}

.hourly-forecast-icon {
    width: 40px;
    height: 40px;
}

.hourly-forecast-temp {
    font-size: 0.9em;
    color: var(--text-color);
}

.forecast {
  display: flex;
  justify-content: space-around;
  margin-top: 1em;
}

.forecast-day {
  text-align: center;
}

.forecast-date {
  font-size: 0.8em;
  color: #aaa;
}

.forecast-icon {
  width: 50px;
  height: 50px;
}

.forecast-temps {
  font-size: 0.9em;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.forecast-temp-max {
  font-weight: bold;
}

.forecast-temp-min {
  color: #ccc;
}

.city-selection {
  margin-top: 1em;
  max-height: 150px;
  overflow-y: auto;
}

.city-selection ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.city-selection li {
  padding: 0.5em;
  cursor: pointer;
  border-radius: var(--border-radius-sm);
  transition: background-color 0.2s;
}

.city-selection li:hover {
  background-color: var(--background-secondary-hover);
}
