@define-color documents_emblem_bg @theme_selected_bg_color;
@define-color documents_collection_bg @theme_bg_color;
@define-color gedit_not_found_bg rgb (237, 54, 54);
@define-color gedit_not_found_fg white;

/****************
 * Applications *
 ****************/
/* used by gnome-font-viewer and sushi */
SushiFontWidget {
	padding: 6px 12px;
}

/* gnome-terminal */
VteTerminal {
	background-color: @theme_base_color;
	color: @theme_fg_color;
	-TerminalScreen-background-darkness: 0.95;
}

TerminalWindow GtkNotebook.notebook {
	border-bottom-width: 0;
	border-right-width: 0;
	border-left-width: 0;
}

/* nautilus */
.nautilus-canvas-item {
	border-radius: 5px;
}

.nautilus-desktop.nautilus-canvas-item {
	color: @theme_selected_fg_color;
	text-shadow: 1px 1px black;
}

.nautilus-desktop.nautilus-canvas-item:active {
	color: @theme_text_color;
}

.nautilus-desktop.nautilus-canvas-item:selected {
	color: @theme_selected_fg_color;
}

.nautilus-desktop.nautilus-canvas-item:active,
.nautilus-desktop.nautilus-canvas-item:prelight,
.nautilus-desktop.nautilus-canvas-item:selected {
	text-shadow: none;
}

NautilusWindow .sidebar .frame {
	border-style: none;
}

NautilusWindow * {
	-GtkPaned-handle-size: 1;
}

NautilusWindow .pane-separator {
	background-image: url("assets/null.png");
}

NautilusWindow > GtkGrid > .pane-separator,
NautilusWindow > GtkGrid > .pane-separator:hover {
	border-width: 0 1px 0 0;
	border-style: solid;
	border-color: @borders;
	background-color: @sidebar_bg;
	color: shade (@theme_bg_color, 0.9);
}

NautilusNotebook.notebook {
	border-right-width: 0;
	border-left-width: 0;
	border-bottom-width: 0;
}

NautilusNotebook .frame {
	border-width: 0;
}

NautilusToolbar .button {
	icon-shadow: 0 1px @button_text_shadow;
}

NautilusToolbar .button:active {
	icon-shadow: 0 1px @button_active_text_shadow;
}

NautilusToolbar .button:insensitive,
NautilusToolbar .button:active *:insensitive {
	icon-shadow: none;
}

NautilusQueryEditor .primary-toolbar.toolbar {
	border-top-width: 0;
	border-bottom-width: 0;
}

NautilusQueryEditor .toolbar {
	padding-top: 3px;
	padding-bottom: 2px;

	border-width: 1px 0 0 0;
	border-style: solid;
	border-color: @theme_bg_color;
	
	background-color: mix(@theme_bg_color, @theme_base_color, 0.5);
}

NautilusQueryEditor .toolbar:nth-child(2) {
	border-color: @borders;
}

NautilusQueryEditor .toolbar:last-child,
NautilusQueryEditor .primary-toolbar.toolbar:only-child {
	border-bottom-width: 1px;
	border-bottom-color: @borders;
}

/* nemo */
.nemo-canvas-item {
	border-radius: 5px;
}

.nemo-desktop.nemo-canvas-item {
	color: @theme_selected_fg_color;
	text-shadow: 1px 1px black;
}

.nemo-desktop.nemo-canvas-item:active {
	color: @theme_text_color;
}

.nemo-desktop.nemo-canvas-item:selected {
	color: @theme_selected_fg_color;
}

.nemo-desktop.nemo-canvas-item:active,
.nemo-desktop.nemo-canvas-item:prelight,
.nemo-desktop.nemo-canvas-item:selected {
	text-shadow: none;
}

NemoWindow .sidebar .frame {
	border-width: 1px 0 0 0;
	border-style: solid;
	border-color: @borders;
	border-radius: 0;
}

NemoWindow * {
	-GtkPaned-handle-size: 1;
}

NemoWindow .pane-separator {
	background-image: url("assets/null.png");
}

NemoWindow > GtkGrid > .pane-separator,
NemoWindow > GtkGrid > .pane-separator:hover {
	border-width: 1px 1px 0 0;
	border-style: solid;
	border-color: @borders;
	background-color: @sidebar_bg;
	color: shade (@theme_bg_color, 0.9);
}

NemoView.frame,
NemoNotebook.notebook {
	border-right-width: 0;
	border-left-width: 0;
	border-bottom-width: 0;
}

