/*****************
 * Progress bars *
 *****************/
progressbar {
 // sizing
 &.horizontal {
   trough,
   progress { min-height: 6px; }
 }

 &.vertical {
   trough,
   progress { min-width: 6px; }
 }

 // FIXME: insensitive state missing and some other state should be set probably
 font-size: smaller;
 color: transparentize(b_color(text), 0.7);

 trough {
   border: 0px solid transparent;
   border-radius: $r;
   background-color: transparentize(b_color(text),0.7);
  }

 &:backdrop trough { background-color: backdrop(transparentize(b_color(text),0.7)); } // looks like states are not passed to the trough component here

 progress {
   background-color: s_color(normal);
   border: 0px solid transparent;
   border-radius: 3px;
   box-shadow: none; //needed for clipping
 }

 &:backdrop progress { background-color: backdrop(s_color(normal)); } // states not passed here as well

 &.osd { // progressbar.osd used for epiphany page loading progress
   background-color: transparent;
 }
}

treeview.view {
  &.progressbar {
    border: 0px solid transparent;
    border-radius: $r;
    background-color: s_color(normal);
    color: s_color(text);
    background-image: none;
    &:selected {
      &:focus, & {
        background-color: transparentize(s_color(text),0.75);
      }
    }
  }
  &.trough {
    background-color: $trough_color;
    &:selected {
      &:focus, & {
        background-color: transparentize(s_color(text),0.7);
      }
    }
  }
}

/*************
 * Level Bar *
 *************/
levelbar {
 block {
   min-width: 32px;
   min-height: 6px;
 }

 &.vertical block {
   min-width: 6px;
   min-height: 32px;
 }

 trough {
   border: 1px solid;
   padding: 2px;
   border-radius: 3px;
   @include entry(normal);

   &:backdrop { @include entry(backdrop); }
 }

 &.horizontal.discrete block { margin: 0 1px; }

 &.vertical.discrete block { margin: 1px 0; }

 block:not(.empty) {
   border: 1px solid s_color(normal);
   background-color: s_color(normal);
   box-shadow: none;
   border-radius: 1px;

   &:backdrop {
     border-color: backdrop(s_color(normal));
     background-color: backdrop(s_color(normal));
   }
 }

 block {
   &.low {
     border-color: $warning_color;
     background-color: $warning_color;
     &:backdrop {
       background-color: backdrop($warning_color);
       border-color: backdrop($warning_color);
     }
   }

   &.high {
     border-color: $success_color;
     background-color: $success_color;
     &:backdrop {
       background-color: backdrop($success_color);
       border-color: backdrop($success_color);
     }
   }

   &.full {
     border-color: $success_color;
     background-color: $success_color;
     &:backdrop {
       background-color: backdrop($success_color);
       border-color: backdrop($success_color);
     }
   }

   &.empty {
     background-color: transparentize(b_color(text),0.7);
     border-color: transparent;
     box-shadow: none;
     &:backdrop { background-color: backdrop(transparentize(b_color(text),0.7)); }
   }
 }
}
