@use '../base' as *;

/* -------------------------------- 

File#: _1_reading-progressbar
Title: Reading Progress Bar
Descr: A bar indicator displaying the current reading progress
Usage: codyhouse.co/license

-------------------------------- */ 

.reading-progressbar {
  position: fixed;
  z-index: var(--z-index-fixed-element, 10); 
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  color: var(--color-primary); // fill color
  pointer-events: none;
  display: none;
  transition: transform 0.2s;
}

.reading-progressbar--is-out {
  transform: translateY(-100%);
}

.reading-progressbar--is-active { // if JS = enabled && content is scrollable
  display: block;
}

.reading-progressbar::-webkit-progress-bar {
  background-color: transparent;
}

.reading-progressbar::-webkit-progress-value {
  background-color: currentColor;
}

.reading-progressbar::-moz-progress-bar {
  background-color: currentColor;
}

.reading-progressbar__fallback {
  // fallback for brawsers not supporting the <progress> element
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background-color: currentColor;
}