body,
html {
  height: 100%;
  margin: 0;
  padding: 0;
}
:root {
  --black: #2d3142;
  --blue: #003566;
  --gray: #bfc0c0;
  --orange: #ef8354;
  --red: #bc4b51;
  --darkred: #963f44;
  --green: #5b8e7d;
}
* {
  padding: 0;
  border: none;
  margin: 0;
}
*:focus {
  outline: none;
}
body {
  background-color: lightblue;
  background-image: url("./weather-backgrounds/fewclouds.jpg");
  display: flex;
  flex-direction: column;
  background-repeat: no-repeat;
  background-size: cover;
  background-attachment: fixed;
  background-position-y: center;
}

/****************Header********************/
header {
  padding: 30px;
  font-size: 35px;
  font-family: Georgia, "Times New Roman", Times, serif;
  background-color: var(--black);
  opacity: 0.5;
  color: white;
  display: flex;
  justify-content: space-between;
  margin: 20px 0;
}
header:focus-within {
  opacity: 1;
}
#city-input-div {
  display: flex;
  justify-content: start;
  align-items: center;
  background-color: white;
  padding: 0 10px;
  border-radius: 50px;
}
header input {
  color: black;
  background: transparent;
  text-align: center;
  width: 0;
}
.show-input {
  width: auto !important;
}
#logo-div {
  display: flex;
  justify-content: center;
  align-items: center;
}
#logo-div img {
  width: 70px;
  margin-right: 10px;
}
header #input-image {
  cursor: pointer;
}
/********************main*********************/
main {
  font-family: cursive;
  background-image: linear-gradient(to bottom, lightblue, var(--orange));
  box-shadow: 10px 10px 10px black;
  color: white;
  /* padding: 30px; */
  width: 70%;
  margin-left: 50%;
  transform: translateX(-50%);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 800px;
  max-width: 1000px;
  border-radius: 30px;
  opacity: 0.9;
  margin-bottom: 40px;
}
main #location {
  font-family: Arial, Helvetica, sans-serif;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: right;
  min-width: 200px;
  font-size: 15px;
  margin: 20px;
}

#latitude {
  margin-left: 5px;
}
#latitude,
#longitude {
  font-weight: bold;
}
#main-footer {
  display: flex;
  justify-content: space-between;
  width: 100%;
}
#main-weather-div {
  font-weight: bold;
  font-size: 65px;
  margin-top: 20px;
  display: flex;
  align-items: center;
}
#main-weather-div > * {
  padding: 0 10px;
  margin: 10px 0;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-decoration-color: whitesmoke;
}
#city-name {
  border-right: 1px solid white;
  font-weight: normal;
}
.temp-div {
  display: flex;
  align-items: center;
  justify-content: center;
}
#temp-min-max-div {
  font-size: 15px;
  display: flex;
}
#temp-min-max-div > * {
  margin: 0 10px;
}
.temp-div .temp-value {
  margin-left: 5px;
}

#description {
  font-size: 35px;
  margin: 40px;
  letter-spacing: 4px;
}
#max-temp {
  padding: 0 10px;
  border-left: 1px solid white;
  border-right: 1px solid white;
}
#humidity,
#wind-speed {
  font-size: 20px;
  margin: 10px;
  font-weight: 700;
  font-family: Arial, Helvetica, sans-serif;
}
#humwind-div {
  width: 50%;
  display: flex;
  justify-content: space-between;
}

#toggle-unit-button {
  cursor: pointer;
  padding: 15px;
  line-height: 3px;
  background: white;
  color: orange;
  border: 3px outset white;
  border-radius: 25%;
  font-weight: bolder;
  font-family: monospace;
  box-shadow: 0px 5px 3px gray;
  margin: 20px;
}
#toggle-unit-button:hover {
  background-color: whitesmoke;
}
#toggle-unit-button:active {
  transform: translateY(1px);
  background-color: whitesmoke;
  box-shadow: 0px 3px 3px rgb(82, 82, 82);
}
#loading-tyre-div {
  position: absolute;
  border: 1px solid black;
  width: 100%;
  height: 100%;
  border-radius: 30px;
  background-color: rgba(0, 0, 0, 0.4);
  display: grid;
  place-items: center;
  transform: scale(0);
}
.show-loading {
  transform: scale(1) !important;
}
#error-div {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 30px;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  transform: scale(0);
}
#error-statement-div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
#error-statement-div img {
  margin-right: 17px;
}
#error-statement-div p {
  font-size: 30px;
  color: white;
  text-align: center;
  font-weight: bold;
}
#try-again-button {
  width: 40%;
  padding: 10px 10px;
  background-color: var(--red);
  cursor: pointer;
  color: white;
  font-weight: bolder;
  font-size: 30px;
  border-radius: 70px;
}
#try-again-button:hover {
  text-decoration: underline;
  background-color: var(--darkred);
}
#error-statement-div img {
  width: 80px;
  margin-bottom: 20px;
}
.show-error {
  transform: scale(1) !important;
}
/*******************footer*********************/
body > img {
  display: none;
}
footer {
  position: relative;
  bottom: 0;
  margin-top: auto;
  font-family: sans-serif;
  color: darkgray;
  text-align: center;
  background: rgba(1, 1, 1, 0.5);
  padding: 10px 20px;
  display: flex;
  justify-content: space-around;
}
footer img {
  width: 80px;
  margin-left: 20px;
}
footer p {
  display: flex;
  justify-content: center;
  align-items: center;
}
