body{
  font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
  background-image: url("../images/Background.jpg");
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;
  /*
  background-color: darkcyan;
  
  */
}

.homepage-title {
  color: cyan;
  font-weight: bold;
  font-size: 40px;
  font-style: italic;
  text-align: center;
  margin: 15px;
}

hr.rounded {
  border: none;
  border-top: 6px solid aqua;
  border-radius: 5px;
}

.universal-margin {
  margin-top: 20px;
  margin-bottom: 20px;
  color: white;
}

.books-margin {
  margin-left: 10%;
  margin-right: 10%;
}

.book-view {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  background-color: rgb(0 0 0 / 0.4);
  padding: 20px;
  border-radius: 30px;
  margin-top: 20px;
  margin-bottom: 20px;
  color: white;
}

.book-cover{
  border: none;
  height: 200px;
  width: 150px;
  object-fit: contain;
}

.book-page-ratio {
  margin-left: 4%;
}

.page-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  margin-left: 10px;
}

.page-row {
  display: flex;
  flex-direction: row;
}

.progress-bar {
  --progress: 0%;
  height: 15px;
  border-radius: 20px;
  width: 100%;
  background: linear-gradient(to right, red var(--progress), yellow var(--progress));
  margin-top: 35px;
  position: relative;
}

.progress-bar-filled {
  height: 15px;
  border-radius: 20px;
  background: red;
  margin-top: 35px;
  position: relative;
}

.add-note-button {
  margin-top: 23px;
  margin-left: 15px;
  margin-right: 1px;
  border-radius: 50px;
  cursor: pointer;
  color: white;
  background-color: red;
  border: none;
  height: 40px;
  font-weight: bold;
  font-style: italic;
}

.progress-button {
  height: 25px;
  width: 25px;
  border-radius: 20px;
  background: orange;
  cursor: pointer;
  border: none;
  position: absolute;
  margin-top: -5px;
  left: var(--progress);
  transform: translateX(-50%);
}

.input-page-number {
  height: 30px;
  width: 200px;
  background-color: darkblue;
  border: none;
  border-radius: 5px;
  color: white;
  text-align: center;
  font-size: large;
  font-weight: bold;
  align-self: center;
  margin-left: 5%;
}

.add-book {
  background-color: rgb(0 0 0 / 0.9);
  border-radius: 30px;
  color: white;
  height: 50px;
  width: 100px;
  font-weight: bold;
}

.dialog {
  border: none;
  padding: 0%;
  background: transparent;
}

.form-layout {
  justify-content: space-evenly;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: rgb(0 0 0 / 0.8);
  border-radius: 30px;
  color: rgb(255 255 255 / 0.8);
  height: 400px;
  width: 500px;
}

.submit-button, .cancel-button {
  background-color: rgb(0 0 0 / 0.9);
  border-radius: 30px;
  color: white;
  height: 40px;
  width: 90px;
  font-weight: bold;
  margin-left: 5px;
  margin-right: 5px;
}

.book-title, .book-pages {
  background-color: darkcyan;
  border-radius: 30px;
  border-color: cyan;
  font-weight: bold;
  color: white;
  height: 40px;
  width: 320px; 
}

.image-file-placement{
  justify-content: space-evenly;
  align-items: center;
  margin-left: 10%;
}

.delete-button{
  background-color: red;
  border-radius: 40px;
  height: 40px;
  width: 40px;
  cursor: pointer;
  margin-left: 95%;
}

/* --- Note Popup Dialog --- */
.note-dialog {
  border: none;
  padding: 0;
  background: transparent;
}

.note-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  background-color: rgb(0 0 0 / 0.85);
  border: 2px solid cyan;
  border-radius: 20px;
  padding: 25px;
  width: 320px;
  color: white;
}

.note-dialog-title {
  font-size: 18px;
  font-weight: bold;
  color: cyan;
  text-align: center;
}

.note-textarea {
  height: 90px;
  border-radius: 10px;
  border: none;
  padding: 10px;
  font-family: inherit;
  font-size: 14px;
  resize: none;
}

.note-dialog-buttons {
  display: flex;
  justify-content: space-evenly;
}

.note-submit-btn,
.note-cancel-btn {
  padding: 8px 20px;
  border-radius: 15px;
  border: none;
  font-weight: bold;
  cursor: pointer;
}

.note-submit-btn {
  background-color: cyan;
  color: black;
}

.note-cancel-btn {
  background-color: rgb(255 255 255 / 0.2);
  color: white;
}

/* --- Feather Marker & Hover Tooltip on the Progress Bar --- */
.feather-wrapper {
  position: absolute;
  top: -32px;
  transform: translateX(-50%);
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.feather-icon {
  height: 35px;
  width: auto;
  cursor: pointer;
  filter: drop-shadow(0px 2px 3px rgba(0, 0, 0, 0.7));
  transition: transform 0.15s ease;
}

.feather-wrapper:hover .feather-icon {
  transform: scale(1.2);
}

.note-tooltip {
  display: none;
  position: absolute;
  top: 100%;          /* Changed from bottom: 100% — places the box below the feather */
  left: 50%;
  transform: translateX(-50%);
  padding-top: 22px;  /* Changed from padding-bottom — bridges the 15px progress bar height so hover doesn't break */
  width: 190px;
  z-index: 10;
}

.note-tooltip-box {
  background-color: rgb(0 0 0 / 0.92);
  border: 1px solid cyan;
  border-radius: 10px;
  padding: 10px;
  color: white;
  font-size: 13px;
  text-align: left;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  word-wrap: break-word;
  max-height: 220px;
  overflow-y: auto;
}

.note-tooltip-header {
  font-size: 11px;
  color: cyan;
  margin-bottom: 5px;
  font-weight: bold;
}

.note-delete-btn {
  margin-top: 8px;
  background-color: crimson;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
  width: 100%;
  font-weight: bold;
}

/* Show the tooltip whenever hovering over the feather OR the tooltip itself */
.feather-wrapper:hover .note-tooltip {
  display: block;
}

.note-tooltip-item + .note-tooltip-item {
  border-top: 1px solid rgb(0 255 255 / 0.3);
  margin-top: 10px;
  padding-top: 10px;
}

.feather-count-badge {
  position: absolute;
  top: -4px;
  right: -8px;
  background-color: crimson;
  color: white;
  font-size: 10px;
  font-weight: bold;
  height: 16px;
  min-width: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}