@charset "UTF-8";

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap');

:root {
  --bg-dark: #0000005b;
  --bg-dark-header: #000000bd;
  --border-bg: #ffffff5b;

  --color1: #1B263B;
  --color2: #415A77;
  --color3: #00B4D8;
  --color4: #E0E1DD;
  --color5: #FFB703;

  --font1: "Open Sans", sans-serif;
}

* {
  margin: 0;
  padding: 0;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  font-family: var(--font1);
  color: var(--color4);
}

span#video {
  position: fixed;
  width: 100%;
  height: 100%;
  background-color: var(--bg-dark);
  z-index: -1;
}

video {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: -2;
}

#search-location {
  display: flex;
  gap: 5px;
  padding: 10px;
  background-image: linear-gradient(to bottom, var(--bg-dark-header), var(--bg-dark-header), transparent);
}

#location-input {
  height: 31px;
  padding: 5px;
  border: none;
  border-radius: 5px;
  font-size: 0.9em;
  color: var(--color4);
  background-color: var(--border-bg);
}

#location-input:focus-within {
  outline: 2px solid var(--color3);
}

button {
  width: 31px;
  padding: 3px;
  border: none;
  border-radius: 5px;
  font-size: 1.1em;
  color: var(--color4);
  background-color: var(--color5);
  transition: background-color 0.1s, transform 0.1s;
}

button:hover {
  cursor: pointer;
  background-color: var(--color3);
}

button:active {
  background-color: var(--color2);
  transform: scale(0.9);
}

main {
  flex: 1;
  position: relative;
  height: 100%;
  margin: 15px;
}

#today-info {
  max-width: 600px;
  margin: 30px auto 0 auto;
  padding: 15px;
  color: var(--color4);
}

#location-group {
  display: flex;
  gap: 5px;
}

#location-icon-span {
  display: grid;
  align-content: center;
  justify-content: center;
}

#location-icon-span > i {
  font-size: 0.8em;
}

h1 {
  font-size: 1em;
}

#temperature-area {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

#temperature {
  font-size: 5em;
  font-weight: normal;
}

#temperature::after {
  content: "°C";
}

#apparent-temperature-area > p {
  font-size: 0.75em;
}

#apparent-temperature-area > h2 {
  font-size: 1em;
  text-align: right;
}

#apparent-temperature-area > h2::after {
  content: "°C";
}

.others-info {
  display: grid;
  grid-auto-flow: column;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  justify-items: center;
  gap: 10px;
  margin-top: 20px;
}

.others-info-item {
  display: flex;
  gap: 5px;
}

.others-info-item > i {
  color: var(--color3);
  text-shadow: 0 0 3px var(--color1);
}

.wind-speed::after {
  content: " Km/h";
}

.relative-humidity::after {
  content: " %";
}

.precipitation::after {
  content: " mm";
}

.pressure::after {
  content: " hPa";
}

#weather-forecast {
  max-width: 500px;
  margin: auto;
  padding: 10px;
  border-radius: 10px;
  background-color: var(--border-bg);
  box-shadow: 0 0 5px var(--color1);
}

#weather-forecast-header {
  margin-bottom: 10px;
}

#weather-forecast-header > h3 {
  display: inline-block;
  font-size: 1em;
}

#weather-forecast-area {
  display: flex;
  flex-direction: column;
}

.weather-forecast-item {
  display: flex;
  justify-content: space-between;
  padding: 8px;
  border-top: 1px solid var(--border-bg);
}

.visible {
  display: flex;
}

.invisible {
  display: none;
}

.weather-forecast-item > p {
  flex: 0 0 70px;
}

.weather-forecast-item div {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.item-precipitation p::after {
  content: "%";
}

.item-temperature p::after {
  content: "°";
}

.weather-forecast-item span {
  width: 50px;
  height: 5px;
  border-radius: 5px;
  background-image: linear-gradient(to right, var(--color5), var(--color5), var(--color3), var(--color3));
}

.full-forecast {
  margin-top: 10px;
  text-align: center;
}

a {
  color: var(--color4);
}

@media screen and (min-width: 500px) {
  #temperature-area {
    justify-content: space-around;
  }

  #temperature {
    font-size: 7em;
  }

  #apparent-temperature-area > p {
    font-size: 1em;
  }

  #apparent-temperature-area > h2 {
    font-size: 1.25em;
  }
}