/* HTML5 display-role reset for older browsers */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
  display: block;
}
ol,
ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

blockquote,
q {
  quotes: none;
}

blockquote:before,
blockquote:after,
q:before,
q:after {
  content: "";
  content: none;

  /* reset chrome useragent setting for blockqoute */
  -webkit-margin-start: 0;
  -webkit-margin-end: 0;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}
/* end of reset */

/* reset focus */

:focus {
  outline-style: none;
  box-shadow: none;
  border-color: transparent;
}

/* universal polyfills for unknown html objects */

main {
  display: block;
}

app-media-resized {
  display: block;
  position: relative;
}

.grid {
  position: absolute;
  width: 100vw;
  height: 100vh;
  background-color: #fbffc9;
  overflow: hidden;
}

.grid .contents {
  position: absolute;
  transform-origin: 0 0;
}

.bookTitle {
  font-size: 90px;
  color: black;
}

.books {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  row-gap: 10px;
  gap: 50px;
  /* color: rgb(54, 54, 54); */
}

.book {
  width: 800px;
}

#linkToZoomCode {
  margin: 10px;
  text-align: center;
  width: 165px;
  height: 30px;
  border-radius: 5px;
  background-color: #dbb34c;
  color: #5b310f;
  font-size: medium;
  font-family: Arial, Helvetica, sans-serif;
}

a {
  text-decoration: none;
}

/* #zoomLevel {
  
  position: fixed;
      top: 0;
      right: 0;
      background-color: #f0f0f0; 
      z-index: 2;

} */

#logo {
  opacity: 70%;
}

body {
  background-color: #fbffc9;
  margin: 0;
  padding: 0;
}

nav {
  background-color: #ffeb6a;
  width: 100vw;
  height: 60px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 5px;
}

.navButt {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  width: 165px;
  height: 30px;
  border-radius: 5px;
  background-color: #dbb34c;
  color: #5b310f;
  font-size: medium;
  font-family: Arial, Helvetica, sans-serif;
  transition: all 0.2s ease-in-out;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navButt:hover {
  background-color: rgb(156, 207, 255);
}

.navButt:active {
  transform: scale(0.95);
}

/* about page */

#about {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: center;
  text-align: center;
  width: 50%;
}

.chapter-heading {
  font-weight: bold;
}

spacer {
  height: 50px;
}

.highlight {
  background-color: rgb(60, 255, 0);
}

/* search bar */

#searchContainer {
  display: flex;
  align-items: center;
  height: 50px;
  width: auto;
  max-width: 500px;
  background-color: #fcf5bb;
  border-radius: 5px;
  font-family: Arial, Helvetica, sans-serif;
  gap: 20px;
}

#highLabel {
  font-size: medium;
  color: #5b310f;
  margin-left: 20px;
}

#searchInput,
#highlightColorPicker,
#searchButton,
#resetButton {
  border-radius: 5px;
  border: none;
  height: 30px;
}

#highlightColorPicker,
#searchButton,
#resetButton {
  background-color: antiquewhite;
}

#highlightColorPicker:hover,
#searchButton:hover,
#resetButton:hover {
  background-color: rgb(156, 207, 255);
}

#searchInput {
  width: 200px;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
}

/*Link to Patreon*/

#patreonStuff {
  display: flex;
  flex-direction: row;
  gap: 10px;
  align-items: center;
}

#patreonLink {
  display: flex;
  flex-direction: row;
  align-content: center;
  background-color: rgb(156, 207, 255);
  border-radius: 5px;
  height: auto;
  width: auto;
}

h4,
h5 {
  color: #5b310f;
  font-family: Arial, Helvetica, sans-serif;
}

#pLinkLabel {
  z-index: 4;
  color: #5b310f;
  font-family: Arial, Helvetica, sans-serif;
}

#pLogo {
  z-index: 5;
  width: 170px;
  height: 95px;
}

