/* NEW WIDGET ANDING: <button> */

/** Default Button Styles (apply to usage of <button> without 
 *  any applied class).
 **/

/* outer frame */
  button 
    {
      border              : 1px solid #000000;
      -moz-border-radius  : 3px 2px 2px 3px;
      margin              : 1px 5px 2px 5px;
      background-color    : #CCCCCC;
    }
  
  button[disabled="true"],
  button[disabled="true"]:hover,
  button[disabled="true"]:hover:active 
    {
      border              : 1px solid #999999;
      color               : #999999;
    }
        
/* internal frame */
  button > .button-internal-box 
    {
      vertical-align      : middle;
      text-align          : center;
      border              : 1px outset #CCCCCC;
      padding             : 2px;
    }
    
  button:hover:active > .button-internal-box 
    {
      border              : 1px inset #CCCCCC;
      padding             : 3px 1px 1px 3px;  
    }
  
  button[disabled="true"] > .button-internal-box,
  button[disabled="true"]:hover > .button-internal-box,
  button[disabled="true"]:hover:active > .button-internal-box 
    {
      border              : 1px outset #CCCCCC;
      -moz-border-radius  : 0px;
      padding             : 2px;
    }

/* text wrapping frame (hack because <text> does not support alignment) */
  .button-text-container
    {
      text-align          : center;
      vertical-align      : middle;
    }

/* text frame */
  .button-text 
    {
      padding             : 0px 2px 0px 2px;
    }
  
  button[orient="vertical"] > .button-internal-box > .button-text-container > .button-text
    {
      padding             : 2px 2px 0px 2px;
    }
  
/** Styles for "DEFAULT" buttons (usually 'OK' or equivalent in dialogs. 
 *  To activate, set 'default' attribute on button.
 **/
 
/* outer frame */  
  button[default] 
    {
      /* XXX this is a HACK until 'orient' is supported in CSS! XXX */
      /* strictly speaking not necessary because default for buttonright is 
       * to lay image out horizontally, but leaving here as a reminder to
       * implement this feature */
      -moz-binding        : url(chrome://global/content/xulBindings.xml#buttonright);
      font-weight         : bold;
	    list-style-image    : url("chrome://global/skin/return.gif");
    }
  
  button[default][disabled="true"]
    {
      list-style-image    : url("chrome://global/skin/return-disabled.gif");
    }
    
/** Styles for 'dialog' buttons (usually any command button in a dialog)
 *  This class gives buttons 10px of padding on each side to increase the
 *  strike area and make buttons with small amounts of text (e.g. 'OK') 
 *  look less silly.
 **/

/* internal frame */
  .button-dialog > .button-internal-box,
  .button-dialog:hover > .button-internal-box
    {
      padding             : 2px 10px 2px 10px;
    }
  
  .button-dialog:hover:hover:active > .button-internal-box 
    {
      padding             : 3px 9px 1px 11px;
    }

/** Styles for grey toolbar buttons. These buttons are used in places like
 *  editor's formatting toolbar or toolbars wanting a button similar to a command
 *  button but without an initial outset frame.
 **/ 
  .button-borderless 
    {
      border              : 1px solid #CCCCCC;
    }
  
  .button-borderless:hover
    {
      border              : 1px solid #000000;
    }
    
  .button-borderless > .button-internal-box 
    {
      border              : 1px solid #CCCCCC;
    }
  
  .button-borderless:hover > .button-internal-box 
    {
      border              : 1px outset #CCCCCC;
    }
  
  .button-borderless:hover:active > .button-internal-box 
    {
      border              : 1px inset #CCCCCC;
    }

/** plain (raw) buttons, class="plain" **/
  button.plain, button.plain:hover, button.plain:hover:active,
  button.plain:hover:active > .button-internal-box,
  button.plain > .button-internal-box, 
  button.plain > .button-internal-box:hover:active,
  button.plain > .button-internal-box > .button-text-container, 
  button.plain > .button-internal-box > .button-text-container:hover:active,
  button.plain > .button-internal-box > .button-text-container > .button-text, 
  button.plain > .button-internal-box > .button-text-container > .button.text:hover:active,
  button.plain > .button-internal-box > .button-icon, 
  button.plain > .button-internal-box > .button.icon:hover:active
    {
      border              : 0px ! important;
      margin              : 0px;
      padding             : 0px;
    }
    
/*** class = "plain-extended" ***/
/********************************/
/* This is a dummy class that is specified in the several XUL files for the sake of the
 * Macintosh Classic Skin.  This class has essentially the same behavior and styles as
 * the above <button> and accompanying styles, but is useful in the Mac Classic skin.  This is because <button>
 * styles have been completely rewritten to produce Macintosh buttons with bevels, rounded corners,
 * etc.  Plain-extended thereby functions to produce square buttons with all the same hover and active
 * effects that blue <button>'s do.
 ********************************/

button.plain-extended {}


/** 
 * utility class for buttons with associated popup
 **/
.button-popup 
  {
	  list-style-image      : url(chrome://global/skin/taskbar-popup-arrow.gif);
  }
    
    
    
/**
 * Reorder buttons 
 **/
   
  .reorder-up
    {
      min-width           : 0px;
      list-style-image    : url("chrome://global/skin/scroll-up.gif");
    }    
    
  .reorder-down
    {
      min-width           : 0px;
      list-style-image    : url("chrome://global/skin/scroll-down.gif");
    }    
    
  .reorder-up > .button-internal-box > .button-icon,
  .reorder-down > .button-internal-box > .button-icon
    {
      margin              : none;
      padding             : none;
    }
    
    
