@define-color theme_base_color #fff;
@define-color theme_bg_color @theme_base_color;
@define-color theme_fg_color #000;
@define-color theme_selected_bg_color #555753;
@define-color theme_selected_fg_color @theme_base_color;

@define-color theme_border_color @theme_selected_bg_color;
@define-color theme_selected_borders_color @theme_bg_color;
@define-color borders_edge #fff;

@define-color theme_highlight_color #3465a4;
@define-color theme_highlight_alt #204a87;
@define-color theme_highlight_border #12294a;

@define-color theme_internal_bg #d6d6d6;
@define-color theme_internal_border shade(@theme_internal_bg, 0.90);

@define-color theme_insensitive_color #7a7a79;
@define-color theme_insensitive_bg #f4f4f2;
@define-color theme_insensitive_border #babdb6;

@define-color theme_slider_bg #6f706d;
@define-color scale_progress_fill @theme_selected_bg_color;

@define-color theme_button_bg #eeeeec;
@define-color theme_button_fg #2e3436;
@define-color theme_button_active_bg @theme_slider_bg;
@define-color theme_button_active_border @theme_slider_bg;
@define-color theme_button_insensitive_bg #fafaf9;
@define-color theme_button_insensitive_fg #c6c8c8;
@define-color theme_button_insensitive_border #c1c2c3;
@define-color theme_button_insensitive_active_bg #cccdcc;
@define-color theme_button_insensitive_active_fg @theme_base_color;
@define-color theme_button_insensitive_active_border @theme_button_insensitive_active_bg;
@define-color theme_button_linked_border @theme_selected_bg_color;
@define-color theme_button_linked_insensitive_bg @theme_button_insensitive_bg;
@define-color theme_button_linked_insensitive_fg @theme_button_insensitive_fg;

@define-color theme_entry_bg @theme_base_color;

@define-color theme_notebook_bg @theme_base_color;
@define-color theme_notebook_border @theme_selected_bg_color;

@define-color theme_scale_trough_bg @theme_selected_bg_color;
@define-color theme_scale_trough_insensitive_bg @theme_button_insensitive_active_bg;

@define-color theme_switch_slider_bg @theme_selected_bg_color;
@define-color theme_switch_slider_border @theme_selected_bg_color;
@define-color theme_switch_slider_active_bg @theme_base_color;
@define-color theme_switch_slider_insensitive_bg @theme_trough_insensitive_fg;
@define-color theme_switch_slider_insensitive_border @theme_trough_insensitive_fg;
@define-color theme_switch_slider_active_insensitive_bg @theme_base_color;

@define-color theme_trough_bg @theme_button_bg;
@define-color theme_trough_fg @theme_selected_bg_color;
@define-color theme_trough_insensitive_bg #fafaf9;
@define-color theme_trough_insensitive_fg @theme_button_insensitive_active_bg;
@define-color theme_trough_insensitive_border @theme_button_insensitive_active_bg;

@define-color theme_toolbar_bg @theme_button_bg;
@define-color theme_inline_toolbar_button_bg @theme_base_color;
@define-color theme_inline_toolbar_button_fg @theme_fg_color;
@define-color theme_inline_toolbar_button_side #dddedb;

@define-color theme_check_radio_bg @theme_button_bg;
@define-color theme_check_radio_border @theme_border_color;

@define-color theme_view_bg @theme_base_color;

@define-color theme_cursor_color @theme_fg_color;

/*colors for the backdrop state, derived from the main colors. */
@define-color backdrop_base_color @base_color;
@define-color backdrop_bg_color @theme_bg_color;
@define-color backdrop_fg_color @theme_fg_color;
@define-color backdrop_insensitive_color @theme_insensitive_color;
@define-color backdrop_borders_color mix(@theme_border_color, @theme_bg_color, 0.9);

/******
 * WM *
 ******/

@define-color wm_border_color @theme_fg_color;
@define-color wm_border_bakcdrop_color @theme_insensitive_border;
@define-color wm_button_bg @theme_button_bg;
@define-color wm_button_fg @theme_button_fg;
@define-color wm_button_pressed_fg @theme_internal_bg;
@define-color wm_button_prelight_bg @theme_fg_color;
@define-color wm_button_pressed_bg @theme_fg_color;
@define-color wm_button_prelight_fg @theme_base_color;
@define-color wm_button_pressed_fg @theme_base_color;
@define-color wm_shadow alpha(black, 0.5);
@define-color wm_bg_a shade (@theme_bg_color, 1.1);
@define-color wm_bg_b @theme_bg_color;
@define-color wm_csd_solid_border_color shade (@theme_fg_color, 1.0);

/*******
 * osd *
 *******/

