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

body {
  font-family: "Open Sans Condensed", sans-serif;
  margin: 0;
}

header {
	overflow: auto;
	padding: 0 1rem;
	background-color: hsl(0, 70%, 50%);
	color: white;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
}
header > * {
	grid-column: 2 / 3;
}


#search {
  display: grid;
  grid-column-gap: 0.5em;
  grid-template-columns: min-content 1fr;
}

#search h2 {
  grid-column: 1 / 3;
}

footer {
  text-align: right;
  padding: 0.5em 1rem;
  background-color: hsl(0, 70%, 50%);
  color: white;
}

footer a {
  color: inherit;
}

img {
	width: 100%;
	height: 300px;
	object-fit: cover;
}
main {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	grid-column-gap: 2em;
}

article {
  animation: fadeIn 0.8s;
  padding: 0 1rem;
}



#meta {
  display: flex;
  justify-content: space-between;
  padding: 0.5em 0;
}

#loader {
	font-size: 3em;
	width: 1em;
	height: 1em;
	box-sizing: border-box;
	border-style: solid;
	border-width: 0.5em;
	border-color: hsl(0, 70%, 50%) white;
	border-radius: 50%;
	position: fixed;
	left: calc(50vw - 0.5em);
	top: calc(50vh - 0.5em);
	opacity: 0;
	animation: spin 0.5s ease-in-out alternate infinite;
	transition: 0.5s;
}

#loader.waiting {
	opacity: 1;
}

.modal {
	display: none;
	position: fixed;
	height: 100vh;
	width: 100vw;
	background-color: hsla(0, 70%, 10%, 0.7);
	top: 0;
	left: 0;
	overflow-y: scroll;
	align-items: center;
}

.modal.on {
	display: flex;
}

.modal img {
	height: auto;
	position: absolute;
	top: 0;
}

@keyframes spin {
	0% { transform: rotate(-45deg); }
	100% { transform: rotate(45deg); }
}

@keyframes fadeIn {
  0% { opacity: 0; }
  40% { opacity: 0; }
  100% { opacity: 1; }
}


@media screen and (min-width: 700px) {
	header {
		font-size: 1.2em;
	}
}
