
/* Variables are used like this: var(--text-color) */

@import url('https://fonts.bunny.net/css?family=amethysta:400);');
:root {
  /* Background Colors: */
  --background-color: #E0A6C3;
  --content-background-color: #F2CEDC;
  --sidebar-background-color: #FCC0D7;

  /* Text Colors: */
  --text-color: #000000;
  --sidebar-text-color: #000000;
  --link-color: #94003A;
  --link-color-hover: #500B66;

  /* Text: */
  --font: 'Amethysta', sans-serif;
  --heading-font: 'Amethysta', sans-serif;
  --font-size: 17px;

  /* Other Settings: */
  --margin: 14px;
  --padding: 20px;
  --border: 1px dashed #000000;
  --round-borders: 4px;
  --sidebar-width: 214px;
}


* {
  box-sizing: border-box;
}

body {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 100vh;
  font-size: var(--font-size);
  margin: 0;
  padding: var(--margin);
  color: var(--text-color);
  font-family: var(--font);
  line-height: 1.2;
  background: var(--background-color);
}

body {
  background-image: url("../images/kitabg.png");
  background-repeat: repeat-y;
  background-size: 100% auto;
  background-position: top center;
}

::selection {
  /* (Text highlighted by the user) */
  background: rgba(0, 0, 0, 0.2);
}

mark {
  /* Text highlighted by using the <mark> element */
  text-shadow: 1px 1px 4px var(--link-color);
  background-color: inherit;
  color: var(--text-color);
}

/* Links: */
a {
  text-decoration: underline;
}

a,
a:visited {
  color: var(--link-color);
}

a:hover,
a:focus {
  color: var(--link-color-hover);
  text-decoration: none;
}



/* library!*/


.library-header {
  max-width: 750px;
  margin: 30px auto 0;
  text-align: center;
}

.library-title {
  font-style: italic;
  letter-spacing: 6px;
  margin: 0;
  padding-bottom: 15px;
  border-bottom: 3px dashed var(--link-color);
}

.library-intro {
  max-width: 750px;
  margin: 20px auto 30px;
  padding: 25px 30px;
  background: var(--content-background-color);
  border: 1px solid #322018;
  border-radius: 10px;
  box-shadow: 0 0 0 3px #0A0101;
  text-align: center;
}

.library-intro p {
  margin: 0;
  font-family: monospace;
  line-height: 1.6;
}



.shelf-unit {
  width: 750px;
  max-width: 95%; /* prevents overflow on smaller screens */
  flex-shrink: 0;
  margin: 30px auto;
  border: 5px solid #322018;
  outline: 15px solid #322018;
  outline-offset: -5px;
  padding: 0px 0px;
}

.shelf-row {
  background-image: url("images/shelf.png");
  background-repeat: repeat-x;
  background-size: auto 100%;
  background-position: center;
  min-height: 150px;
  min-width: 100%;
  line-height: 150px;
  padding: 0px 20px;
  position: relative;
  vertical-align: text-bottom;
  margin-bottom: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-end;
  gap: 10px;
}

.shelf-row:last-child {
  margin-bottom: 0;
}

.shelf-row img {
  filter: drop-shadow(0px 0px 5px black);
  height: 120px;
}

.shelf-row details,
.shelf-row summary {
  display: inline-block;
  position: relative;
  line-height: 0;
  vertical-align: top;
  margin-top: 0px;
  max-width: 100px;
}

.shelf-row summary img:hover {
  filter: drop-shadow(0px 5px 5px black);
}

.shelf-row details[open] summary {
  margin-right: 180px;
  transition: margin-right 0.5s;
}

.book-info {
  display: none;
}

.shelf-row details[open] .book-info {
  display: block;
  position: absolute;
  background: var(--content-background-color);
  width: 160px;
  height: 120px;
  padding: 15px;
  left: 85px;
  top: 0;
  z-index: 100;
  max-height: 120px;
  margin: 10px;
  overflow-y: scroll;
  overflow-x: hidden;
  font-size: 12px;
}

.shelf-row summary img:hover {
  filter: drop-shadow(0px 5px 5px black);
  transform: scale(1.1);
  transition: transform 0.15s ease;
}

.book-info h5 {
  text-align: center;
  font-size: 12px;
  margin: 10px 0;
  padding: 5px 2px;
  border-bottom: double var(--link-color) 4px;
  border-top: double var(--link-color) 4px;
}

.book-info div {
  display: flex;
  align-items: flex-start;
  width: 100%;
  border-bottom: 1px solid var(--link-color);
  gap: 10px;
  padding: 4px 0;
}

.book-info span:first-of-type {
  width: 50px;
  font-weight: bold;
  text-align: right;
  color: var(--link-color);
  text-transform: uppercase;
  font-size: 11px;
  line-height: 1.2em;
  flex-shrink: 0;
}

.book-info span:last-of-type {
  flex: 1;
  padding-left: 8px;
  border-left: 1px solid var(--link-color);
  text-transform: capitalize;
  line-height: 1.2em;
  font-style: italic;
}

.back-postcard {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 500;
  display: block;
  transition: transform 0.15s ease;
}

.back-postcard img {
  width: 90px;
  height: auto;
  filter: drop-shadow(2px 3px 5px rgba(0,0,0,0.3));
  transform: rotate(-6deg);
}

.back-postcard:hover img {
  transform: rotate(-2deg) scale(1.05);
}
.back-postcard-label {
  position: absolute;
  bottom: -22px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: var(--link-color);
  color: #fff;
  font-size: 0.75em;
  padding: 3px 8px;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.back-postcard:hover .back-postcard-label {
  opacity: 1;
}

/* other */

main h1,
main h2,
main h3,
main h4,
main h5,
main h6 {
  font-family: var(--heading-font);
  margin-bottom: 0;
  line-height: 1.5;
}

main h1:first-child,
main h2:first-child,
main h3:first-child,
main h4:first-child,
main h5:first-child,
main h6:first-child {
  margin-top: 0;
}

main h1 {
  font-size: 1.5em;
}

main h2 {
  font-size: 1.4em;
}

/* please do not remove this. */

#skip-to-content-link {
  position: fixed;
  top: 0;
  left: 0;
  display: inline-block;
  padding: 0.375rem 0.75rem;
  line-height: 1;
  font-size: 1.25rem;
  background-color: var(--content-background-color);
  color: var(--text-color);
  transform: translateY(-3rem);
  transition: transform 0.1s ease-in;
  z-index: 99999999999;
}

#skip-to-content-link:focus,
#skip-to-content-link:focus-within {
  transform: translateY(0);
}

