/* RESET ===========================================*/
*,
*::after,
*::before {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* GLOBAL STYLING ==================================*/
body {
  position: relative;
  display: flex;
  font-family: "Open Sans", sans-serif;
  font-weight: 300;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background: url(./img/mountain.jpg) no-repeat center center/cover;
  padding: 0 1rem;
}

body > * {
  z-index: 2;
}

body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  opacity: 0.4;
}

ul,
li {
  list-style: none;
}

/* =================================================
Weather Card
==============*/

.card {
  padding: 3rem;
  background: rgba(0, 0, 0, 0.7);
  width: max(30vw, 475px);
  min-height: 50vh;
  color: whitesmoke;
  border-radius: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 300ms ease;
}

/* INPUT SEARCH FORM =================================*/

.search-form {
  width: 100%;
  display: flex;
  flex-direction: row;
  margin-bottom: 1rem;
}

.search-form input {
  width: 90%;
  padding: 0.8rem 1.2rem;
  border-radius: 30px;
  background: rgba(51, 51, 51, 0.7);
  color: #fff;
  font-size: 1.2rem;
  outline: none;
  border: none;
}

.search-form button {
  padding: 0.8rem 1rem;
  margin-left: 1rem;
  border-radius: 50%;
  background: rgba(51, 51, 51, 0.7);
  transition: background 250ms ease;
  outline: none;
  border: none;
}

.search-form button:hover {
  background: rgba(85, 85, 85, 0.7);
}

/* SEARCHED RESULTS POP UP CARD  ====================*/

#search-group {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  margin: 0;
  background: rgba(0, 0, 0, 0.7);
  padding: 0 1rem;
  display: none;
  place-items: center;
}

#search-results {
  background: #ccc;
  color: #000;
  padding: 1rem 1.5rem;
  border-radius: 30px;
  width: max(25vw, 350px);
  font-weight: 400;
  transition: all 300ms ease;
  transform: translateY(20%);
  opacity: 0;
}

.search-results h2 {
  padding: 1rem 0;
}

#search-result-item {
  padding: 1rem 0;
  border-top: #333 solid 1px;
  cursor: pointer;
}

#many-lists {
  padding: 0.5rem 0;
  font-weight: bold;
}

.lat-item,
.lon-item {
  font-size: 0.8rem;
}

/* MAIN DISPLAY DATA ===============================*/

.weather {
  display: flex;
  flex-direction: column;
  align-content: space-between;
}

.location {
  margin-bottom: 1rem;
}

.city {
  font-weight: bold;
}

.info-1 {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  margin: 1rem 0;
}

.info-1 div:nth-child(2) {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

#icon {
  width: 125px;
  height: 70px;
  overflow: hidden;
}

#wicon {
  width: 120px;
  height: 120px;
  margin: -20px 0 0 23px;
}

.temp {
  font-size: min(3rem, 10vw);
  margin-bottom: 0.5rem;
}

.info-2 {
  font-size: min(1rem, 3vw);
  padding: 1rem 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 1rem;
  row-gap: 0.2rem;
}

.bg-img-author {
  position: fixed;
  bottom: 0;
  right: 0;
  color: whitesmoke;
  font-size: 0.8rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.8rem;
  border-radius: 10px;
}

.bg-img-author a {
  color: white;
}
