@define-color base      #1e1e2e;
@define-color mantle    #181825;
@define-color crust     rgba(0, 0, 0, 0);

@define-color text      #cdd6f4;
@define-color subtext0  #a6adc8;
@define-color subtext1  #bac2de;

@define-color surface0  #313244;
@define-color surface1  #45475a;
@define-color surface2  #585b70;

@define-color overlay0  #6c7086;
@define-color overlay1  #7f849c;
@define-color overlay2  #9399b2;

@define-color blue      #89b4fa;
@define-color lavender  #b4befe;
@define-color lavender-inactive  rgba(180,190,254,0.3);
@define-color sapphire  #74c7ec;
@define-color sky       #89dceb;
@define-color teal      #94e2d5;
@define-color green     #a6e3a1;
@define-color yellow    #f9e2af;
@define-color peach     #fab387;
@define-color maroon    #eba0ac;
@define-color red       #f38ba8;
@define-color mauve     #cba6f7;
@define-color pink      #f5c2e7;
@define-color flamingo  #f2cdcd;
@define-color rosewater #f5e0dc;
@define-color pastel #dce3f5;
@define-color pastel-inactive rgba(220, 227, 245, 0.3);

* {
  /* `otf-font-awesome` is required to be installed for icons */
  font-family: Cantarell, "Symbols Nerd Font";
  font-size: 14px;
  font-weight: bolder;
}

#waybar {
  background-color: rgba(0, 0, 0, 0);
  color: @pastel;
  transition-property: background-color;
  transition-duration: 0.5s;
}

window#waybar.hidden {
  opacity: 0.2;
}

tooltip {
  background: rgba(43, 48, 59, 1);
}

tooltip label {
  color: white;
}

button {
  /* Use box-shadow instead of border so the text isn't offset */
  box-shadow: inset 0 -3px transparent;
  /* Avoid rounded borders under each button name */
  border: none;
  border-radius: 0;
}

/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */

#workspaces button {
  padding: 0px;
  margin: 2px;
  color: @pastel-inactive;
  transition: color 200ms ease-in-out;
}

#workspaces button:hover {
  color: @pastel;
  box-shadow: inherit;
  text-shadow: inherit;
  background: transparent;
  border: #1e1e2e;
}

#workspaces button.active {
  color: @pastel;
}

#workspaces button.urgent {
  color: @red;
}

#cava,
#clock,
#battery,
#cpu,
#memory,
#temperature,
#backlight,
#network,
#pulseaudio,
#tray,
#mpris,
#power-profiles-daemon {
  padding: 0px 4px;
  color: @pastel;
}

#workspaces {
  margin: 0 8px;
}

/* If workspaces is the leftmost module, omit left margin */
.modules-left > widget:first-child > #workspaces {
  margin-left: 0;
}

/* If workspaces is the rightmost module, omit right margin */
.modules-right > widget:last-child > #workspaces {
  margin-right: 0;
}

#clock {
  background-color: transparent;
  color: @pastel;
}

#battery {
  background-color: transparent;
  color: #81c784;
}

#battery.charging {
  color: #81c784;
  background-color: transparent;
}

#battery.plugged {
  color: @blue;
  background-color: transparent;
}

@keyframes blink {
  to {
    color: #000000;
  }
}

/* Using steps() instead of linear as a timing function to limit cpu usage */
#battery.critical:not(.charging) {
  color: @red;
  animation-name: blink;
  animation-duration: 0.5s;
  animation-timing-function: steps(12);
  animation-iteration-count: infinite;
  animation-direction: alternate;
}
#power-profiles-daemon {
  font-size: 13px;
  padding: 0 8px;
}

#power-profiles-daemon.performance {
  color: @red;
}

#power-profiles-daemon.balanced {
  color: #2980b9;
}

#power-profiles-daemon.power-saver {
  color: @green;
}

label:focus {
  background-color: #000000;
}

#cpu {
  background-color: transparent;
  margin-left: 6px;
}

#memory {
  background-color: transparent;
}

#backlight {
  background-color: transparent;
  color: #ffd580;
}

#cpu,
#memory,
#temperature {
  padding: 0px 3px;
}

#network {
  background-color: transparent;
}

#network.disconnected {
  background-color: transparent;
}

#pulseaudio {
  background-color: transparent;
  color: @mauve;
}

#pulseaudio.muted {
  background-color: transparent;
  padding: 0 10px;
}

#temperature {
  background-color: transparent;
}

#idle_inhibitor {
  background-color: transparent;
  padding: 0 4px;
  font-weight: normal;
  font-size: 20px;
  margin-left: 4px;
}

#idle_inhibitor.activated {
  background-color: transparent;
  color: @green;
}

#idle_inhibitor.deactivated {
  background-color: transparent;
  color: @lavender;
}

#tray {
  background-color: transparent;
}

#tray > .passive {
  -gtk-icon-effect: dim;
}

#tray > .needs-attention {
  -gtk-icon-effect: highlight;
  background-color: transparent;
}

#cava {
  color: @pastel;
  letter-spacing: 1px;
  font-size: 9px;
}

#group-power {
  margin-right: 4px;
}

#custom-quit {
  padding: 0 4px;
  color: #ff6f61;
}

#custom-reboot {
  padding: 0 4px;
  color: @green;
}

#custom-lock {
  padding: 0 4px;
  color: @lavender;
}

#custom-power {
  padding: 0 4px;
  color: @red;
}

#custom-sleep {
  padding: 0 4px;
  color: #ffd54f;
}

#mpris {
  color: @pastel;
}

#user {
  padding: 0 2px;
  color: @red;
}
