/*********************
 * NEMO File manager *
 *********************/

/* for breadcrumbs path bar */

.nemo-pathbar-button,
NemoPathbarButton {
	background-image: -gtk-gradient(linear, left top, left bottom,
		color-stop (0, shade(alpha(@theme_bg_color, 0.8), 1.1)),
		color-stop (.3, shade(alpha(@theme_bg_color, 0.8), 1.1)),
		color-stop (.7, shade(alpha(@theme_bg_color, 0.8), 0.98)),
		color-stop (1, shade(alpha(@theme_bg_color, 0.8), 0.90)));
	border-color: #979797;
	color: @theme_fg_color;
	-NemoPathbarButton-border-radius: 3px;
}

NemoPathbarButton:active {
	background-image: -gtk-gradient(linear, left top, left bottom,
		color-stop (0, shade(alpha(@theme_bg_color, 0.8), .8)),
		color-stop (.3, shade(alpha(@theme_bg_color, 0.8), .9)),
		color-stop (1, shade(alpha(@theme_bg_color, 0.8), 1.0)));
}

NemoPathbarButton:hover {
	background-image: -gtk-gradient(linear, left top, left bottom,
		color-stop (0, shade(alpha(@theme_selected_bg_color, 0.8), 1.25)),
		color-stop (.3, shade(alpha(@theme_selected_bg_color, 0.8), 1.25)),
		color-stop (.7, shade(alpha(@theme_selected_bg_color, 0.8), 0.95)),
		color-stop (1, shade(alpha(@theme_selected_bg_color, 0.8), 0.85)));
}

NemoPathbarButton:active:hover {
	background-image: -gtk-gradient(linear, left top, left bottom,
		color-stop (0, shade(alpha(@theme_selected_bg_color, 0.8), .80)),
		color-stop (.3, shade(alpha(@theme_selected_bg_color, 0.8), .95)),
		color-stop (1, shade(alpha(@theme_selected_bg_color, 0.8), 1.25)));
}

/* workaround for broken first/last-child logic with linked buttons
   in pathbar with gtk+-3.18 */
NemoPathBar:dir(ltr).raised.linked .button.text-button,
NemoPathBar:dir(ltr).raised.linked .button.text-button:hover,
NemoPathBar:dir(ltr).raised.linked .button.text-button:hover:active,
NemoPathBar:dir(ltr).raised.linked .button.text-button:active,
NemoPathBar:dir(ltr).raised.linked .button.text-button:checked,
NemoPathBar:dir(ltr).raised.linked .button.text-button:checked:hover,
NemoPathBar:dir(ltr).raised.linked .button.text-button:checked:hover:active,
NemoPathBar:dir(ltr).raised.linked .button.text-button:first-child,
NemoPathBar:dir(ltr).raised.linked .button.text-button:hover:first-child,
NemoPathBar:dir(ltr).raised.linked .button.text-button:hover:active:first-child,
NemoPathBar:dir(ltr).raised.linked .button.text-button:active:first-child,
NemoPathBar:dir(ltr).raised.linked .button.text-button:checked:first-child,
NemoPathBar:dir(ltr).raised.linked .button.text-button:checked:hover:first-child,
NemoPathBar:dir(ltr).raised.linked .button.text-button:checked:hover:active:first-child,
NemoPathBar:dir(ltr).raised.linked .button.text-button:last-child,
NemoPathBar:dir(ltr).raised.linked .button.text-button:hover:last-child,
NemoPathBar:dir(ltr).raised.linked .button.text-button:hover:active:last-child,
NemoPathBar:dir(ltr).raised.linked .button.text-button:active:last-child,
NemoPathBar:dir(ltr).raised.linked .button.text-button:checked:last-child,
NemoPathBar:dir(ltr).raised.linked .button.text-button:checked:hover:last-child,
NemoPathBar:dir(ltr).raised.linked .button.text-button:checked:hover:active:last-child,
NemoPathBar:dir(ltr).raised.linked .button.text-button:only-child,
NemoPathBar:dir(ltr).raised.linked .button.text-button:hover:only-child,
NemoPathBar:dir(ltr).raised.linked .button.text-button:hover:active:only-child,
NemoPathBar:dir(ltr).raised.linked .button.text-button:active:only-child,
NemoPathBar:dir(ltr).raised.linked .button.text-button:checked:only-child,
NemoPathBar:dir(ltr).raised.linked .button.text-button:checked:hover:only-child,
NemoPathBar:dir(ltr).raised.linked .button.text-button:checked:hover:active:only-child {
	border-right-width: 1px;
	border-left-width: 1px;
	border-image-width: 3px 3px 4px 3px;
	border-radius: 4px;
}

/* For Places Sidebar diskfull indicators */