@define-color osd_highlight #ffffff;
@define-color osd_lowlight #525252;
@define-color osd_base #212526;
@define-color osd_base_backdrop shade(@osd_base, 1.40);

@define-color osd_fg #ededed;
@define-color osd_bg alpha(@osd_base, 0.80);
@define-color osd_bg_backdrop alpha(@osd_base_backdrop, 0.90);

@define-color osd_text_shadow alpha(black, 0.75);

@define-color osd_toolbar_bg_a alpha(@osd_base, 0.50);
@define-color osd_toolbar_bg_b alpha(#101010, 0.50);
@define-color osd_toolbar_bg_c alpha(shade(@osd_base, 1.02), 0.50);

@define-color osd_button_bg_a alpha(@osd_highlight, 0.16);
@define-color osd_button_bg_b alpha(@osd_lowlight, 0.05);
@define-color osd_button_bg_c alpha(@osd_highlight, 0.12);

@define-color osd_button_bg_insensitive alpha(@osd_bg, 0.25);
@define-color osd_button_bg_insensitive_active alpha(@osd_bg, 0.16);

@define-color osd_button_bg_hover_a alpha(@osd_highlight, 0.28);
@define-color osd_button_bg_hover_b alpha(@osd_lowlight, 0.14);
@define-color osd_button_bg_hover_c alpha(@osd_highlight, 0.14);

@define-color osd_button_bg_active_a alpha(black, .9);
@define-color osd_button_bg_active_b alpha(black, 0.4);
@define-color osd_button_bg_active_c alpha(black, 0);

@define-color osd_button_bg_backdrop alpha(@osd_bg, 0.18);
@define-color osd_button_bg_backdrop_hover alpha(@osd_bg, 0.25);
@define-color osd_button_bg_backdrop_active alpha(@osd_bg, 0.35);
@define-color osd_button_bg_backdrop_insensitive alpha(@osd_bg, 0.08);

@define-color osd_button_fg_backdrop shade(@osd_fg, 0.70);
@define-color osd_button_fg_backdrop_active shade(@osd_fg, 0.95);

@define-color osd_button_fg shade(@osd_fg, 0.80);
@define-color osd_button_fg_hover shade(@osd_fg, 0.96);
@define-color osd_button_fg_active shade(@osd_fg, 1.10);
@define-color osd_button_fg_insensitive shade(@osd_fg, 0.70);

@define-color osd_button_border alpha(@osd_highlight, 0.40);
@define-color osd_button_border_active alpha(@osd_highlight, 0.8);
@define-color osd_button_inset shade(@osd_fg, 0.67);
@define-color osd_button_shadow alpha(black, 0.35);

@define-color osd_trough_bg alpha(@osd_button_fg, 0.10);
@define-color osd_scale_trough_bg_color alpha(shade(#a4c2e8, 0.35), 0.4);

@define-color osd_view_bg alpha(@osd_bg, 0.60);
@define-color osd_view_bg_backdrop alpha(@osd_bg_backdrop, 0.60);

@define-color osd_scrollbar_trough shade(@osd_base, 1.70);
@define-color osd_scrollbar_trough_backdrop shade(@osd_base_backdrop, 1.40);

@define-color osd_scrollbar_slider shade(@osd_scrollbar_trough, 1.50);
@define-color osd_scrollbar_slider_prelight shade(@osd_scrollbar_trough, 1.80);
@define-color osd_scrollbar_slider_active shade(@osd_scrollbar_trough, 2.10);
@define-color osd_scrollbar_slider_backdrop shade(@osd_scrollbar_trough_backdrop, 1.50);


/************************
 * Info, Warnings, etc. *
 ************************/

@define-color warning_color #faad3d;
@define-color warning_bg_color @warning_color;
@define-color warning_fg_color black;

@define-color question_color #8aadd4;
@define-color question_bg_color @question_color;
@define-color question_fg_color white;

@define-color error_color #ed3636;
@define-color error_bg_color @error_color;
@define-color error_fg_color white;

@define-color error_color #cc0000;
@define-color success_color #4e9a06;

/*****************
 * fallback mode *
 *****************/

@define-color os_chrome_bg_color black;
@define-color os_chrome_fg_color #ccc;
@define-color os_chrome_selected_bg_color #333;
@define-color os_chrome_selected_fg_color white;

* {
    /* Pidgin */
    -GtkIMHtml-hyperlink-color: #000060;
    -GtkIMHtml-hyperlink-visited-color: #600000;
    -GtkIMHtml-hyperlink-prelight-color: #404080;

    /* Evolution */
    -GtkHTML-link-color: #000060;
    -GtkHTML-vlink-color: #600000;
    -GtkHTML-cite-color: #003000;
}

@import url("gtk-widgets.css");
@import url("other-applications.css");
@import url("mate-applications.css");