/* Styling for the dropdown container */
#bookResults {
  display: none; /* Hide the dropdown by default */
  top: 100%;
  min-width: 200px;
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  z-index: 1;
  padding: 8px;
  margin-right: 10px;
  border: none;
  border-radius: 5px;
}

/* Styling for dropdown options */
#bookResults option {
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.2s ease;
}

#bookResults option:hover {
  background-color: #f5f5f5;
}

/* Show the dropdown when the search results are available */
#bookResults.show {
  display: block;
}

.hide {
  display: none !important;
}
/* .spinner-container {
  width: 100px;
  height: 100px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.spinner {
  border: 8px solid rgba(0, 0, 0, 0.1);
  border-top-color: lightblue;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s ease-in-out infinite;
} */

/* @keyframes spin {
  to {
      transform: rotate(360deg);
  }
} */

/* Styling for the slider */

.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100px; /* Change width to adjust the thickness of the slider */
  height: 15px; /* Change height to adjust the length of the slider */
  background: #ffaf01;
  outline: none;
  opacity: 0.7;
  -webkit-transition: 0.2s;
  transition: opacity 0.2s;
  position: relative;
  top: 200px; /* Set top to adjust the vertical position of the slider */
  left: 5; /* Set left to 50% to center the slider horizontally */
  transform: rotate(90deg) translateX(-50%); /* Rotate the slider vertically and center it horizontally */
  transform-origin: top left;
}

.slider:hover {
  opacity: 1;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 25px;
  height: 25px;
  background: #ff6200;
  cursor: pointer;
}

.slider::-moz-range-thumb {
  width: 25px;
  height: 25px;
  background: #ff6200;

  cursor: pointer;
}

.color-div {
  width: 100%;
  height: 100%;
  background-color: #877b62;
}

/* Mobile-first responsive styles */
@media screen and (max-width: 768px) {
  nav {
    height: auto;
    flex-direction: column;

    position: relative;
    z-index: 100;
    width: 100%;
    overflow-x: hidden;
  }

  .navButt {
    width: calc(100% - 20px);
    height: 40px;
  }

  #searchContainer {
    flex-direction: column;
    height: auto;

    padding: 10px;
    gap: 10px;
    margin: 5px 10px;
    border-radius: 5px;
  }

  #highLabel {
    margin-left: 0;
  }

  #searchInput,
  #highlightColorPicker,
  #searchButton,
  #resetButton {
    width: 100%;
    max-width: 300px;
    height: 40px;
  }

  #versionSelect {
    width: calc(100% - 20px);
    height: 40px;
    margin: 5px 10px;
    padding: 5px;
    border-radius: 5px;
  }

  #bookResults {
    width: calc(100% - 20px);
    max-width: 300px;
    margin: 5px 10px;
  }
}

/* For very small screens */
@media screen and (max-width: 380px) {
  .navButt {
    font-size: 14px;
    height: 35px;
  }

  #searchContainer {
    padding: 5px;
  }

  #searchInput,
  #highlightColorPicker,
  #searchButton,
  #resetButton {
    height: 35px;
  }
}

/* Mobile-first responsive styles */
@media screen and (max-width: 768px) {
  nav {
    height: auto;
    flex-direction: column;
  }

  .navButt {
    width: 100%;
  }

  #searchContainer {
    flex-direction: column;
    height: auto;
    padding: 10px;
    gap: 10px;
  }

  #searchInput {
    width: 100%;
  }

  .grid {
    touch-action: none;
  }

  .books {
    gap: 20px;
  }

  .book {
    width: 100%;
    max-width: 400px;
  }
}

/* Modern design improvements */
.grid {
  background: linear-gradient(145deg, #fbffc9, #fff8e0);
}

nav {
  background: linear-gradient(to right, #ffeb6a, #ffe03d);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Touch-friendly controls */
@media (hover: none) {
  .slider {
    height: 30px;
    opacity: 1;
  }

  .slider::-webkit-slider-thumb {
    width: 30px;
    height: 30px;
  }

  .navButt {
    min-height: 44px;
  }
}
