/* NEW WIDGET ANDING: <button> */

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

/* outer frame */
  button
    {
      margin              : 1px 5px 2px 5px;
      min-width           : 6.3em;
      background-color    : ThreeDFace;
      color               : ButtonText;
      -moz-user-focus     : normal;
    }
  
  .button-text {
    margin: 0px !important;
    text-align: center;
  }

  button, 
  button[disabled="true"][default],
  button[disabled="true"]:hover:active
    {
      border-left         : 1px solid ThreeDHighlight;
      border-top          : 1px solid ThreeDHighlight;
      border-right        : 1px solid ThreeDDarkShadow;
      border-bottom       : 1px solid ThreeDDarkShadow;
    }

  .button-box,
  button[disabled="true"][default] > .button-box,
  button[disabled="true"]:hover:active > .button-box
    {
      border-left         : 1px solid ThreeDLightShadow;
      border-top          : 1px solid ThreeDLightShadow;
      border-right        : 1px solid ThreeDShadow;
      border-bottom       : 1px solid ThreeDShadow;
      -moz-user-focus     : none;
    }

  .button-box-2,
  button[disabled="true"][default] > .button-box > .button-box-2,
  button[disabled="true"]:hover:active > .button-box > .button-box-2
    {
			border              : 1px solid ThreeDFace;	
    }
  
  button:hover:active,
  button[open="true"],
  button[checked="true"]
    {
      border              : 1px solid ThreeDDarkShadow;
    }

  button:hover:active > .button-box,
  button[checked="true"] > .button-box,
  button[checked="true"]:focus > .button-box,
  button[open="true"] > .button-box,
  button[open="true"]:focus > .button-box
    {
      border              : 1px solid ThreeDShadow;
    }

  button:hover:active > .button-box > .button-box-2,
  button[checked="true"] > .button-box > .button-box-2,
  button[checked="true"]:focus> .button-box > .button-box-2,
  button[open="true"] > .button-box > .button-box-2,
  button[open="true"]:focus > .button-box > .button-box-2
    {
      border              : 1px solid transparent;
    }

  button:hover:active > .button-box > .button-box-2 > .button-box-text,
  button[open="true"] > .button-box > .button-box-2 > .button-box-text
    {
      padding             : 1px 2px 0px 3px; 
    }
  
  button[disabled="true"],
  button[disabled="true"]:hover:active 
    {
      color               : GrayText;
    }
        
  button[disabled="true"] > .button-box > .button-box-2 > .button-box-text,
  button[disabled="true"]:hover:active > .button-box > .button-box-2 > .button-box-text
    {
      padding             : 0px 3px 1px 2px;
    }

/* text wrapping frame (hack because <text> does not support alignment) */
  .button-box-text,
  button[disabled]:focus > .button-box > .button-box-2 > .button-box-text
    {
      padding             : 0px 3px 1px 2px;
      border              : 1px solid ThreeDFace;
      margin              : 1px;
    }

  button:focus > .button-box > .button-box-2 > .button-box-text
    {
      border              : 1px dotted ThreeDDarkShadow;
    }    
    
/** Styles for "DEFAULT" buttons (usually 'OK' or equivalent in dialogs. 
 *  To activate, set 'default' attribute on button.
 **/
 
/* outer frame */  
  button[default], button:focus
    {
      border              : 1px solid ThreeDDarkShadow;
    }

  button[default] > .button-box,
  button:focus > .button-box
    {
      border-left         : 1px solid ThreeDHighlight;
      border-top          : 1px solid ThreeDHighlight;
      border-right        : 1px solid ThreeDDarkShadow;
      border-bottom       : 1px solid ThreeDDarkShadow;
    }

  button[default] > .button-box > .button-box-2,
  button:focus > .button-box > .button-box-2
    {
      border-left         : 1px solid ThreeDLightShadow;
      border-top          : 1px solid ThreeDLightShadow;
      border-right        : 1px solid ThreeDShadow;
      border-bottom       : 1px solid ThreeDShadow;
    }

/* ::::: menu-button buttons ::::: */

button[type="menu-button"] {
  margin: 0px !important;
  border: none !important;
}

.menu-button-dropmarker {
  list-style-image: url("chrome://global/skin/scroll-down.gif");
}
  
.menu-button-dropmarker[disabled="true"] {
  list-style-image: url("chrome://global/skin/scroll-down-disabled.gif");
}

/* ::::: plain buttons ::::: */

button.plain, 
button.plain:hover,
button.plain:hover:active,
button.plain > .button-box, 
button.plain:hover > .button-box, 
button.plain:hover:active > .button-box {
  border: 0px ! important;
  margin: 0px;
  padding: 0px;
}

