@keyframes blink-warning {
    70% {
        color: @light;
    }

    to {
        color: @light;
        background-color: @warning;
    }
}

@keyframes blink-critical {
    70% {
      color: @light;
    }

    to {
        color: @light;
        background-color: @critical;
    }
}

@define-color bg #2E3440;
@define-color light #D8DEE9;
@define-color warning #ebcb8b;
@define-color critical #BF616A;
@define-color mode #434C5E;
@define-color workspacesfocused #4C566A;
@define-color tray @workspacesfocused;
@define-color sound #EBCB8B;
@define-color network #5D7096;
@define-color memory #546484;
@define-color cpu #596A8D;
@define-color temp #4D5C78;
@define-color layout #5e81ac;
@define-color battery #88c0d0;
@define-color date #434C5E;
@define-color time #434C5E;
@define-color backlight #434C5E;
@define-color nord_bg #434C5E;
@define-color nord_bg_blue #546484;
@define-color nord_light #D8DEE9;
@define-color nord_light_font #D8DEE9;
@define-color nord_dark_font #434C5E;

* {
    border: none;
    border-radius: 3px;
    min-height: 0;
    margin: 0.2em 0.3em 0.2em 0.3em;
}

#waybar {
    background: @bg;
    color: @light;
    font-family: "Cantarell", "Font Awesome 5 Pro";
    font-size: 12px;
    font-weight: bold;
}

#clock,
#network,
#pulseaudio,
#temperature,
#tray,
#language {
    padding-left: 0.6em;
    padding-right: 0.6em;
}

#temperature {
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    animation-direction: alternate;
}

#temperature.critical {
    color: @critical;
}

#temperature.critical {
    animation-name: blink-critical;
    animation-duration: 2s;
}

#network.disconnected,
#temperature.warning {
    background: @warning;
    color: @nord_dark_font;
}

#workspaces button {
    font-weight: bold;
    padding: 0;
    opacity: 0.3;
    background: #E9E3D8;
    font-size: 1em;
}

#workspaces button.focused {
    background: @workspacesfocused;
    color: #D8DEE9;
    opacity: 1;
    padding: 0 0.4em;
}

#workspaces button.urgent {
    border-color: #c9545d;
    color: #c9545d;
    opacity: 1;
}

#window {
    margin-right: 40px;
    margin-left: 40px;
    font-weight: normal;
}

#language {
    background: @nord_bg_blue;
    color: #D8DEE9;
    padding: 0 0.4em;
}

#temperature {
    background-color: @nord_bg;
    color: #D8DEE9;
}

#temperature.critical {
    background:  @critical;
}

#clock {
    background: @nord_bg_blue;
    color: #D8DEE9;
}

#clock.date {
    background: @date;
}

#clock.time {
    background: @mode;
}

#pulseaudio {
    background: @nord_bg_blue;
    color: #D8DEE9;
}

#pulseaudio.muted {
    background: #BF616A;
    color: #BF616A;
}

#pulseaudio.source-muted {
    background: #D08770;
    color: #D8DEE9;
}

#tray {
    background: #434C5E;
}
