@mixin selection_mode() {
  toolbar.selection-mode {
    padding: 4px;
  }

  headerbar.selection-mode, toolbar.selection-mode {
    border-color: gtkmix($selected_bg_color, $selected_fg_color, 0.6);;
    color: $selected_fg_color;
    background-color: gtkmix($selected_bg_color, $selected_fg_color, 0.6);

    &:backdrop {
      border-color: gtkmix($unfocused_selected_bg_color, $unfocused_selected_fg_color, 0.6);
      color: $unfocused_selected_fg_color;
      background-color: gtkmix($unfocused_selected_bg_color, $unfocused_selected_fg_color, 0.6);
    }

    button {
      border-width: 1px;
      border-style: solid;
      border-color: gtkmix($selected_bg_color, $selected_fg_color, 0.7);
      border-radius: $button_radius;
      color: gtkmix($selected_bg_color, $fg_color, 0.2);
      background-color: gtkmix($selected_bg_color, $selected_fg_color, 0.7);

      &:hover {
        border-color: gtkmix($selected_bg_color, $selected_fg_color, 0.75);
        background-color: gtkmix($selected_bg_color, $selected_fg_color, 0.75);
      }

      &:active, &:checked {
        border-color: gtkmix($selected_bg_color, $selected_fg_color, 0.45);
        background-color: gtkmix($selected_bg_color, $selected_fg_color, 0.45);

        &:backdrop {
          border-color: gtkmix($unfocused_selected_bg_color, $unfocused_selected_fg_color, 0.45);
          background-color: gtkmix($unfocused_selected_bg_color, $unfocused_selected_fg_color, 0.45);
        }
      }

      &:backdrop {
        border-color: gtkmix($unfocused_selected_bg_color, $unfocused_selected_fg_color, 0.75);
        color: gtkmix($unfocused_selected_bg_color, $unfocused_fg_color, 0.3);
        background-color: gtkmix($unfocused_selected_bg_color, $unfocused_selected_fg_color, 0.75);
      }
    }

    @include suggested_button();

    .selection-menu button {
      border-style: none;
      background-color: transparent;
      color: gtkshade($selected_bg_color, 0.8);
      
      .dim-label {
        color: gtkshade($selected_bg_color, 0.7);
      }
    }
  }
}