NemoNotebook.notebook tab.top,
NemoNotebook.notebook tab.bottom {
	border-right-width: 1px;
	border-left-width: 1px;
	padding-top: 0;
	padding-bottom: 0;
}

NemoNotebook.notebook tab.top:active {
	padding-top: 2px;
}
NemoNotebook.notebook tab.bottom:active {
	padding-bottom: 2px;
}

NemoNotebook .frame {
	border-width: 1px 0 0 0;
}

NemoToolbar .button {
	icon-shadow: 0 1px @button_text_shadow;
}

NemoToolbar .toolbar {
	background-image: linear-gradient(to bottom,
		@theme_bg_color,
		shade (@theme_bg_color, 0.94));
}

NemoToolbar .button:active {
	icon-shadow: 0 1px @button_active_text_shadow;
}

NemoToolbar .button:insensitive,
NemoToolbar .button:active:insensitive {
	text-shadow: none;
}

NemoQueryEditor .primary-toolbar.toolbar {
	border-bottom-width: 0;
}

NemoQueryEditor .toolbar {
	padding-top: 3px;
	padding-bottom: 2px;

	border-width: 1px 0 0 0;
	border-style: solid;
	border-color: @theme_bg_color;
	
	background-color: mix(@theme_bg_color, @theme_base_color, 0.5);
}

NemoQueryEditor .toolbar:nth-child(2) {
	border-color: @borders;
}

NemoNotebook.notebook NemoQueryEditor .primary-toolbar.toolbar {
	border-top-width: 0;
}

NemoNotebook.notebook NemoQueryEditor .toolbar:last-child,
NemoNotebook.notebook NemoQueryEditor .primary-toolbar.toolbar:only-child {
	border-bottom-width: 1px;
	border-bottom-color: @borders;
}


/* gedit */

GeditWindow .pane-separator, 
GeditWindow .pane-separator:hover {
	border-width: 0 1px 1px 1px;
	border-style: solid;
	border-color: @borders;
	background-color: shade(@theme_bg_color, 0.95);
	color: @borders;
}

GeditPanel.vertical .title {
	border-style: none;
	padding: 7px 0 6px 3px;
}

GeditDocumentsPanel .view {
	background-color: @sidebar_bg;
}

GeditPanel.vertical .notebook {
	padding: 0px;
	border-width: 1px 0;
}

GeditPanel.horizontal .notebook {
	padding: 0px;
	border-width: 0 1px 1px 0;
}

GeditPanel .notebook tab
{
	border-width: 0;
}

GeditStatusMenuButton {
	text-shadow: none;
}

GeditStatusMenuButton.button,
GeditStatusMenuButton.button:hover,
GeditStatusMenuButton.button:active,
GeditStatusMenuButton.button:active:hover {
	border-image: none;
	border-style: solid;
	border-width: 0 1px;
	border-radius: 0;
	padding: 1px 8px 2px 4px;
}

GeditStatusMenuButton.button:hover,
GeditStatusMenuButton.button:active,
GeditStatusMenuButton.button:active:hover {
	border-color: @borders;
}

GeditStatusMenuButton.button:active {
	background-image: linear-gradient(to bottom,
		@borders,
		shade(@theme_bg_color, 0.95));
	background-color: transparent;
	color: @theme_selected_fg_color;
	text-shadow: 0 1px @button_text_shadow;
}

GeditViewFrame .gedit-search-slider {
	background-color: @theme_base_color;
	padding: 6px;
	border-color: shade (@notebook_tab_gradient_b, 0.80);
	border-radius: 0 0 3px 3px;
	border-width: 0 1px 1px 1px;
	border-style: solid;
}

GeditViewFrame .gedit-search-slider .not-found {
	color: @gedit_not_found_fg;
	background-image: none;
	background-color: @gedit_not_found_bg;
}

GeditViewFrame .gedit-search-slider .not-found:selected {
	background-color: @theme_selected_bg_color;
	color: @theme_selected_fg_color;
}

GeditFileBrowserWidget .primary-toolbar.toolbar  {
	background-image: none;
	background-color: @theme_bg_color;
	border-top: none;
	padding: 2px;
}

.gedit-search-entry-occurrences-tag {
	color: shade (@theme_unfocused_fg_color, 0.8);
	margin: 2px;
	padding: 2px;
}

/* gnome-documents */
.documents-dropdown,
.documents-dropdown .view {
	background-color: shade (@theme_bg_color, 1.02);
}

.documents-dropdown.frame {
	padding: 6px;
	border-width: 0 1px 1px 1px;
	border-style: solid;
	border-radius: 0 0 5px 5px;
}

