#reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: var(--reading-progress-height, 4px);
  width: 0%;
  background: var(--reading-progress-color, #4a90e2);
  z-index: 2147483647;
  transition: width 0.15s ease-out;
}

/* bazowe style dla % */
#reading-progress-percent {
  position: fixed;
  font-size: 10px;
  padding: 1px 8px; /* padding lewo/prawo */
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  border-radius: 999px;
  z-index: 2147483647;
  opacity: 0;
  transition: opacity 0.2s ease-out;
  pointer-events: none;
}

/* tryb: overlay_top – % nachodzi na pasek, wyśrodkowany */
#reading-progress-percent.mode-overlay {
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
}

/* tryb: top_only – tylko % na górze strony */
#reading-progress-percent.mode-top {
  top: 8px;
  right: 10px;
  transform: none;
}

/* tryb: bottom_only – tylko % na dole strony */
#reading-progress-percent.mode-bottom {
  bottom: 10px;
  right: 10px;
  transform: none;
}

#reading-progress-percent.is-active {
  opacity: 1;
}

/* RWD – upewnij się, że pasek i % są zawsze widoczne na małych ekranach */
@media (max-width: 768px) {
  #reading-progress-bar {
    height: var(--reading-progress-height, 3px);
  }
  #reading-progress-percent {
    font-size: 9px;
    padding: 1px 6px;
  }
}
