.shelf_view {
  position: absolute;
  left: 0%;
  transition-duration: 0.2s;
  background-color: var(--desk-bg);
  height: 100vh;

  /* These are set so the floating book (which briefly floats in the middle of the screen is correct */
  /*
  display: flex;
  align-items: center;
  flex-direction: column;
  */
}

.shelf-overall-container {
  width: 100%;
  height: 100%;

  display: grid;
  grid-template-rows: 5em 1fr 3em;
  overflow: visible;
}

.shelf-container {
  position: relative;
  width: 100%;
  height: 100%;
  max-height: 100%;
  box-sizing: border-box;
  overflow: auto;
  background-color: var(--shelf-timber);
}

.shelf {
  padding-top: 1em;
  padding-bottom: 1em;
  box-sizing: border-box;
  display: flex;
  flex-flow: column wrap;
  height: 100%;
  /* TODO: media query to make this nicer on phone */
  max-width: 400px;
  min-width: 200px;
  column-gap: 1em;
}

/** Shelf Top **/
.shelftop {
  /*
  display: grid;

  grid-template-columns: 1em 1em 1fr 1em 1em;
  grid-template-rows: 3em 1em 1em;
  */
  position: sticky;
  top: 0;
  height: 5em;
  z-index: 8;
}

.shelftop .shelftop-content {
  /*
  grid-column: 3/4;
  grid-row: 1/4;
  */
  background-color: var(--shelf-shelftop);
  height: 5em;
}

/* The top level parent element of a labels */
/* I don't remember why I need a container here */
.shelf-header-container {
  width: 100%;
  /*background-color: var(--shelf-back-wall);*/
		 margin-top: calc(1.2em + 1px);
		 margin-bottom: calc(1.2em + 1px);
}


.shelf-header {
  width: 100%;
  background-color: var(--shelf-header);
  height: calc(6.6em + 3px);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
	border: solid 4px var(--shelf-header-border);
	box-sizing: border-box;
	padding: 0.7em;
}

.shelf-header .shelf-header-heading {
  margin-top: 0px;
  margin-bottom: 0.2em;
}

.shelf-header-inner {
  width: 100%;
	height: 100%;
  background-color: var(--shelf-header);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
	border: solid 2px var(--shelf-header-border);
}

.shelf-header-inner .shelf-header-text {
	margin: 0;
}

.shelf-header .shelf-header-subtitle {
  font-style: italic;
}

/** An article sitting on the shelf has the class book */
shelf-book {
  width: 100%;
}

.book-container {
  background-color: var(--shelf-back-wall);
  width: 100%;
}

.book {
  display: grid;
  grid-template-columns: 3fr 0.6em 1fr;
  grid-column-gap: 0.5em;

  background-color: var(--book-bg);
  height: 2.2em;
  width: 100%;

  transition: margin 0.2s;
  user-select: none;
  z-index: 1;
  border-bottom: solid 1px var(--shelf-shelftop);
  border-left: solid 1px var(--shelf-shelftop);
  cursor: pointer;
}

.book-container:hover .book {
  margin-left: 1em;
  margin-right: -1em;
}

.book .grid-cell {
  overflow: hidden;
  display: flex;
  align-items: center;
  height: 100%;
}

.book h2,
.floating_book h2 {
  width: 100%;
		 font-family: var(--font-site-text);
  margin: 0;
  margin-left: 0.5em;
  font-weight: normal;
  font-size: 11pt;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.book .date-container {
  width: 7em;
  display: flex;
  justify-content: flex-end;
}

.book h3,
.floating_book h3 {
  white-space: nowrap;
  justify-self: flex-end;
  margin-right: 0.5em;
  font-weight: normal;
  font-size: 0.9em;
  opacity: 0.5;
  margin: 0;
}

.book summary {
  opacity: 0.8;
  margin-left: 1em;
}

.book-strip {
  height: 100%;
  width: 100%;
}

/** */
#desk-drop-zone {
  position: absolute;
  align-self: center;
  top: 60%;
  margin-top: -50%;
  height: 100%;
  width: 10em;
  background-color: black;
  display: none;
}

.nonshelf {
  margin-top: -1em;
  margin-bottom: -1em;
  height: calc(100% + 2em);
  background-color: black;
  width: 2em;
}

#floating_book {
  clip-path: rect(0px 100% 100% 0px);
  position: absolute;
	z-index: 10;
}

/* Old class */
/* .floating_book { */
/*   position: absolute; */
/*   background-color: blue; */
/**/
/*   /*transition-duration: var(--article-bg);*/
*/
/*   transition-duration: var(--trans); */
/*   z-index: 35; */
/*   overflow: hidden; */
/* } */

.floating_book .fb_heading_container {
	z-index: 35;
  position: absolute;
  top: 0;
  left: 0;
  height: 2em;
  display: flex;
  align-items: center;
}

.floating_book_content {
  transition-duration: var(--trans);
}

.shelf-footer {
  background-color: var(--shelf-shelftop);
}

/** This fake background is what fades away when the viewer closes. It actually exists in the shelf */
#fake_background {
	position: fixed;
	top: 0px;
	left: 0px;
	width: 100vw;
	height: 100vh;

	z-index: 9;

	pointer-events: none;
	background-color: rgba(0, 0, 0, 0);
	
	
}
