@import "./themes/catppuccin/themes/macchiato.css";

@keyframes blink_red {
  to {
    background-color: @red;
    color: @base;
  }
}

* {
  /* `otf-font-awesome` is required to be installed for icons */
  font-family: JetBrainsMono Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
}

box.modules-left,
box.modules-center,
box.modules-right {
  border-radius: 1rem;
  background-color: @base;
}

.warning,
.critical,
.urgent {
  animation-name: blink_red;
  animation-duration: 800ms;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}

#mode,
#clock,
#memory,
#temperature,
#cpu,
#custom-weather,
#mpd,
#idle_inhibitor,
#backlight,
#pulseaudio,
#network,
#battery,
#custom-powermenu,
#custom-cava-internal,
#custom-launcher,
#tray,
#disk,
#custom-pacman,
#custom-scratchpad-indicator {
  padding: 0 0.6rem;
  background-color: @red;
}

/* Bar */
window#waybar {
  background-color: transparent;
}

window > box {
  background-color: transparent;
  margin: 5px 11px;
  margin-bottom: 0;
}

window#waybar button:not(:first-child),
window#waybar button:not(:last-child) {
  border-radius: 0;
}

window#waybar button:first-child {
  border-radius: 1rem 0 0 1rem;
}

window#waybar button:last-child {
  border-radius: 0 1rem 1rem 0;
}

/* Workspaces */
#workspaces button {
  padding: 0.2rem 0.75rem;
  color: @text;
}

#workspaces button label {
  background-color: transparent;
  font-size: 1.2rem;
}

#workspaces button:not(:first-child) label {
  /* Fix fontawesome miss alignment, depends of the padding above and font size */
  margin-right: 0.45rem;
}

#workspaces button.focused {
  color: @teal;
  background-color: alpha(@teal, 0.15);
}

#workspaces button:hover {
  /* border: .2px solid transparent; */
  background: alpha(@blue, 0.15);
  color: @blue;
  border-color: transparent;
  box-shadow: inherit;
  text-shadow: inherit;
}

/* Tooltip */
tooltip {
  background-color: @base;
}

tooltip label {
  color: @rosewater;
}

/* battery */
#battery {
  color: @mauve;
  padding-right: 1.15rem;
}
#battery.full {
  color: @green;
}
#battery.charging {
  color: @teal;
}
#battery.discharging {
  color: @peach;
}
#battery.critical:not(.charging) {
  color: @pink;
}
#custom-powermenu {
  color: @red;
}

#memory {
  color: @peach;
}
#cpu {
  color: @blue;
}
#clock {
  color: @rosewater;
}
#idle_inhibitor {
  color: @green;
  padding-right: 0.9rem;
}
#temperature {
  color: @sapphire;
}
#backlight {
  color: @green;
}
#pulseaudio {
  color: @mauve; /* not active */
}
#network {
  color: @pink; /* not active */
}
#network.disconnected {
  color: @foreground; /* not active */
}
#disk {
  color: @maroon;
}
#custom-pacman {
  color: @sky;
}
#custom-scratchpad-indicator {
  color: @yellow;
}
#custom-weather {
  color: @red;
}
