.city-selector-container {
  place-content: end;
  order: 1;
}

.city-selector {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  width: 100%;
  position: relative;
}

.city-selector-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

@media screen and (min-width: 576px) {
  .city-selector-container {
    order: -1;
    place-content: start;
  }
}

@media screen and (min-width: 992px) {
  .city-selector-container {
    place-content: unset;
    place-items: unset;
  }
  .city-selector {
    position: sticky;
    top: var(--space-4);
    gap: var(--space-4);
    height: fit-content
  }
}

.button-wrapper {
  display: flex;
  justify-content: end;
  gap: var(--space-2);
  align-items: center;
  flex-direction: column-reverse;
}

.button-wrapper button {
  width: 100%;
}

.site-header {
  font-size: var(--font-size-h2);
}

@media screen and (min-width: 576px) {
    .button-wrapper {
    flex-direction: row;
  }

  .button-wrapper button {
    width: auto;
  }

  .site-header {
    font-size: var(--font-size-h1);
  }
}

.city-input-container {
  position: relative;
  display: flex;
  align-items: center;
}

.clear-button {
  position: absolute;
  right: 0;
  margin-inline-end: 1em;
}

.suggestions {
  position: absolute;
  bottom: 0;
  top: 100%;
  height: fit-content;
  list-style: none;
  border-radius: 0 0 var(--space-2) var(--space-2);
  z-index: 1;
  width: 100%;
  overflow: hidden;
  box-shadow: 0 6px 12px var(--dark);
}

.suggestions li {
  padding: 0.5em 1em;
  background: var(--neutral-800);
  transition: ease-out 0.3s;
}

.suggestions li:hover {
  background: var(--neutral-700);
  transition: none;
}

.suggestions li:active {
  background: var(--neutral-600);
}

.options-wrapper {
  display: flex;
  gap: var(--space-2);
  width: 100%;
}

.options-wrapper button {
  flex-grow: 1;
  display: flex;
  padding: 1em;
}

.app-description {
  font-size: var(--font-size-h6);
}

@media screen and (min-width: 576px) {
  .app-description {
    font-size: var(--font-size-h5);
  }
}

@media screen and (min-width: 992px) {
  .options-wrapper {
    flex-shrink: 1;
  }
}

.recent-cities-grid {
  display: grid;
  gap: var(--space-2);
  grid-template-columns: repeat(auto-fill, minmax(var(--space-5), 1fr));
  margin-block-start: var(--space-1);
  place-content: center;
}

.recent-city-card {
  outline: 1px solid var(--secondary);
  padding: var(--space-1);
  border-radius: var(--space-1);
  cursor: pointer;
  transition: ease-out 0.3s;
  display: flex;
  align-items: center;
  gap: var(--space-1);
  position: relative;
  background: var(--background-color);
}

.recent-city-card:hover {
  background: var(--neutral-800);
  transform: scale(1.05);
  transition: none;
}

.recent-city-card:active {
  transform: scale(1);
  background: var(--background-color);
}

.recent-city-card img {
  aspect-ratio: 1/1;
  width: var(--space-3);
  height: var(--space-3);
}


.recent-city-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.delete-recent-city-button {
  color: var(--danger-400);
  position: absolute;
  top: 0;
  right: 0;
  display: none;
  cursor: pointer;
  background: var(--danger-800);
  aspect-ratio: 1/1;
  height: calc(var(--space-1) + var(--space-2));
  width: calc(var(--space-1) + var(--space-2));
  display: none;
  justify-content: center;
  align-items: center;
  border-radius: 0 var(--space-1) 0 var(--space-1);
}

.delete-recent-city-button:hover {
  color: var(--white);
  background: var(--danger-500);
  transform: scale(1.1);
}

.recent-city-card:hover .delete-recent-city-button {
  display: flex;
}

.recent-city-data {
  display: flex;
  gap: 0 var(--space-1);
  flex-wrap: wrap;
}

@media (hover:none){
  .delete-recent-city-button {
    display: flex;
  }
}