.documents-dropdown .view.radio,
.documents-dropdown .view.radio:focused,
.documents-dropdown .view.radio:selected {
	background-image: none;
	background-color: alpha(@theme_base_color, 0.0);
}

.documents-dropdown .view.radio:active,
.documents-dropdown .view.radio:active:focused,
.documents-dropdown .view.radio:active:prelight {
	background-image: url("assets/sidebar-radio-checked.svg");
}

.documents-dropdown .view.radio:prelight {
	background-image: url("assets/sidebar-radio-prelight.svg");
}

.documents-dropdown .view.radio:active:selected,
.documents-dropdown .view.radio:active:selected:focused {
	background-image: url("assets/sidebar-radio-selected.svg");
}

.documents-dropdown .view.radio:selected:prelight,
.documents-dropdown .view.radio:selected:focused {
	background-image: url("assets/sidebar-radio-selected-prelight.svg");
}

.documents-load-more.button {
	border-image: none;
	border-color: @borders;
	border-width: 1px 0 0;
	border-radius: 0;
}

.documents-scrolledwin.frame {
	border-width: 1px 0 0;
	border-radius: 0;
}

.documents-icon-bg {
	background-color: @documents_emblem_bg;
	border-radius: 4px;

	color: @theme_base_color;
}

.documents-collection-icon {
	background-color: @documents_collection_bg;
	border-radius: 8px;
}

.documents-counter {
	background-image: url('assets/dnd-counter.svg');
	background-size: contain;
	background-color: transparent;
	color: @theme_base_color;
	font: bold;
}

.documents-favorite.button:active,
.documents-favorite.button:active:hover {
	color: shade(@theme_selected_bg_color, 1.20);
}

.documents-entry-tag {
	background-color: @entry_tag_bg;
	color: @entry_tag_fg;

	border-radius: 4px;
	border-width: 0;

	margin: 2px;
	padding: 4px;
}

.documents-entry-tag:hover {
	background-color: shade(@entry_tag_bg, 1.10);
	color: @entry_tag_fg;
}

.documents-entry-tag.button,
.documents-entry-tag.button:hover,
.documents-entry-tag.button:active,
.documents-entry-tag.button:active:hover {
	background-color: transparent;
	background-image: none;
	border-image: none;
	border-width: 0;
}

.documents-entry-tag.button:hover {
	color: shade(@entry_tag_bg, 2.10);
}

/* baobab */

.cell.baobab-level-cell,
.cell.baobab-level-cell:hover,
.cell.baobab-level-cell:selected,
.cell.baobab-level-cell:selected:hover {
	border-color: darker(@borders);
	border-width: 1px;
	border-radius: 3px;
	border-style: solid;
	background-color: white;
}

.cell.baobab-level-cell.fill-block,
.cell.baobab-level-cell.fill-block:selected,
.cell.baobab-level-cell.fill-block:selected:hover {
	background-color: #edd400;
}

.cell.baobab-level-cell.fill-block.level-low,
.cell.baobab-level-cell.fill-block.level-low:hover {
	background-color: #73d216;
}

.cell.baobab-level-cell.fill-block.level-high,
.cell.baobab-level-cell.fill-block.level-high:hover {
	background-color: #cc0000;
}

.cell.baobab-cell-error {
	color: @error_color;
}

.cell.baobab-cell-warning {
	color: @warning_color;
}

.cell.baobab-cell-warning:selected,
.cell.baobab-cell-error:selected {
	color: @theme_selected_fg_color;
}

BaobabWindow.background GtkStack > GtkGrid > GtkScrolledWindow.frame {
	border-radius: 0;
	border-width: 0 1px 0 0;
}

BaobabWindow GtkInfoBar.warning,
BaobabWindow GtkInfoBar.error { 
	border-bottom-width: 1px;
	border-bottom-style: solid;
	border-bottom-color: @borders;
}

BaobabRingschart {
	background-color: @theme_bg_color;
	padding: 13px 13px 13px 13px;
}

BaobabRingschart.subfolder-tip {
	border-radius: 3px;
	border-style: none;
	padding: 3px 3px 3px 3px;

	background-color: alpha(@theme_tooltip_bg_color, 0.90);
	color: @theme_tooltip_fg_color;

	text-shadow: 1px 1px black;
}

/* epiphany */

EphyToolbar .entry:first-child,
EphyToolbar .entry:focus:first-child {
	border-image-width: 3px 0 4px 3px;
	border-right-width: 0;
	border-bottom-right-radius: 0;
	border-top-right-radius: 0;
	padding-left: 4px;
	padding-right: 4px;
}

