* {
  all: unset; // Unsets everything so you can style everything from scratch
  font-family: FontAwesome, Overpass;
}

@import "./style/colors.scss";

$bar-module-width: 25px;
$bar-bg-color: rgba($color0,0.8);
$bar-module-bg-color: rgba($color5,0.15);
$bar-module-fg-color: $color13;
$bar-module-inactive-fg-color: rgba($color13,0.5);
//$bar-active-bg-color: rgba($color1,0.5);
//$bar-active-fg-color: $color1;
$bar-module-active-shadow: 1px 1px 4px rgba($color5,0.5),-1px 1px 4px rgba($color5,0.5),1px -1px 4px rgba($color5,0.5),-1px -1px 4px rgba($color5,0.5);
$bar-hover-bg-color: rgba($color1,0.5);
$bar-hover-fg-color: $color1;
$bar-module-border-radius: 8px;

// Global Styles
.bar {
  font-size: 1em;
  padding: 10px 0px 0px;
  margin: 0px 15px;

//bar groups
.leftgroup,
.centergroup,
.rightgroup {
  background-color: $bar-bg-color;
  border-radius: $bar-module-border-radius;
}

//group modules
.leftgroup>box:not(.workspaces):not(.revealer-on-hover),
.leftgroup>button,
.centergroup>*,
.rightgroup>*:not(.revealer-on-hover) {
  margin: 5px;
  min-width: $bar-module-width;
  background-color: $bar-module-bg-color;
  padding: 0px 10px;
}

.revealer-on-hover {
  margin: 5px;
  min-width: $bar-module-width;
  background-color: $bar-module-bg-color;
  >widget>box>box label {
    padding: 0px 10px;
  }
  .reveal_children label {
    padding: 0px 5px;
  }
}
.workspaces>button {
  margin: 5px 0px;
  background-color: $bar-module-bg-color;
  min-width: $bar-module-width;
  > label {
    padding: 0px 10px;
  }
}

//value bars
scale trough,
progressbar>trough {
  background-color: $color9;
  min-width: 50px;
  min-height: 10px;
  border-radius: 4px;
}
scale trough highlight,
progressbar>trough>progress {
  background-color: $color2;
  border-radius: 4px;
  min-height: 10px;
}

//value graphs
circular-progress {
  color: $color9;
  background-color: $color2;
}

.revealer-on-hover {
  color: $bar-module-fg-color;
  border-radius: $bar-module-border-radius;
}
.revealer-on-hover>widget>box>box>*,
.revealer-on-hover>widget>box>revealer>box>box>*,
.reveal_children>*,
.reveal_children>widget>image {
//  background-color: $bar-module-bg-color;
  padding: 3px 4px;
  min-width: $bar-module-width;
  &:hover {
    background-color: rgba($color1,0.5);
  }
}

.reveal_children>box,
.reveal_children>widget,
.reveal_children>button {
  border-left: 1px solid $bar-bg-color;
}
.rightgroup>label,
.rightgroup>button {
//.rightgroup .reveal_children>button,
//.rightgroup>.revealer-on-hover>widget>box>box>button {
  color: $bar-module-inactive-fg-color;
  padding: 3px 4px;
  border-radius: $bar-module-border-radius;
}
/*.leftgroup>.revealer-on-hover>widget>box>box>button {
  padding: 3px 4px;
  border-radius: $bar-module-border-radius;
}*/

.music,
.rightgroup>label,
.active_window{
  color: $bar-module-fg-color;
  padding: 3px 4px;
  border-radius: $bar-module-border-radius;
}
label {
  margin-top: 2px;
}
.workspaces,
.profile {
  border-radius: $bar-module-border-radius;
}
.workspaces button,
.leftgroup button {
//  background-color: $bar-module-bg-color;
  border-left: 1px solid $bar-bg-color;
  color: $bar-module-fg-color;
  padding: 3px 4px;
  min-width: $bar-module-width;
}
.workspaces button:hover,
.rightgroup button:hover,
.leftgroup button:hover {
  background-color: $bar-hover-bg-color;
  color: $bar-hover-fg-color;
  transition-property: background-color;
  transition-duration: .25s;
}

.workspaces .focused{
  color: $bar-module-fg-color;
  text-shadow: $bar-module-active-shadow;
}
button.active {
  text-shadow: $bar-module-active-shadow;
  color: $bar-module-fg-color;
}
.workspaces button:first-child,
//.reveal_children>box:first-child,
//.reveal_children>scale:first-child,
//.reveal_children>progressbar:first-child,
//.reveal_children>button:first-child,
.reveal_children>widget:first-child {
  margin-left: 3px;
  border-radius:$bar-module-border-radius 0px 0px $bar-module-border-radius;
  border-left: 0px solid $bar-bg-color;
}

//.revealer-on-hover>widget>box>revealer>box>box>button {
.rightgroup>.revealer-on-hover>widget>box>box>button,
.leftgroup>.revealer-on-hover>widget>box>box>button {
  border-radius: 8px;
  &:hover {
    border-radius:$bar-module-border-radius 0px 0px $bar-module-border-radius;
  }
}

.workspaces button:last-child,
.reveal_children>box:last-child,
.reveal_children>scale:last-child,
.reveal_children>progressbar:last-child,
.reveal_children>button:last-child,
.reveal_children>widget:last-child {
  border-radius:0px $bar-module-border-radius $bar-module-border-radius 0px;
}
.workspaces button:only-child,
//.reveal_children>box:only-child,
//.reveal_children>scale:only-child,
//.reveal_children>progressbar:only-child,
//.reveal_children>button:only-child,
.reveal_children>widget:only-child {
  border-radius:$bar-module-border-radius;  
}
menu {
  color: $color9;
  background-color: rgba($color0,0.75);
  border: 2px solid rgba($color0,0.5);
  border-radius: $bar-module-border-radius;
  menuitem {
    padding:10px;
    margin:5px 10px;
    &:backdrop {
      background-color:green;
    }
    &:not(:disabled) {
      background-color: rgba($color8,0.6);
      border: 2px solid rgba($color0,0.5);
      border-radius:6px;
    }
    &:hover {
      background-color:rgba($color12,0.5);
      color: $color1;
      transition: all .2s ease;
    }
  }
}
}
tooltip{
  color: $color9;
  background-color: rgba($color0,0.75);
  border: 2px solid rgba($color0,0.5);
  border-radius: 8px;
}

