:root {
	--color-article:#b85c7e;
	--color-bookreview:#7a5da7;
	--color-essay:#5ca4ba;
	--color-book-chapter:#5eb86e;
	--color-other:#b9845c;
	--library-header-color:#1b2032;
}

.library-container {
	display:flex;
	flex-direction: row;
	width:100%;
	max-width: 1160px;
	margin:0 auto;
}
.library-sidebar {
	width:25%;
	padding-right:3rem;
	box-sizing:border-box;
	font-size: 0.75rem; /* 9px */
}
.library-sidebar h3, 
.library-wrapper h3 {margin-top:0;}
.library-sidebar ul {
	list-style-type: none;
	padding:0
}
.library-sidebar li {
	margin-bottom:0.25rem;
}
.library-sidebar li.active-topic a {
	text-decoration:none !important;
	cursor:default;
	font-weight:700;
}
.topics-toggle {display:none}
.library-wrapper {
	display:flex;
	flex-direction: column;
	width:75%;
}
.library-back {
	font-size:1rem;
}
.tile-container {
	display:flex;
	flex-wrap: wrap;
	width:75%;
	align-items: flex-start;
	justify-content: flex-start;
	row-gap: 3rem;
	column-gap: 3%;
}
.library-wrapper .tile-container {
	width:100%;
}
.library-tile {
	font-family: "poppins", sans-serif;
	font-weight: 400;
	font-style: normal;
	width:30%;
	position: relative;
	line-height:1;
}
.tile-topic {
	position:absolute;
	left:0;
	top:0;
	width:100%;
	background-color: rgba(0,0,0,0.6);
	color:white;
	padding:5px 10px;
	box-sizing: border-box;
	font-size:0.5625rem /* 9px */;
	border-radius: 12px 12px 0 0;
}
.tile-thumbnail {
	width:100%;
	background:#c8c8c8;
	background-size: cover;
	border-radius: 12px;
	/* aspect-ratio: 16 /9; */
	height:0;
	padding-top:56.25%;
	/* let's move the above height and padding-top to the contained a, see below */
	height:auto;
	padding-top:0;
}
.loaded {
  background-image: var(--bg-image);
}
.tile-thumbnail a {
	display:block;
	width:100%;
	height:0;
	padding-top:56.25%;
}
.tile-author {font-size:0.625rem /* 10px */}
.tile-title {
	line-height: 1.2;
	font-size:0.8126rem /* 13px */;
	font-weight:600;
}
.tile-meta {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	font-size:0.625rem; /* 10px */
	padding-bottom:6px;
	border-width: 0 0 1px 0;
	border-style: solid;
}
.tile-author, .tile-title, .tile-meta {margin-top:0.75rem;}
.tile-type {text-transform: uppercase;}
.library-tile.tile-type-article .tile-meta {color:var(--color-article); border-color: var(--color-article);}
.library-tile.tile-type-essay .tile-meta {color:var(--color-essay)}
.library-tile.tile-type-book-review .tile-meta {color:var(--color-bookreview)}
.library-tile.tile-type-book-book-chapter .tile-meta {color:var(--color-book-chapter)}
.library-tile.tile-type-other-materials .tile-meta {color:var(--color-other)}

/* make tiles all the same height in a row
.tile-container {align-items: stretch;}
.library-tile {
	display: flex;
	flex-direction: column;
	flex-wrap: nowrap;
	justify-content: space-between;
} */


.pagination-links {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	justify-content: center;
	width: 100%;
	gap: 1rem;
}


/* FILTER BAR */
/* https://www.w3schools.com/howto/howto_js_filter_elements.asp */
.page-id-7590 #main, 
.tax-writer #main,
.tax-topic #main {
	padding-top:0 !important
}
.filter-bar {
	width: 100%;
	position: absolute;
	left: 0;
	margin: 0 auto;
	background-color: var(--library-header-color);
	display: flex;
	flex-direction: row;
	justify-content: center;
	z-index:1;
}
.publication-filter {
	width: var(--site_width);
	max-width: var(--site_width);
	padding-bottom:0;
	padding-left:0;
	display: flex;
	flex-direction: row;
	justify-content: start;
}
.page-id-7590 .post-content, 
.tax-writer .post-content,
.tax-topic .post-content {padding-top:5rem}
.myBtnContainer {padding-left:25%}

