/***************
 * Progressbar *
 ***************/
/* progress component */
.progressbar,
.progressbar row,
.progressbar row:hover,
.progressbar row:selected,
.progressbar row:selected:focused {
	border-radius: 0;
	border-style: solid;
	border-width: 1px;
	border-color: @progressbar_border;
	box-shadow: inset 0px 1px alpha(#bfd3f4, 0.95),
				inset 1px 0px alpha(#bfd3f4, 0.5),
				inset -1px 0px alpha(#bfd3f4, 0.5),
                inset 0px -1px alpha(#bfd3f4, 0.2);             
}

.progressbar.vertical,
.progressbar.vertical row,
.progressbar.vertical row:hover,
.progressbar.vertical row:selected,
.progressbar.vertical row:selected:focused {
	border-radius: 0;
	border-style: solid;
	border-width: 1px;
	border-color: @progressbar_border;
	box-shadow: inset 1px 0px alpha(#bfd3f4, 0.95),
				inset 0px 1px alpha(#bfd3f4, 0.5),
				inset 0px -1px alpha(#bfd3f4, 0.5),
                inset -1px 0px alpha(#bfd3f4, 0.2);
}

/* through component */
GtkProgressBar,
.trough row {
	padding: 0;
}

GtkProgressBar.trough,
.trough row,
.trough row:hover {
	background-image: -gtk-gradient (linear,
		left top, left bottom,
		from (@progressbar_through_a),
		to (@progressbar_through_b));

	border-width: 1px;
	border-style: solid;
	border-radius: 0;
	/*border-color: shade (@progressbar_through_border, 1.0);*/
	border-top-color: shade (@progressbar_through_border, 1.0);
    border-right-color: shade (@progressbar_through_border, 1.1);
    border-left-color: shade (@progressbar_through_border, 1.1);
    border-bottom-color: shade (@progressbar_through_border, 1.15);
}

GtkProgressBar.trough.vertical,
.trough.vertical row,
.trough.vertical row:hover {
	background-image: -gtk-gradient (linear,
		left top, right top,
		from (@progressbar_through_a),
		to (@progressbar_through_b));

	border-width: 1px;
	border-style: solid;
	border-radius: 0;
	border-left-color: shade (@progressbar_through_border, 1.0);
    border-top-color: shade (@progressbar_through_border, 1.1);
    border-bottom-color: shade (@progressbar_through_border, 1.1);
    border-right-color: shade (@progressbar_through_border, 1.15);
}

.trough row:selected,
.trough row:selected:focused {
	background-image: -gtk-gradient (linear,
		left top, left bottom,
		from (mix (@trough_bg_color_a, @theme_selected_bg_color, 0.25)),
		to (mix (@trough_bg_color_b, @theme_selected_bg_color, 0.25)));
}

.trough.vertical row:selected,
.trough.vertical row:selected:focused {
	background-image: -gtk-gradient (linear,
		left top, right top,
		from (mix (@trough_bg_color_a, @theme_selected_bg_color, 0.25)),
		to (mix (@trough_bg_color_b, @theme_selected_bg_color, 0.25)));
}

/*************
 * Scrollbar *
 *************/
.scrollbar {
	-GtkRange-arrow-scaling: 0.8;
	/*background-color: none;*/
	border-style: solid;
	
}

/* Through */
.scrollbar.trough,
.scrollbar.trough.vertical {
	background-image: -gtk-gradient (linear,
		left top, right top,
		from (#cbcbcb),
		to (#dedede));
	border-width: 1px;
    border-color: #a3a3a3;
    border-radius: 12px;
    border-style: solid;
    box-shadow: inset 0px 1px alpha(shade(@theme_bg_color, 0.85), 0.65),
				inset 1px 0px alpha(shade(@theme_bg_color, 0.85), 0.65),
				inset -1px 0px alpha(shade(@theme_bg_color, 0.85), 0.65),
                inset 0px -1px alpha(shade(@theme_bg_color, 0.85), 0.65);
}

.scrollbar.trough.horizontal {
	background-image: -gtk-gradient (linear,
		left top, left bottom,
		from (#cbcbcb),
		to (#dedede));
	border-width: 1px;
	border-style: solid;
}

/* Sliders and buttons */
.scrollbar.slider.vertical,
.scrollbar.button.vertical {
	/*background-color: shade (@theme_bg_color, 0.99);*/
	background-image: -gtk-gradient (linear,
		left top, left bottom,
		from (shade (@theme_bg_color, 0.99)),
		color-stop (0.5, shade (@theme_bg_color, 1.05)),
		to (shade (@theme_bg_color, 0.99)));
	border-radius: 6px;
	border-width: 1px;
	border-color: @scrollslider_border;
	box-shadow: inset 0px 1px alpha(shade (@theme_bg_color, 1.1), 0.6),
				inset 1px 0px alpha(shade (@theme_bg_color, 1.1), 0.6),
				inset -1px 0px alpha(shade (@theme_bg_color, 1.1), 0.6),
                inset 0px -1px alpha(shade (@theme_bg_color, 1.1), 0.6);
}

.scrollbar.slider.vertical:prelight {
	background-color: shade (@theme_bg_color, 1.02);
}

.scrollbar.slider.vertical:prelight:active {
	background-color: shade (@theme_bg_color, 0.94);
}

.scrollbar.slider.horizontal {
	/*background-color: shade (@theme_bg_color, 0.99);*/
	background-image: -gtk-gradient (linear,
		left top, right top,
		from (shade (@theme_bg_color, 0.99)),
		color-stop (0.5, shade (@theme_bg_color, 1.05)),
		to (shade (@theme_bg_color, 0.99)));
	border-radius: 6px;
	border-width: 1px;
	border-color: @scrollslider_border;
	box-shadow: inset 0px 1px alpha(shade (@theme_bg_color, 1.1), 0.6),
				inset 1px 0px alpha(shade (@theme_bg_color, 1.1), 0.6),
				inset -1px 0px alpha(shade (@theme_bg_color, 1.1), 0.6),
                inset 0px -1px alpha(shade (@theme_bg_color, 1.1), 0.6);
}

.scrollbar.slider.horizontal:prelight {
	background-color: shade (@theme_bg_color, 1.02);
}

.scrollbar.slider.horizontal:prelight:active {
	background-color: shade (@theme_bg_color, 0.94);
}

.scrollbar.slider:insensitive {
	background-color: @theme_base_color;
}

.scrollbar.trough:insensitive {
	background-color: shade (@theme_bg_color, 0.882);
}

.scrollbar.dragging, .scrollbar.hovering {
	opacity: 0.998;
}

.scrollbar.overlay-indicator:not(.dragging):not(.hovering) {
	opacity: 0.999;
}

.scrollbar.overlay-indicator:not(.dragging):not(.hovering) {
	-GtkRange-slider-width: 8px;
}

.scrollbar.overlay-indicator:not(.dragging):not(.hovering) .trough {
	border: none;
	background: none;
	box-shadow: none;
}

/************
 * Toolbars *
 ************/
.primary-toolbar.toolbar {
    border-top-width: 1px;
    border-bottom-width: 1px;
    border-left-width: 0px;
    border-right-width: 0px;
	border-top-color: #cfcfcf;
   	border-right-color: transparent;
   	border-left-color: transparent;
   	border-bottom-color: #6f6f73;
	background-image: -gtk-gradient (linear,
		left top, left bottom,
		from (@toolbar_gradient_base),
		to (@toolbar_gradient_final));
	border-style: solid;
	-GtkWidget-window-dragging: true;
	padding: 2px;	
}

.toolbar {
	border-style: solid;
	border-color: @theme_bg_color;
	border-width: 0;
	border-radius: 0;
	padding: 1px;
}

.toolbar:insensitive {
	color: alpha (@theme_fg_color, 0.6);
}

/* Toolbar buttons */

.primary-toolbar.toolbar.button {
	padding: 0px 2px;
	border-style: none;
	border-width: 1px;
	border-radius: 2px;
	background-image: -gtk-gradient (linear,
		left top, left bottom,
		from (alpha (@button_gradient_color_a, 0.0)),
		to (alpha (@button_gradient_color_b, 0.0)));
}

.primary-toolbar.toolbar.button:insensitive {
	border-style: none;
	border-width: 0;
	color: @insensitive_fg_color;
	background-image: none;
	background-color: alpha (@theme_base_color, 0.0);
	-GtkWidget-focus-line-width: 0;
}

.primary-toolbar.toolbar.button:hover {
	border-style: none;
	background-image: -gtk-gradient (linear,
		left top, left bottom,
		from (alpha (@button_hover_gradient_color_a, 0.60)),
		to (alpha (@button_hover_gradient_color_b, 0.60)));
	border-radius: 2px;
}

.primary-toolbar.toolbar.button:active {
	background-image: -gtk-gradient (linear,
		left top, left bottom,
		from (shade (@button_active_gradient_color_a, 1.00)),
		to (shade (@button_active_gradient_color_b, 1.00)));
	border-color: @highlighted_border;
	border-style: solid;
	color: @theme_fg_color;
}

.primary-toolbar.toolbar.button:active:hover {
	background-image: -gtk-gradient (linear,
		left top, left bottom,
		from (shade (@button_active_gradient_color_a, 1.10)),
		to (shade (@button_active_gradient_color_b, 1.10)));
	border-color: @highlighted_border;
	border-style: solid;
	color: @theme_fg_color;
}

.primary-toolbar.toolbar.button:active:insensitive {
	border-color: @insensitive_border_color;
	background-image: none;
}

.primary-toolbar.toolbar.raised.button {
	border-width: 1px;
	border-style: solid;

	background-image: -gtk-gradient (linear,
		left top, left bottom,
		from (@button_gradient_color_a),
		to (@button_gradient_color_b));
}

.primary-toolbar.toolbar.raised.button:insensitive {
	background-image: none;
}

.primary-toolbar.toolbar.raised.button:hover {
	border-color: @button_border;
	background-image: -gtk-gradient (linear,
		left top, left bottom,
		from (@button_hover_gradient_color_a),
		to (@button_hover_gradient_color_b));
	border-width: 1px;
	border-style: solid;
}

.primary-toolbar.toolbar.raised.button:hover:active,
.primary-toolbar.toolbar.raised.button:active {
	background-image: -gtk-gradient (linear,
		left top, left bottom,
		from (@button_active_gradient_color_a),
		to (alpha (@button_active_gradient_color_b, 0.13)));
	background-color: @theme_base_color;

	border-color: @highlighted_border;
	border-width: 1px;
	border-style: solid;
}

.primary-toolbar.toolbar.raised.button:insensitive:active {
	border-style: solid;
	border-width: 1px;
	background-image: none;
}

/* level bars as used for password quality or remaining power */
GtkLevelBar {
    -GtkLevelBar-min-block-width: 34;
    -GtkLevelBar-min-block-height: 6;
}

GtkLevelBar.vertical {
    -GtkLevelBar-min-block-width: 6;
    -GtkLevelBar-min-block-height: 34;
}

.level-bar.trough {
    border-radius: 0;
    padding: 1px;
	background-image: -gtk-gradient (linear,
		left top, left bottom,
		from (@progressbar_through_a),
		to (@progressbar_through_b));
    border-width: 1px;
	border-style: solid;
	/*border-color: shade (@progressbar_through_border, 1.0);*/
	border-top-color: shade (@progressbar_through_border, 1.0);
    border-right-color: shade (@progressbar_through_border, 1.1);
    border-left-color: shade (@progressbar_through_border, 1.1);
    border-bottom-color: shade (@progressbar_through_border, 1.15);
    box-shadow: inset 0px 1px alpha(@theme_selected_fg_color, 0.1),
			   inset 0px -1px alpha(@theme_selected_fg_color, 0.25);                                
}

.level-bar.fill-block {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                     from (shade(@theme_selected_bg_color, 1.1)),
                                     to (shade(@theme_selected_bg_color, 0.8)));

    border-width: 1px;
    border-style: solid;
    border-color: shade(@theme_selected_bg_color, 0.6);
}

.level-bar.indicator-continuous.fill-block {
    padding: 2px;
    border-radius: 0px;
}

.level-bar.indicator-discrete.fill-block.horizontal {
    margin: 0 1px;
}

.level-bar.indicator-discrete.fill-block.vertical {
    margin: 1px 0;
}

/* discrete indicator border rounding,
   uncomment when :nth-child will be working
   on the widget

.level-bar.indicator-discrete.fill-block.horizontal:first-child {
    border-radius: 3px 0 0 3px;
}

.level-bar.indicator-discrete.fill-block.horizontal:last-child {
    border-radius: 0 3px 3px 0;
}

.level-bar.indicator-discrete.fill-block.vertical:first-child {
    border-radius: 3px 3px 0 0;
}

.level-bar.indicator-discrete.fill-block.vertical:last-child {
    border-radius: 0 0 3px 3px;
}

*/

.level-bar.fill-block.level-high {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                     from (shade(@success_color, 1.1)),
                                     to (shade(@success_color, 1.0)));

    border-color: shade(@success_color, 0.85);
}

.level-bar.fill-block.level-low {
    background-image: -gtk-gradient(linear, left top, left bottom,
                                     from (shade(@warning_bg_color, 1.1)),
                                     to (shade(@warning_bg_color, 1.0)));

    border-color: shade(@warning_bg_color, 0.80);
}

.level-bar.fill-block.empty-fill-block {
    background-color: transparent;
    background-image: none;
    border-color: alpha(@theme_fg_color, 0.1);
}

/*********************
 * titlebar *
 *********************/

.titlebar,
.titlebar.default-decoration {
    padding: 5px 9px 4px 9px;
    border-radius: 4px 4px 0px 0px;
    text-shadow: none;
    /*border-color: #454951;*/
    border-top-width: 1px;
    border-top-color: #f0f1f2;
    border-bottom-width: 1px;
    border-bottom-color: #6c7280;
    border-left-width: 0px;
    border-right-width: 0px;
	/*border-width: 0px;*/
    background-image: -gtk-gradient (linear,
        left top,
        left bottom,
        from (#e3e0e1),
	to (#bdbcc0));
    box-shadow: inset 0px 1px #faf9fa,
		inset 0px -1px #848484;
		
}

.maximized .titlebar,
.tiled .titlebar {
	border-radius: 0px;
}

.titlebar:backdrop {
	padding: 5px 9px 4px 9px;
    border-radius: 4px 4px 0px 0px;
    text-shadow: none;
    /*border-color: #454951;*/
    border-top-width: 1px;
    border-top-color: #f0f1f2;
    border-bottom-width: 1px;
    border-bottom-color: #6c7280;
    border-left-width: 0px;
    border-right-width: 0px;
	/*border-width: 0px;*/
    background-image: -gtk-gradient (linear,
        left top,
        left bottom,
        from (#e2dee0),
	to (#c4c2c6));
    box-shadow: inset 0px 1px #edeced,
		inset 0px -1px #848484;
}

.titlebar .separator {
	color: shade(@theme_bg_color, 0.7);
}

.titlebar.default-decoration {
    border: none;
    box-shadow: none;
}

.titlebar .title {
    font: bold;
	text-shadow: 0px 1px alpha(@light_shadow, 0.5);
}

.titlebar .title:backdrop {
	color: #787d8b;
	text-shadow: none;
}

.titlebar .menu .separator {
	color: shade(@theme_bg_color, 0.7);
}

.window-frame {
    border-radius: 2px 2px 0px 0px;
    box-shadow: 0 0 0 1px #2b2e33,
				0 4px 15px alpha(black, 0.95);
	margin: 10px;
	color: transparent;
    /* this is used for the resize cursor area */
}

.window-frame:backdrop {
    border-radius: 2px 2px 0px 0px;
    box-shadow: 0 0 0 1px #2b2e33,
				0 4px 15px alpha(black, 0.94);
	margin: 10px;
	color: transparent;
}

.window-frame.tiled {
    border-radius: 0; }
    
.window-frame.csd.popup {
    border-radius: 0;
    box-shadow: 0 3px 9px alpha(black, 0.95); }
    
.window-frame.csd.tooltip {
    border-radius: 3px;
	box-shadow: 0 3px 9px alpha(black, 0.95); } 