EphyToolbar .entry:last-child,
EphyToolbar .entry:focus:last-child {
	border-image-width: 3px 3px 4px 0;
	border-left-width: 0;
	border-bottom-left-radius: 0;
	border-top-left-radius: 0;
	padding-left: 4px;
	padding-right: 4px;
}

EphyToolbar .entry:focus {
	box-shadow: inset 1px 2px alpha(@theme_selected_bg_color, 0.1),
		inset 1px 1px alpha(@theme_selected_bg_color, 0.1),
		inset 0 -1px alpha(@theme_selected_bg_color, 0.2);
}

EphyToolbar .entry:focus:last-child {
	box-shadow: inset 0 2px alpha(@theme_selected_bg_color, 0.1),
		inset 0 1px alpha(@theme_selected_bg_color, 0.1),
		inset -1px -1px alpha(@theme_selected_bg_color, 0.2);
}

EphyToolbar .location-entry .button {
	color: @internal_element_color;
	-GtkButton-child-displacement-y: 0;
	border-image-source: url("borders/button-active.png");
	border-image-slice: 3 3 4 3;
	border-image-repeat: stretch;
	border-width: 2px;
	border-radius: 4px;
	padding-left: 4px;
	padding-right: 4px;
	box-shadow: inset 1px 0 @inset_dark_color,
		inset 0 1px @entry_inset,
		inset 0 2px alpha(@entry_inset, 0.4);
}

EphyToolbar .location-entry .button:last-child {
	border-image-width: 3px 3px 4px 0;
	border-left-width: 0;
	border-bottom-left-radius: 0;
	border-top-left-radius: 0;
}

EphyToolbar .location-entry .button:first-child {
	border-image-width: 3px 0 4px 3px;
	border-right-width: 0;
	border-bottom-right-radius: 0;
	border-top-right-radius: 0;
	/* flip the box-shadow division*/
	box-shadow: inset -1px 0 @inset_dark_color,
		inset 0 1px @entry_inset,
		inset 0 2px alpha(@entry_inset, 0.4);
}

EphyToolbar .location-entry .button,
EphyToolbar .location-entry .button:hover {
	icon-shadow: none;
	background-image: -gtk-gradient(linear,
		left top, left bottom,
		from(@entry_background_a),
		to(@entry_background_b));
}

EphyToolbar .location-entry .button:active,
EphyToolbar .location-entry .button:active:hover {
	background-image: -gtk-gradient(linear,
		left top, left bottom,
		from(shade(@entry_background_a, 0.9)),
		to(@entry_background_b));
}

EphyToolbar .location-entry .button:hover,
EphyToolbar .location-entry .button:active {
	color: @theme_text_color;
}

EphyNotebook.notebook {
	border-width: 1px 0 1px 0;
}

EphyNotebook.notebook tab {
	border-width: 0;
}

EphyToolbar.toolbar .button {
	padding-left: 4px;
	padding-right: 4px;
}

#ephy-page-menu-button.active-menu {
	background-image: none;
	background-color: @menu_bg_color;

	border-image: none;
	border-color: @menu_bg_color;
	border-radius: 4px 4px 0 0;
}

EphyOverview GtkScrolledWindow {
	background-color: @theme_base_color;
}

/* sets top and bottom borders on the main scrolled window for toolbar visual
 * division and search/downloadbar */
EphyWindow.background EphyEmbed.vertical GtkScrolledWindow.frame {
	border-color: @borders;
	border-width: 1px 0;
	border-radius: 0;
}

/* removes any border from the overview scrolled window, since it's overlaid */
EphyWindow.background EphyEmbed.vertical EphyOverview .documents-scrolledwin {
	border-style: none;
}

/* remove top and bottom borders from the main scrolled window when inside a notebook tab */
EphyWindow.background EphyNotebook.notebook EphyEmbed.vertical GtkScrolledWindow {
	border-top-width: 0;
	border-bottom-width: 0;
}

/* remove bottom borders from the  main scrolled window when no bars at the bottom of the screen are shown */
EphyWindow.background EphyNotebook:last-child EphyEmbed.vertical GtkScrolledWindow,
EphyWindow.background EphyNotebook.notebook:last-child {
	border-bottom-width: 0;
}

/* Gnome Contacts */

/* Line at top in contacts pane, similar to .documents-scrolledwin.frame */
.contacts-content.frame {
 border-width: 1px 0 0 0;
 border-radius: 0;
}

/* Background color in contacts pane, similar to .documents-main-view.view */
.contacts-main-view.view {
	background-color: #f1f2f1;
}