NemoPlacesTreeView {
	-NemoPlacesTreeView-disk-full-bg-color: shade(@theme_bg_color, .65);
	-NemoPlacesTreeView-disk-full-fg-color: shade(@theme_selected_bg_color, 1.0);
	-NemoPlacesTreeView-disk-full-bar-width: 2px;
	-NemoPlacesTreeView-disk-full-bar-radius: 1px;
	-NemoPlacesTreeView-disk-full-bottom-padding: 1px;
	-NemoPlacesTreeView-disk-full-max-length: 70px;
}

NemoPlacesTreeView:selected {
	-NemoPlacesTreeView-disk-full-bg-color: shade(@theme_bg_color, 2.0);
	-NemoPlacesTreeView-disk-full-fg-color: shade(@theme_fg_color, 2.0);
}

NemoPlacesTreeView:hover {
}

NemoPlacesTreeView:selected:hover {
}

@define-color cluebar_color shade (@theme_base_color, 0.9);

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

NemoWindow .view {
	background-color: @theme_base_color;
}

NemoWindow .rubberband,
NemoWindow .view.rubberband {
	background-color: alpha (@theme_selected_bg_color, 0.35);
}

/* sidebar */

NemoWindow .sidebar .view {
	background-color: shade (@theme_bg_color, 1.08);
	color: @theme_fg_color;
}

NemoWindow .sidebar .frame {
	border-right-width: 1px;
	border-style: solid;
	border-color: shade (@theme_bg_color, 0.90);
	border-left: none;
	border-top: none;
	border-bottom: none;
}

NemoWindow .sidebar row:selected {
	color: @theme_selected_fg_color;
}

NemoWindow .sidebar row:backdrop:selected {
	color: @theme_fg_color;
	text-shadow: none; 
}

NemoWindow .sidebar row:hover {
	background-color: shade (@theme_selected_bg_color, 1.15);
	color: shade (@theme_selected_bg_color, 0.35);
}

/* desktop mode */
.nemo-desktop.nemo-canvas-item {
	color: @theme_bg_color;
	text-shadow: 1px 1px alpha (#000000, 0.8);
}

.nemo-desktop.nemo-canvas-item:active {
	background-image: none;
	background-color: alpha (@theme_bg_color, 0.84);
	color: @theme_fg_color;
}

.nemo-desktop.nemo-canvas-item:selected {
	background-image: none;
	background-color: alpha (@theme_selected_bg_color, 0.84);
	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;
}

/* inactive pane */

.nemo-inactive-pane .view {
	background-color: shade(@theme_base_color, 0.9);
}

/* Toolbar */
NemoToolbar .toolbar.primary-toolbar .button.image-button {
    padding: 0px 8px;
}

NemoToolbar .toolbar.primary-toolbar .button.text-button {
    padding: 0px 10px;
}

/* Misc */
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;
}

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

.nemo-cluebar-label {
	font: normal;
	text-shadow: 0 1px shade (@cluebar_color, 1.06);
}

NemoTrashBar.info,
NemoXContentBar.info,
NemoSearchBar.info,
NemoQueryEditor.info {
	background-color: @cluebar_color;
	border-bottom-color: shade (@cluebar_color, 0.92);
	border-radius: 0;
	border-style: solid;
	border-width: 0px 0px 1px 0px;
	color: @theme_fg_color;
}

NemoTrashBar .button,
NemoXContentBar .button,
NemoSearchBar .button,
NemoQueryEditor .button {
	border-radius: 0;
}

/****************
 * PopOver menu *
 ****************/
GraniteWidgetsPopOver {
	-GraniteWidgetsPopOver-arrow-width: 24;
	-GraniteWidgetsPopOver-arrow-height: 12;
	-GraniteWidgetsPopOver-border-radius: 6;
	-GraniteWidgetsPopOver-border-width: 1;
	-GraniteWidgetsPopOver-shadow-size: 18;
	
	border-style: solid;
	border-color: shade (@theme_bg_color, 0.50);
	background-color: @theme_bg_color;
	margin: 0;
}

GraniteWidgetsPopOver * {
	background-color: @theme_bg_color;
}

GraniteWidgetsPopOver .sidebar.view {
	background-color: @theme_bg_color;
}

