/*
    see:

    http://developer.gnome.org/gtk3/3.4/GtkCssProvider.html
    http://www.gnu.org/software/emacs/manual/html_node/emacs/GTK-resources.html
    http://thegnomejournal.wordpress.com/2011/03/15/styling-gtk-with-css/
    http://www.gtkforums.com/viewtopic.php?f=3&t=988&p=72088=GTK3+with+CSS#p72088
*/

/*----------------------------------------------------------------*/
/*
General notes:
- try to make selectors as long as possible, so as not to interfere
  with the controls of other applications; this can be achieved only partly
  (e.g., #pane is a very general selector)
-

TODO:
- checkmarks in menus are black instead of white
- the 'exit emacs' popup dialog somehow gets the wrong resize grip
*/
/*----------------------------------------------------------------*/
/* this works */
#xxxpane
{
    background-color: alpha( @theme_selected_bg_color, 0.8 );
    color: purple;
}

#xxxframe                   /* works, but touches other applications */
                            /* (and we don't need it) )*/
{
    background-color: #708090;
    border-radius: 3px;
    font-size: 12pt;
    color: red;
}

/*----------------------------------------------------------------*/
#pane #verticalScrollBar
{
    /* the vertical scrollbar in emacs has a bug where it sometimes covers the fringe */
    border: 2px solid #292929;                  /* works ! */
    padding: 1px 10px;                          /* second value has enormous effect oddly in vertical dimension! */
    margin: 1px 10px;                           /* second value has enormous effect oddly in vertical dimension! */
    /*border-radius: 2px;*/                     /* works */
    /*
    GtkScrollbar:
    "fixed-slider-length"               gboolean
    "has-backward-stepper"              gboolean
    "has-forward-stepper"               gboolean
    "has-secondary-backward-stepper"    gboolean
    "has-secondary-forward-stepper"     gboolean
    "min-slider-length"                 gint
    */
    /*-GtkScrollbar-fixed-slider-length: 1;*/
    -GtkScrollbar-min-slider-length: 25;
    -GtkScrollbar-has-backward-stepper: 0;
    -GtkScrollbar-has-forward-stepper: 0;
    /*
    GtkRange:
    "activate-slider"          gboolean
    "arrow-displacement-x"     gint
    "arrow-displacement-y"     gint
    "arrow-scaling"            gfloat
    "slider-width"             gint
    "stepper-position-details" gboolean
    "stepper-size"             gint
    "stepper-spacing"          gint
    "trough-border"            gint
    "trough-side-details"      gboolean
    "trough-under-steppers"    gboolean
    */
    /*-GtkRange-activate-slider: 1;*/
    -GtkRange-slider-width: 4;                  /* works */
    -GtkRange-trough-border: 0;                 /* works */ /* with a large width it reveals a bug in emacs and/or gtk3 */
    -GtkRange-trough-side-details: 0;
    -GtkRange-trough-under-steppers: 0;
}

/*----------------------------------------------------------------*/
/* the toolbar is almost never visible */
#emacs-toolbar,
#emacs-toolbar *
{
    background-color: #536B84;
    color: white;
    padding: 0px 6px;
    border: 1px solid white;
}

/*----------------------------------------------------------------*/
/* objective: get menu pulldown menu's to have thin and rounded borders */

#pane #menubar GtkMenuShell
{
    border: 1px solid #78BAD4;  /* light blue */
    border-radius: 5px;
}

/* also give the menus a slightly larger font */
#pane #menubar,
#pane #menubar GtkMenuShell,
#pane #menubar GtkMenuShell *
{
    font-family: "Ubuntu Sans Mono";
    font-size: 7px;
}

/*----------------------------------------------------------------*/
#pane #menubar              /* works */
{
    background-color: #536B84;
    border: none;
    padding: 0px 0px;
    margin: 25px;
}

/* top menu item */
/* this works, but it needs a parent Emacs class specifier */
#pane #menubar > GtkLabel,
#pane #menubar > GtkMenuItem
{
    padding: 2px 18px;  /* works */
    margin: 3px 0px;    /* works */
    color: aquamarine;  /* works */
}

/*----------------------------------------------------------------*/
/* disabled ("greyed out") menu items */
/* note: #emacs-menuitem:insensitive only does one level deep; test on Edit > GoTo > ... */
#emacs-menuitem *:insensitive
{
    color: #292929;                         /* works */
    text-shadow: none;                      /* works */
}

#emacs-menuitem * :hover,
#xxxxemacs-menuitem * :active
{
    background-color: transparent;          /* FINALLY WORKS! */
    color: white;                           /* works */
}

#emacs-menuitem *,                          /* works */
#emacs-menuitem > GtkLabel                  /* works */
{
    background-color: #536B84;
    color: white                            /* works (also for tear lines!) */
}

#emacs-menuitem                             /* with only this it ALMOST works beautifully; only the tear lines are still white */
{
    background-color: #536B84;
    color: #292929;                         /* works -- this affects only the separators */
    border: 0px none;
    /*padding: auto auto;*/
    /*margin: 0px 0px 0px 0px;*/
    /*margin: auto auto auto auto;*/
}

/*----------------------------------------------------------------*/
/* popup dialog */
#emacs-dialog
{
    background-color: #536B84;
    color: white;
    border: 0px none;
}

/*----------------------------------------------------------------*/