.library-tile {display:none;}
.library-tile.show {display:block;}

/* Style the buttons */
.btn {
  font-family: "poppins", sans-serif;
  font-size:0.75rem /* 12px */;
  border: none;
  outline: none;
  padding: 9px 16px;
  background-color:transparent;
  cursor: pointer;
  color: white;
  border-top-width: 2px;
  border-top-style: solid;
}
.btn.filter-article {border-top-color: var(--color-article)}
.btn.filter-essay {border-top-color: var(--color-essay)}
.btn.filter-book-review {border-top-color: var(--color-bookreview)}
.btn.filter-book-chapter {border-top-color: var(--color-book-chapter)}
.btn.filter-other {border-top-color: var(--color-other)}
.btn.filter-all {border-top-color: var(--library-header-color)}

.btn:hover, 
.btn.active {
  background-color: #303959;
}

/* Style the active button */
.btn.active.filter-article {background-color: var(--color-article)}
.btn.active.filter-essay {background-color: var(--color-essay)}
.btn.active.filter-book-review {background-color: var(--color-bookreview)}
.btn.active.filter-book-chapter {background-color: var(--color-book-chapter)}
.btn.active.filter-other {background-color: var(--color-other)}


@media (max-width:1024px) {
	.library-container {
		padding: 1rem;
		box-sizing: border-box;
	}
}

@media (max-width:480px) {
	.page-id-7590 .post-content, 
	.tax-writer .post-content,
	.tax-topic .post-content {padding-top:3rem}
	
	.publication-filter {justify-content: center}
	.myBtnContainer {padding-left:0}
	.btn {
		padding:9px 6px;
		font-size:0.625rem;
	}
	.btn span {display:none}
	.btn.filter-book-review::after {content: "Reviews"}
	.btn.filter-book-chapter::after {content: "Books/Chapters"}
	
	.library-container {
		padding:0;
	}
	.library-wrapper {width:100%;}
	.library-wrapper h3 {margin-bottom:0.5rem;}
	.tile-container {
		width:100%;
		padding:2.5rem 0 0;
		row-gap:2.5rem;
	}
	.tax-writer .tile-container,
	.tax-topic .tile-container {padding:0.75rem 0 0;}
	
	.library-tile {width:100%;}
	.tile-main {
		display:flex;
		column-gap: 1rem;
	}
	.tile-section {
		position: relative;
		width: 100%;
	}
	.tile-title {margin-top:0.25rem;}
	.tile-meta {margin-top: 0;}
	.tile-type {text-align: end;}
	
/* 	TOPICS MENU */
	.library-wrapper {padding-top:2.25rem;}
	.library-sidebar {
	  overflow: hidden;
	  z-index: 1;
	  position: absolute;
	  width: 100%;
	  display: flex;
	  flex-wrap: nowrap;
	  flex-direction: column;
	  padding-right:0;
	  padding-left:12px;
	  background-color:white;
	}
	.library-sidebar h3 {
		margin-bottom:0;
		font-weight:400 !important;
		font-size:0.75rem !important;
		letter-spacing: normal !important;
		line-height:25px !important;
	}
	.library-sidebar .topic-list {
		display: none;
		padding-bottom:12px;
		border-bottom: 1px solid #ddd;
	}
	.library-sidebar li {margin-bottom:0}
	.library-sidebar a {
		padding: 4px;
  	  	display: block;
		line-height:1;
	}
	.topics-menu {
		display:flex;
		flex-direction:row;
		padding:0;
	}
	.library-sidebar a.topics-toggle {padding:6px;}
	.library-sidebar a:hover {color: black;}
}