GraniteWidgetsPopOver .button {
	background-image: none;
	background-color: alpha (#fff, 0.0);
}

GraniteWidgetsPopOver .button:active,
GraniteWidgetsPopOver .button:hover:active {
	background-image: none;
	background-color: alpha (#000, 0.05);
}

GraniteWidgetsPopOver .entry {
	background-image: linear-gradient(to bottom,
		shade (@theme_base_color, 0.88),
		shade (@theme_base_color, 0.94) 20px,
		shade (@theme_base_color, 0.96));
}

.button.app {
	border-width: 0;
	border-radius: 5px;
}

.app:hover,
.app:focus {
	background-color: alpha (#000, 0.15);
}

/* Parole media player needs more testing!
 hopefully do not set other stuff */

GtkPaned.horizontal .vertical GtkOverlay GtkRevealer.bottom .background.horizontal.osd {
    background-color: @theme_bg_color;
    color: @theme_fg_color;
}

GtkPaned GtkOverlay GtkRevealer.bottom .button.flat,
GtkPaned GtkOverlay GtkRevealer.bottom .button.flat:hover,
GtkPaned GtkOverlay GtkRevealer.bottom .button.flat:active,
GtkPaned GtkOverlay GtkRevealer.bottom .button.flat:checked,
GtkPaned GtkOverlay GtkRevealer.bottom .button.flat:active:hover,
GtkPaned GtkOverlay GtkRevealer.bottom .button.flat:checked:hover,
GtkPaned GtkOverlay GtkRevealer.bottom .button.flat.image-button,
GtkPaned GtkOverlay GtkRevealer.bottom .button.flat.image-button:hover ,
GtkPaned GtkOverlay GtkRevealer.bottom .button.flat.image-button:active,
GtkPaned GtkOverlay GtkRevealer.bottom .button.flat.image-button:checked,
GtkPaned GtkOverlay GtkRevealer.bottom .button.flat.image-button:active:hover,
GtkPaned GtkOverlay GtkRevealer.bottom .button.flat.image-button:checked:hover,
GtkPaned GtkOverlay GtkRevealer.bottom .background.horizontal.osd .button.flat.image-button:checked,
GtkPaned GtkOverlay GtkRevealer.bottom .background.horizontal.osd .button.flat.image-button:active:hover {
    border-style: none;
    border-radius: 4px;
    background-color: transparent;
    background-image: none;
    box-shadow: none;
    padding: 4px 7px;
    color: @button_active_text;
}

GtkPaned GtkOverlay GtkRevealer.bottom .background.horizontal.osd .button.flat.image-button:checked,
GtkPaned GtkOverlay GtkRevealer.bottom .background.horizontal.osd .button.flat.image-button:active:hover {
	background-image: linear-gradient(to bottom,
		@button_active_gradient_color_a,
		@button_active_gradient_color_b);
	box-shadow: inset 1px 0 @inset_dark_color,
		inset -1px 0 @inset_dark_color,
		inset 1px 2px alpha(@theme_selected_bg_color, 0.1),
		inset 1px 1px alpha(@theme_selected_bg_color, 0.1),
		inset -1px -1px alpha(@theme_selected_bg_color, 0.2);
    padding: 4px 7px;
    border-radius: 3px;
}

/****************
 * Dconf-editor *
 ****************/

DConfWindow GtkTreeView.view {
    background-color: @sidebar_bg;
    color: @theme_text_color;
}

DConfWindow GtkTreeView.view row:selected,
DConfWindow GtkTreeView.view row:selected:hover  {
    color: @theme_selected_fg_color;
}

DConfWindow GtkTreeView.view row:hover {
    background-color: shade (@theme_selected_bg_color, 1.15);
    color: shade (@theme_selected_bg_color, 0.35);
}

DConfWindow DConfKeyView.view {
    background-color: @theme_base_color;
    color: @theme_text_color;
}

DConfWindow DConfKeyView.view row:hover {
    background-color: shade (@theme_selected_bg_color, 1.55);
    color: shade (@theme_selected_bg_color, 0.35);
}

/* the small line between sidebar and view */
DConfWindow GtkPaned.horizontal {
    -GtkPaned-handle-size: 3px;
    border-color: transparent;
    background-color: @theme_bg_color;
}

DConfKeyView.view row:selected,
DConfKeyView.view row:selected:hover  {
    color:  @theme_selected_fg_color;
}

DConfKeyView.view .entry.spinbutton {
    padding: 1px 0px 1px 4px;
}

DConfKeyView.view .spinbutton .button {
    border-image: none;
    border-style: solid;
    border-width: 0px 0px 0px 1px;
    border-color: @theme_selected_bg_color;
    border-radius: 0px;
    box-shadow: none;
}

DConfKeyView.view .spinbutton .button:last-child {
    border-radius: 0 2px 2px 0;
}

/*****************
 * Ubuntu styles *
 *****************/
/* overlay scrollbar */
OsThumb {
	color: shade (@theme_fg_color, 1.6);
}

OsThumb:selected,
OsScrollbar:selected {
	background-color: @theme_selected_bg_color;
}

OsThumb:active,
OsScrollbar:active {
	background-color: shade (@theme_bg_color, 0.6);
}

OsThumb:insensitive,
OsScrollbar:insensitive {
	background-color: shade (@theme_bg_color, 0.85);
}

/* scrolled window */
.ubuntu-online-accounts.frame {
	border-style: solid;
	border-color: @borders;
	border-width: 1px;
	border-radius: 2px;
	padding: 0;
}

.ubuntu-online-accounts.frame {
	border-top-width: 0;
}
