@define-color text            @on_surface;
@define-color background-alt  alpha(@color1, .4);
@define-color selected        @outline;
@define-color hover           alpha(@selected, 1);
@define-color urgent          @error;

*:not(progress):not(progressbar):not(trough){
  color:            @text;

  all: unset;
  font-size: 14px;
  font-family: "JetBrains Mono Nerd Font";
  transition: 200ms;

}

/* Avoid 'annoying' backgroud */
.blank-window {  
  background: transparent;  
}
  
/* CONTROL CENTER ------------------------------------------------------------------------ */

.control-center {
  background-color: rgba(0, 0, 0, 0.6);
  border-radius: 24px;
  border: 1px solid @selected;
  box-shadow: 0 0 10px 0 rgba(0,0,0,.6);
  margin: 18px;
  padding: 12px;
}

/* Notifications  */
.control-center .notification-row .notification-background,
.control-center .notification-row .notification-background .notification.critical {
  background-color: @on_secondary_fixed;
  border: 1px solid @hover;
  border-radius: 16px;
  margin: 4px 0px;
  padding: 4px;
  box-shadow: none;
}

.control-center .notification-row .notification-background .notification.critical {
  color: @urgent;
}

.control-center .notification-row .notification-background .notification .notification-content {
  margin: 6px;
  padding: 6px 6px 2px 2px;
}

.control-center .notification-row .notification-background .notification > *:last-child > * {
  min-height: 3.4em;
}

.control-center .notification-row .notification-background .notification > *:last-child > * .notification-action {
  background: alpha(@selected, .6);
  color: @text;
  border-radius: 12px;
  margin: 6px;
}

.control-center .notification-row .notification-background .notification > *:last-child > * .notification-action:hover {
  background: @selected;
}

.control-center .notification-row .notification-background .notification > *:last-child > * .notification-action:active {
  background-color: @selected;
}

/* Buttons */

.control-center .notification-row .notification-background .close-button {
  background: transparent;
  border-radius: 6px;
  color: @text;
  margin: 0px;
  padding: 4px;
}

.control-center .notification-row .notification-background .close-button:hover {
  background-color: @selected;
}

.control-center .notification-row .notification-background .close-button:active {
  background-color: @selected;
}

progressbar,
progress,
trough {
  border-radius: 12px;
}

progressbar {
  background-color: rgba(255,255,255,.1);
}

/* Notifications expanded-group */

.notification-group {
  margin: 2px 8px 2px 8px;

}
.notification-group-headers {
  font-weight: bold;
  font-size: 1.25rem;
  color: @text;
  letter-spacing: 2px;
}

.notification-group-icon {
  color: @text;
}

.notification-group-collapse-button,
.notification-group-close-all-button {
  background: transparent;
  color: @text;
  margin: 4px; 
  border-radius: 6px;
  padding: 4px;
}

.notification-group-collapse-button:hover,
.notification-group-close-all-button:hover {
  background: @hover;
}  

/* WIDGETS --------------------------------------------------------------------------- */

  /* Notification clear button */
.widget-title {
  font-size: 1.2em;
  margin: 6px;
}

.widget-title button {
  background: alpha(@primary_container, 0.5);
  border-radius: 6px;
  padding: 4px 16px;
}

.widget-title button:hover {
  background-color: @hover;
}

.widget-title button:active {
  background-color: @selected;
}

  /* Do not disturb */
.widget-dnd {
  margin: 6px 9px 6px 6px;
  font-size: 1.2rem;
}

.widget-dnd > switch {
  background: alpha(@primary_container, 0.75);
  font-size: initial;
  border-radius: 8px;
  box-shadow: none;
  padding: 2px;
}

.widget-dnd > switch:hover {
  background: @hover;
}

.widget-dnd > switch:checked {
  background: @on_primary;
}

.widget-dnd > switch:checked:hover {
  background: @hover;
}

.widget-dnd > switch slider {
  background: @text;
  border-radius: 6px;
}

  /* Buttons menu */
.widget-buttons-grid {
  font-size: x-large;
  padding: 6px 2px;
  margin: 6px;
  border-radius: 12px;
  background: alpha(@primary_container, 0.5);
}

.widget-buttons-grid>flowbox>flowboxchild>button {
  margin: 4px 10px;
  padding: 6px 12px;
  background: transparent;
  border-radius: 8px;
}

.widget-buttons-grid>flowbox>flowboxchild>button:hover {
  background: @hover;
}


  /* Music player */
.widget-mpris {
    background: alpha(@primary_container, .5);
    border-radius: 16px;
    color: @text;
    margin:  20px 6px;
    padding: 6px 6px 6px 6px;
}

.widget-mpris .widget-mpris-player .mpris-background {
  filter: blur(10px);
}

.widget-mpris .widget-mpris-player .mpris-overlay {
  padding: 10px;
  background-color: rgba(0, 0, 0, 0.6);
}

  /* NOTE: Background need *opacity 1* otherwise will turn into the album art blurred  */
.widget-mpris-player {
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 14px;
    padding: 0px 0px;
    margin: 6px;
}

.widget-mpris > box > button {
  color: @text;
  border-radius: 20px;
}
 
.widget-mpris button {
  color: alpha(@text, .6);
}

.widget-mpris button:hover {
  color: @text;
}

.widget-mpris-album-art {
  border-radius: 12px;
  margin: 6px
}
 
.widget-mpris-title {
    font-weight: 700;
    font-size: 1rem;
}
 
.widget-mpris-subtitle {
    font-weight: 500;
    font-size: 0.8rem;
}

/* Volume widget */
:root {
  --widget-volume-row-icon-size: 24px;
}

.widget-volume {
  padding: 8px;
  margin: 8px;
  border-radius: 12px;
}

/* Each row app icon */
.widget-volume row image {
  -gtk-icon-size: var(--widget-volume-row-icon-size);
}

.per-app-volume {
  background-color: var(--noti-bg-alt);
  padding: 4px 8px 8px 8px;
  margin: 0px 8px 8px 8px;
  border-radius: 12px;
}

/* Slider widget */
.widget-slider {
  padding: 8px;
  margin: 8px;
  border-radius: 12px;
}

.widget-slider label {
  font-size: inherit;
}

/* Backlight widget */
.widget-backlight {
  padding: 8px;
  margin: 8px;
  border-radius: 12px;
}

/* Inhibitors widget */
.widget-inhibitors > label {
  margin: 8px;
  font-size: 1.5rem;
}

.widget-inhibitors > button {
  margin: 8px;
  border-radius: 12px;
}