$home-widget-bg-color: rgba($color0,0.7);
$home-widget-border-radius: 8px;
$home-button-border-radius: 6px;
$home-button-circle-border-radius: 30px;
$home-button-bg-color: rgba($color5, 0.15);
$home-button-fg-opacity: 1;
$home-button-fg-color: rgba($color5,$home-button-fg-opacity);
$home-widget-subtitle-color: rgba($color7,0.6);
$home-button-hover-bg-color: rgba($color1, 0.5);
$home-widget-border-color: rgba($color5,1);

.home {
  > box {
    border-radius: $home-widget-border-radius;
    box-shadow: inset 0 0 0px 3px $home-widget-border-color;
  }
  .rat {
    background-size: cover;
    background-repeat: no-repeat;
  }
  .weather {
    background-color: $home-widget-bg-color;
    color: $home-button-fg-color;
    padding: 10px;
//    padding: 10px 0px;
    .weather-subtitle{
      font-size: 0.8em;
      color: $home-widget-subtitle-color;
    }
  }
  .notes {
    background-color: $home-widget-bg-color;
    color: $home-button-fg-color;
    padding: 10px;
    button {
      background-color: $home-button-bg-color;
      border-radius: $home-button-border-radius;
      padding: 4px 8px;
      margin: 4px;
      box {
        .timestamp {
          font-size: 0.8em;
          margin-top: 6px;
          color: $home-widget-subtitle-color;
        }
      }
      image {
        opacity: $home-button-fg-opacity;
      }
    }
    button:hover {
      background-color: $home-button-hover-bg-color;
    }
  }
  .shortcuts {
    background-color: $home-widget-bg-color;
    color: $home-button-fg-color;
    padding: 15px;
    button {
      background-color: $home-button-bg-color;
      border-radius: $home-button-circle-border-radius;
      margin: 5px;
      font-size: 1.2em;
    }
    button:hover {
      background-color: $home-button-hover-bg-color;
    }
  }
}