.contacts-suggestion {
	background-color: #D3D7CF;
	border-radius: 4px;
}

/* Border on the right in the left menu toolbar */
.contacts-left-header-bar:dir(ltr) {
	border-right-width: 1px;
}

.contacts-left-header-bar:dir(rtl) {
	border-left-width: 1px;
}

.contacts-left-header-bar:dir(ltr),
.contacts-right-header-bar:dir(rtl) {
	border-top-right-radius: 0;
}

.contacts-right-header-bar:dir(ltr),
.contacts-left-header-bar:dir(rtl) {
	border-top-left-radius: 0;
}

.contacts-avatar-frame.frame {
	border-width: 1px 1px 0 1px;
	border-style: solid;
	border-color: @borders;
	border-image: none;
	border-radius: 0;
	padding: 0;
}

.main-avatar-frame.frame {
	border-width: 1px;
	border-style: solid;
	border-color: @borders;
	border-radius: 6px;
}

/* Primary toolbar with no line at top to avoid conflicts with frame border */
ContactsWindow .primary-toolbar.toolbar {
	border-width: 0 0 1px 0;
}

.contacts-button:active {
	border-color: #000000;
	border-image: none;
}

.contacts-entry {
	box-shadow: none;
	border-image: none;
	border-width: 1px;
	border-radius: 4px;
	border-style: solid;
	border-color: #bbbeb7;
	background-image: none;
	background-color: #ffffff;
}

.contacts-entry:selected,
.contacts-entry:selected:focus {
	background-color: @theme_selected_bg_color;
	color: @theme_selected_fg_color;
}

.contacts-entry.contacts-postal-entry {
	border-radius: 0 0 0 0;
	border-width: 1px 1px 0 1px;
}

.contacts-entry.contacts-postal-entry:nth-child(first) {
	border-radius: 4px 4px 0 0;
}

.contacts-entry.contacts-postal-entry:nth-child(last) {
	border-radius: 0 0 4px 4px;
	border-width: 1px;
}

.button.contacts-square {
	padding: 0px;
}

.contacts-combo .button {
	border-image: none;
	border-width: 1px;
	border-style: solid;
	border-color: #bbbeb7;
	background-image: none;
	background-color: #ffffff;
}

.toolbar.contacts-edit-toolbar {
	padding: 6px;
	background-color: #E2E4E2;
	border-width: 1px 0 0 0;
	border-style: solid;
	border-color: @borders;
	border-image: none;
}

.toolbar.contacts-edit-toolbar .button {
	padding-left: 6px;
	padding-right: 6px;
}

.toolbar.contacts-selection-toolbar {
	border-width: 1px 0 0 0;
	border-style: solid;
	border-color: @borders;
	border-image: none;
}

.contacts-watermark {
	color: #bebebe;
	text-shadow: 1px 1px alpha(white, 0.6);
}

/* gnome-photos */

.photos-icon-bg {
	icon-shadow: 0 1px #000000;
}

/* Gucharmap */
GucharmapChartable:active,
GucharmapChartable:focus,
GucharmapChartable:selected {
	background-color: @theme_selected_bg_color;
	color: @theme_selected_fg_color;
}

/* evince */
EvWindow.background > GtkBox.vertical > GtkPaned.horizontal > GtkBox.vertical > GtkScrolledWindow.frame {
	border-width: 0;
	border-radius: 0;
}

EvWindow.background EvSidebar.vertical .frame {
	border-width: 1px 0 0;
	border-radius: 0;
}

EvWindow.background EvSidebar.vertical .notebook {
	border-width: 1px 0 0;
}

EvWindow.background EvSidebarAnnotations.vertical GtkToolPalette > GtkToolItemGroup > .button { 
	border-image: none;
	border-radius: 0;
	border-style: solid;
	border-width: 0 0 1px;
	border-color: @borders;
}

EvWindow.background EvSidebar.vertical .notebook .frame {
	border-width: 0;
}

EvWindow .pane-separator, 
EvWindow .pane-separator:hover {
	border-width: 0 1px;
	border-style: solid;
	border-color: @borders;
	background-color: shade(@theme_bg_color, 0.95);
	color: @borders;
}

EvWindow.background EggFindBar.toolbar {
	border-width: 1px 0 0;
	border-style: solid;
	border-color: @borders;
}

/* gcalctool */

MathWindow.background > GtkBox.vertical > GtkBox.vertical > GtkScrolledWindow {
	padding: 4px;
	background-color: @theme_base_color;
	border-radius: 3px;
}
