:root {
	--black: #0a0a0a;
	--white: #f5f5f5;
	--red: #9e2f1e;
	--light-grey: #e6e6e9;
	--mid-grey: #9999a1;
	--dark-grey: #2A2D34;
	--blue: #274C77; 
	--light-blue: #A3C0E1;
	--green: #6F8F66;
	
	--links: var(--blue);
	
	--hover: linear-gradient(rgb(0 0 0/20%) 0 0);
	
}

@font-face {
  font-family: 'Viking';
  src: url('VIKING-N.otf');
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	text-decoration: none;
}

body {
	min-height: 100vh;
	background: var(--light-grey);
	color: var(--black);
}

.header {
	background: var(--dark-grey);
	
	color: var(--light-grey);
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 12px;
	padding: 12px;
}

.header .bar {
	width: 1px;
	height: 32px;
	background: var(--mid-grey);
	margin: 0 12px;
}

.header a img {
	width: 64px;
}

.header-title {
	font-family: 'Viking', sans-serif;
	font-size: 32px;
}

.header-links {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 12px;
}

.header-links a {
	color: var(--mid-grey);
	font-family: "Spectral", serif;
	font-weight: 500;
}

@media screen and (max-width: 720px) {

	.header .bar {
		display: none;
	}

	.header a img {
		width: 48px;
	}

	.header-title {
		display: none;
	}
}

h1, h2, h3 {
	font-family: "Spectral", serif;
	font-weight: 500;
}

a {
	color: var(--blue);
	font-weight: bold;
}

p, th, td, tr, th, input, select, textarea, button {
	font-family: "Spectral", serif;
	font-weight: 400;
}

.body {
	padding: 12px;
}

h1 {
	padding: 12px;
	width: 100%;
	text-align: center;
	font-size: 48px;
}

p {
	padding-bottom: 12px;
}

#searchBoxTile, input, select, button {
	padding: 4px 12px;
	font-size: 18px;
	border: 0;
	border-radius: 4px;
}

input[type="submit"], button {
	background: var(--blue);
	color: var(--white);
	cursor: pointer;
}
button.clear {
	background: var(--dark-grey);
}
input[type="submit"]:hover, button:hover {
	background-image: var(--hover);
}

select, option {
	cursor: pointer;
}

/* Book Tiles */

.top-items {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

#filterForm {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	padding: 12px;
	border-radius: 6px;
	background: var(--mid-grey);
	margin: 0 12px;
}

.number-returned {
	text-align: right;
	font-family: "Spectral", serif;
}

.button-row {
	display: flex;
	justify-content: right;
	align-items: center;
}

.button-row a {
	background: var(--red);
	color: var(--white);
	font-family: "Spectral", serif;
	font-size: 24px;
	font-weight: bold;
	padding: 6px 12px;
	border-radius: 6px;
	line-height: 1;
}

.button-row a:hover {
	background-image: var(--hover);
}

.items {
	width: 100%;
	padding: 12px;
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.item {
	width: 100%;
	background: var(--white);
	border-radius: 12px;
	
	display: flex;
	flex-wrap: wrap;
}

.photo {
	width: 5%;
	padding: 12px;
}

.photo.clicked {
	width: 15%;
}

.photo img {
	width: 100%;
	border-radius: 6px;
	cursor: zoom-in;
}

.photo.clicked img {
	cursor: zoom-out;
}

.item-info {
	width: 85%;
	padding: 12px;
	display: flex;
	flex-wrap: wrap;
	align-content: flex-start;
	gap: 12px;
	font-family: "Spectral", serif;
}

.item-info.clicked {
	width: 70%;
}

@media screen and (max-width: 720px) {
	.photo {
		width: 100%;
		padding: 12px;
		text-align: center;
	}
	.photo.clicked {
		width: 100%;
	}
	
	.photo img {
		max-width: 300px;
		margin: auto;
	}

	.item-info {
		width: 100%;
		padding: 12px;
	}
	.item-info.clicked {
		width: 100%;
	}
	select {
		width: 100%;
	}
}

.item-info > * {
	width: 100%;
	
}

.item-info > .title {
	font-size: 32px;
	font-weight: bold;
}

.item-info > .author, .item-info > .genre, .item-info > .collection {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.pillbox {
	padding: 12px;
	border-radius: 6px;
	background: var(--light-grey);
}

.pillbox .label {
	width: 100%;
	line-height: 1;
	padding-bottom: 4px;
}

.label.bottom {
	padding-bottom: 0;
	padding-top: 4px;
	font-size: 18px;
	line-height: 1;
}

.label i {
	color: var(--red);
	height: 18px;
}

.label .number {
	font-size: 32px;
	font-family: "Viking", sans-serif;
	color: var(--red);
	padding-right: 4px;
}

div.pill {
	padding: 4px 12px;
	background: var(--light-blue);
	border-radius: 18px;
	cursor: pointer;
	color: var(--black);
	font-weight: normal;
}

div.pill:hover {
	background-image: var(--hover);
}

div.pill.current-query {
	background: var(--green);
}

.pagination {
	font-family: "Spectral", serif;
	font-size: 24px;
	display: flex;
	flex-wrap: nowrap;
	justify-content: center;
	align-items: center;
	gap: 12px;
}

.pagination a {
	color: var(--blue);
}

@media screen and (max-width: 720px) {
	.pagination {
		font-size: 16px;
	}
}

/* */

		
.footer {
	min-height: 30vh;
	width: 100%;
	background: var(--black);
	text-align: center;
	padding: 64px 12px;
	color: var(--mid-grey);
	font-family: "Spectral", serif;
	font-weight: 400;
	position: relative;
	margin-top: 12px;
}

.footer::before {
	content: "";
	background-image: url('../img/shelf.jpg');
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	right: 0;
	filter: grayscale(100%) brightness(20%);
	
	z-index: 1;
}

.footer-link {
	width: 100%;
	display: block;
	color: var(--mid-grey);
	position: relative;
	z-index: 2;
}

.footer .bar {
	
	width: 64px;
	height: 1px;
	background: var(--mid-grey);
	margin: auto;
	margin-top: 12px;
	margin-bottom: 12px;
	
	position: relative;
	z-index: 2;
}

.footer a {
	color: var(--links);
	font-weight: bold;
	position: relative;
	z-index: 2;
}

.footer p {
	
	position: relative;
	z-index: 2;
}

a.footer-link {
	width: 100%;
	display: block;
	color: var(--mid-grey);
	position: relative;
	z-index: 2;
}

.backToTop {
  font-size: 24px;
  text-align: center;
  position: fixed;
  right: 0px;
  transform: translate(-30%, -30%);
  bottom: 0px;
  border-radius: 1000px;
  padding: 12px;
  line-height: normal;
  width: 51px;
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 4px 8px 0 rgba(0, 0, 0, 0.2);
  background: var(--red);
  z-index: 3;
  color: var(--white);
}
.backToTop:hover {
	background-image: var(--hover);
}
.backToTop:active {
  box-shadow: none;
}

.noSelect {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
.noSelect:focus {
    outline: none !important;
}

.pointer {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
	cursor: pointer;
}
.pointer:focus {
    outline: none !important;
}
.pointer:active {
  background-color: transparent;
      outline: none !important;
}