

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.title-container {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  text-align: center; /* Center text in case of multi-line titles */
}

.title {
    text-align: center;
    font-weight: normal;
    font-size: 0.9rem;
    flex: 1 1 auto;
}

.home-icon {
    margin: 0;
    max-width: 30px;
    width: 100%;
}

.home-link {
    flex: 0 0 auto;    
}

.hello {
  flex: 0 0 auto; /* Keep the login link as its content size */
  align-self: flex-start;
  font-size: 10px;
}

.hello a {
    color: black;
}


#book-container {
    margin: 0 auto;
}

.pagecontrols {
      display: flex;
      align-items: center; /* Centers items vertically */
      justify-content: space-between; /* Distributes items horizontally */
      width: 100%;
      max-width: 600px;
      height: 50px; /* Set height for the container */
      margin: 0 auto;
}

.pagecontrols img {
    cursor:pointer;
    width:33%;
    max-width: 250px;
}

.pagecontrols img:hover {
  filter: invert(20%);
}

.pagecontrols img:active {
  filter: invert(50%);
}

.pagecontrols .chapterpicker {
    width: 7%;
}

/* Chapter selection menu */
.chapter-menu {
    position: fixed;
    bottom: 0; /* Initially hidden below the screen */
    left: 0;
    width: 100%;
    background-color: #f4f4f4;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease-in-out;
    transform: translateY(110%);
    z-index: 1000;
    /*max-height: 80vh; [> Prevent menu from covering entire screen <]*/
    overflow-y: auto; /* Make list scrollable when it exceeds max height */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}


.chapter-menu.show {
    transform: translateY(0); /* Slides the menu into view */
}

.chapter-menu ul {
    list-style: none;
    padding: 20px;
    margin: 0;
}

.chapter-menu ul li {
    margin: 10px 0;
    font-size: 1.2rem;
}

.close-button {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.2rem;
    cursor: pointer;
    background: none;
    border: none;
    color: #333;
}

.chapter-menu a:link {
  color: inherit; /* Inherit the color from the parent element (same as regular text) */
  text-decoration: none; /* Optional: remove underline */
}

/* Style for visited links */
.chapter-menu a:visited {
  color: inherit; /* Inherit the color from the parent element (same as regular text) */
  text-decoration: none; /* Optional: remove underline */
}

.chapter-menu li:hover {
  background-color: rgba(0, 0, 0, 0.1); /* Darker background on hover */
}

.chapter-menu li a {
  display: block; /* Make the <a> fill the entire <li> */
  text-decoration: none; /* Remove underline */
  color: inherit; /* Ensure the text color is inherited from the parent */
  width: 100%;  /* Ensure the link fills the entire <li> */
  box-sizing: border-box; /* Ensure padding is inside the link's width */
}

/* mobile styles */
@media (width <= 600px) {
    .title {
        font-size: 0.7rem;
        margin: 8px 0 12px 0;
    }

    html, body {
        overflow-x: hidden;
        margin: 0;
    }

    img.button {
        /* display: none; */
    }

    .pagecontrols {
        margin-top: 10px;
    }

    .header {
        padding: 7.5px;
    }

    .home-icon {
        max-width: 15px;
    }

    .hello {
        font-size: 8px;
    }
}

/* desktop styles */
@media (width > 600px) {
    #book-container {
        margin: 20px auto;
    }

    .pagecontrols {
        margin-top: 20px;
    }
}
