/* * GLOBAL */

:root {
  --primary-colour: #292e2d;
  --secondary-colour: red;
  --text-colour: d1bd9e;
}

body {
  background-color: #292e2d;
  color: #d1bd9e;
  margin: 1.5em;
}

* {
  box-sizing: border-box;
  font-family: "Poppins";
}

iframe {
  border: none;
  max-width: 8rem;
  zoom: 0.6;
}

/* using local font rather than making another request */
@font-face {
  font-family: "Poppins";
  src: url("Poppins-Regular.ttf") format("truetype");
}

/* * NON-SPECIFIC PRIMITIVES */

/* ~?|| CARD ||  */

.card {
  background-color: rgb(36, 36, 39);
  border-radius: 0.8rem;
}

.day {
  width: 5rem;
}

/* ~?|| STACK ||  */

.stack > * + * {
  margin-top: 2.5rem;
}

.stack-sm > * + * {
  margin-top: 0.4rem;
}

/* ? || FLEX || */

.flex {
  display: flex;
}

.flex__wrap {
  flex-wrap: wrap;
}

.flex--scroll-x {
  overflow-x: auto;
}

.flex__col {
  flex-direction: column;
}

.align-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.space-between {
  justify-content: space-between;
}

.space-around {
  justify-content: space-around;
}

.flex-start {
  justify-content: flex-start;
}

.flex-end {
  justify-content: flex-end;
}

.flex > * p {
  margin: 0;
}

/* ? || GENERAL || */

.hidden {
  display: none;
}

.error {
  border: red;
  border-width: 3px;
  border-style: solid;
  border-radius: 5px;
  animation: shake 0.5s;
}

.text-center {
  text-align: center;
}

.center {
  max-width: 21rem;
  margin-inline: auto;
}

.center-lg {
  max-width: 40rem;
}

/* * SPECIFIC PRIMITIVES */

/* .blur {
  filter: blur(4px);
} */

.loading {
  position: fixed;
  background-color: rgb(32, 32, 32);
  width: 80vw;
  left: 50vw;
  margin-left: -40vw;
  margin-top: -5vh;
  padding: 7vw;
  z-index: 20;
}

#curr_temp {
  font-size: xx-large;
}

/* ~ || weather details */

#weather-details {
  padding-left: 1.5em;
}

#weather-details > h3 {
  margin-block: 0em;
  font-size: small;
}

/* ~ || global */

#global {
  padding: 0%;
}

#global > * {
  width: 9rem;
  margin: 0.5em;
  padding: 1em;
}

#global > * :first-child {
  overflow: hidden;
  text-overflow: clip;
  margin-bottom: auto;
}

#global > * iframe {
  padding-top: 1em;
  flex-grow: 1;
  align-self: center;
}

/* ~ || week */

#week {
  padding: 0;
  align-content: stretch;
}

#week > * {
  margin: 0.3em;
  padding: 1.3rem;
}

#week > * iframe {
  zoom: 0.4;
  margin-top: auto;
}

.city {
  /* flex: ~ grow - shrink - basisi */
  flex: 1 0 auto;
}

#postcodeForm {
  z-index: 10;
  position: absolute;
  width: 18rem;
  left: 0;
  right: 0;
  padding: 1.3rem;
}

li {
  list-style: none;
  padding: 0;
}

hr {
  width: 0px;
  margin: 0%;
}

header > button {
  max-height: 2em;
  align-self: center;
}

#results > iframe {
  margin-inline: 1.5rem;
  zoom: 0.4;
}

/* ? || AUTO || */

.autocomplete {
  position: absolute;
  /* needs changin */
  left: 3rem;
  z-index: 10;
  background-color: rgb(131, 155, 155);
  opacity: 0.95;
  padding: 0.5rem;
  border-radius: 3px;
}

.autocomplete > * {
  list-style-type: none;
}

.autocomplete li > button {
  border: none;
  background-color: inherit;
  width: 10ch;
}

.autocomplete li > button:hover {
  color: blanchedalmond;
}

/* ? || ANIMATION || */

@keyframes shake {
  0% {
    transform: translate(1px, 1px) rotate(0deg);
  }
  50% {
    transform: translate(-1px, -2px) rotate(-1deg);
  }
  100% {
    transform: translate(1px, 1px) rotate(0deg);
  }
}
