:root {
  --bg-color: linear-gradient(
    to right,
    hsl(198, 44%, 11%),
    hsl(195, 35%, 19%),
    hsl(198, 39%, 28%)
  );
  --text-color: var(--clr-neutral-100);

  --clr-neutral-100: hsl(0, 0%, 100%);
  --clr-neutral-200: hsl(0, 0%, 90%);

  --clr-neutral-100-transp-1: hsla(0, 0%, 100%, 0.25);
  --clr-neutral-100-transp-2: hsla(0, 0%, 100%, 0.1);

  --error: hsl(0, 100%, 68%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html,
body {
  height: 100%;
}

body {
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

h1,
h2,
h3 {
  line-height: 1;
}

/* styling */

body {
  font-family: "Satoshi", sans-serif;
  font-size: 16px;
  display: grid;
  place-content: center;
  min-width: 100vw;
  background: var(--bg-color);
  color: var(--text-color);
}

.container {
  width: 80vw;
  max-width: 25em;
  background: var(--clr-neutral-100-transp-2);
  border: 1px solid var(--clr-neutral-100-transp-1);
  border-radius: 0.5rem;
  padding: 1rem;
  box-shadow: 2px 2px 5px var(--clr-neutral-100-transp-1);
}

/* search box */

.search {
  height: min-content;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.search input {
  border: none;
  outline: none;
  width: 80%;
  font-weight: 500;
  padding: 0.375rem 0.5rem;
  background: transparent;
  color: var(--text-color);
  border-bottom: 1px solid var(--clr-neutral-100-transp-1);
  transition: border-bottom 375ms ease;
}

.search input:focus {
  border-bottom: 1px solid var(--clr-neutral-100);
}

.search button {
  border: none;
  outline: none;
  background: none;
  cursor: pointer;
}

.search button i {
  font-size: 1.5rem;
  color: var(--clr-neutral-100-transp-1);
  transition: color 250ms ease;
}

.search button i:hover {
  color: var(--clr-neutral-200);
}

/* weather box */

.weather {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.weather-icon {
  width: 10rem;
}

.weather h1 {
  font-size: 1.5rem;
  font-weight: 300;
}

.weather h3 {
  font-weight: 300;
  text-transform: capitalize;
}

.weather-details {
  width: 100%;
  display: flex;
  justify-content: space-evenly;
  margin-top: 3rem;
}

.col {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.col i {
  font-size: 2rem;
}

.humidity,
.wind {
  font-size: 1.25rem;
}

/* error 404 */

.error-404 {
  margin-inline: 3.75rem;
  display: none;
  font-weight: 500;
}

.error-404 p {
  color: var(--error);
}

/* media queries */

@media (max-width: 479px) {
  .weather-details {
    width: fit-content;
    margin-top: 2rem;
    flex-direction: column;
    gap: 1rem;
  }

  .col {
    text-align: center;
  }

  .search input::placeholder {
    font-size: 0.65rem;
  }
}
