/*
  TODO:
  Look into compiling resources with glib-compile-resource etc. for 
  inclusion in templates
*/

@binding-set editor-bindings {
  bind "<ctl>i" { "insert-italic" () };
  bind "<ctl>b" { "insert-bold" () };
  bind "<ctl>r" { "insert-hrule" () };
  bind "<ctl>u" { "insert-listitem" () };
  bind "<ctl>h" { "insert-header" () };
  bind "<ctl>z" { "undo" () };
  bind "<ctl>y" { "redo" () };
  bind "<ctl><shift>d" { "insert-strikethrough" () };
  /*bind "<ctl>t" { "insert-at-cursor" ('[ ] ') };*/
  bind "<ctl><shift>z" { "redo" () };
}

@define-color math_text_color mix(@theme_fg_color, #00b5ff, 0.15);

/* Main window and text colors */

.uberwriter-window {
  background: @theme_base_color;
  color: @theme_fg_color;
  caret-color: @theme_fg_color;
}

#titlebar-revealer {
  padding: 0;
}

.scrollbars-junction,
.scrollbar.trough {
  background: transparent;
}

#titlebar-container {
  background: @theme_base_color;
}

.uberwriter-editor {
  -gtk-key-bindings: editor-bindings;
  border: none;
  background-color: transparent;
  text-decoration-color: @error_color;
  font-family: 'Fira Mono', monospace;
  font-size: 16px;
}

.uberwriter-editor.size14  {
  font-size: 14px;
}

.uberwriter-editor.size15  {
  font-size: 15px;
}

.uberwriter-editor.size16  {
  font-size: 16px;
}

.uberwriter-editor.size17  {
  font-size: 17px;
}

.uberwriter-editor.size18 {
  font-size: 18px;
}

.uberwriter-editor text {
  background-color: @theme_base_color;
  color: @theme_fg_color;
  caret-color: @theme_fg_color;
}

.uberwriter-editor text selection {
  background-color: @theme_selected_bg_color;
  color: @theme_selected_fg_color;
}

.uberwriter-editor button {
  margin: 0;
  padding: 0;
  /*background: #CCC;*/
}

.uberwriter-editor toolbar {
  /*background: transparent;*/
  border: none;
  padding: 0;
}

.inline-button {
  color: alpha(@theme_fg_color, 0.6);
  text-shadow: inherit;
  box-shadow: initial;
  background-clip: initial;
  background-origin: initial;
  background-size: initial;
  background-position: initial;
  background-repeat: initial;
  background-image: initial;
  border-image-source: initial;
  border-image-repeat: initial;
  border-image-slice: initial;
  border-image-width: initial;
  border-style: none;
  padding: 0px 16px;
  transition: 100ms ease-in;
}

.inline-button:hover,
.inline-button:checked {
  color: @theme_fg_color;
  background-color: mix(@theme_base_color, @theme_bg_color, 0.5);
}

#PreviewMenuItem image {
  border-radius: 2px;
  color: #666;
  padding: 3px 5px;
  border: none;
  background: #FFF;
}

.uberwriter-window treeview {
  padding: 3px 3px 3px 3px;
}

#LexikonBubble {
  /*font: serif 10;*/
  font-family: serif;
  font-size: 10px;
  background: @theme_bg_color;
  border-radius: 4px;
  border-color: @theme_bg_color;
  margin: 5px;
  padding: 5px;
}

/* .quick-preview-popup {
  padding: 5px;
  margin: 5px;
  border: 1px solid #333;
  background: @ligth_bg;
  border-radius: 3px;
  border-color: @theme_bg_color;
} */

#LexikonBubble label {
  /*padding: 5px;*/
}

#LexikonBubble {
  background-color: @theme_bg_color;
  border: 5px solid @theme_bg_color;
}

#LexikonBubble .lexikon-heading {
  font-family: serif;
  font-size: 12px;
  padding-bottom: 5px;
  padding-top: 5px;
  font-weight: bold;
  padding-left: 10px;
}

#LexikonBubble .lexikon-num {
  padding-right: 5px;
  padding-left: 20px;
}

.quick-preview-popup {
	background-color: @theme_bg_color;
}

.quick-preview-popup grid {
	background-color: @theme_bg_color;
	color: @theme_fg_color;
	border-color: @theme_bg_color;
}

.quick-preview-popup label {
	color: @theme_fg_color;
}