/*
 * The contents of this file are subject to the Netscape Public
 * License Version 1.1 (the "License"); you may not use this file
 * except in compliance with the License. You may obtain a copy of
 * the License at http://www.mozilla.org/NPL/
 *
 * Software distributed under the License is distributed on an "AS
 * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
 * implied. See the License for the specific language governing
 * rights and limitations under the License.
 *
 * The Original Code is mozilla.org code.
 *
 * The Initial Developer of the Original Code is Netscape
 * Communications Corporation.  Portions created by Netscape are
 * Copyright (C) 1998 Netscape Communications Corporation. All
 * Rights Reserved.
 *
 * Contributor(s): 
 */

/** 
  Styles for old GFX form widgets
 **/ 
 

@namespace url(http://www.w3.org/1999/xhtml); /* set default namespace to HTML */

*|*:fieldset-content {
  display: block;
}

form {
  display: block;
  margin: 0 0 1em 0;
}

/* miscellaneous form elements */

legend {
  padding-left: 2px;
  padding-right: 2px;
  border: none;
}

fieldset {
  display: block;
  border: 2px solid black;
  padding: 4px 4px 4px 4px;
  margin-left: 2px;
  margin-right: 2px;
}

/* default inputs, text inputs, and selects */
input {
  background-color: -moz-Field;
  border: 2px inset ThreeDFace;
  color: -moz-FieldText;
  cursor: text;
  font: field;
  text-align: start;
  vertical-align: text-bottom;
  -moz-box-sizing: border-box;
  -moz-user-focus: normal;
  -moz-binding: url("resource:///res/builtin/platformHTMLBindings.xml#inputFields");
  padding: 1px 0 1px 0;
}

textarea {
  background-color: -moz-Field;
  border: 2px inset ThreeDFace;
  color: -moz-FieldText;
  cursor: text;
  font: medium -moz-fixed;
  margin: 1px 0 1px 0;
  text-align: start;
  vertical-align: text-bottom;
  -moz-box-sizing: border-box;
  -moz-user-focus: normal;
  -moz-binding: url("resource:///res/builtin/platformHTMLBindings.xml#textAreas");
}

textarea > scrollbar {
  cursor: default;
}

*|*:-moz-singleline-textcontrol-frame {
  overflow: hidden;
  white-space: nowrap;
  background-color: inherit;
  text-align: inherit;
}

select {
  font: list;
  background-color: -moz-Field;
  border: 2px inset ThreeDFace;
  margin: 0;
  vertical-align: text-bottom;
  color: -moz-FieldText;
  white-space: nowrap;
  text-align: start; 
  cursor: default;
  -moz-user-select: none;
  -moz-user-focus: normal;
  -moz-box-sizing: border-box;
}

select[size] {
  padding: 1px 0 1px 0;
}
select[size="1"] {
  padding: 0;
}

select > input[type="button"] {
  position: static ! important;
  white-space: nowrap;
  background-image: url("arrow.gif") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  width: 12px;
  height: 12px;
  -moz-user-focus: none;
}

select > input[type="button"]:active {
  background-image: url("arrowd.gif") !important;
}

select[size], :-moz-select-scrolled-content {
  overflow: -moz-scrollbars-vertical;
}

select:-moz-dummy-option { 
  visibility: hidden; 
  content: "XX"; /* demo 8, edge case test 1 */
}

*|*:-moz-display-comboboxcontrol-frame {
  overflow: hidden;
  white-space: nowrap;
  background-color: inherit;
  color: inherit;
  text-align: inherit;
  padding: 1px 0 1px 4px;
  -moz-user-select: none;
}

option {
  min-height: 1em;
  display: block;
  -moz-user-select: none;
  -moz-user-focus: none;
}

select > option {
  padding: 0 5px 0 3px;
}

option[_moz-option-selected] {
  color: HighlightText ! important;
  background-color: Highlight ! important;
}

optgroup {
  display: block;
  font: list;
  font-style: italic;
  font-weight: bold;
  -moz-user-select: none;
  -moz-user-focus: none;
}

optgroup > option {
  padding-left: 20px;
  font-style: normal;
  font-weight: normal;
}

optgroup:before {
  display: block;
  content: attr(label);
}

*|*:-moz-dropdown-list {
  background-color: inherit;
  border: 1px outset black; 
  z-index: 2147483647;
  -moz-user-select: none;
} 

input[disabled],
textarea[disabled],
option[disabled],
select[disabled],
select[disabled] > :-moz-display-comboboxcontrol-frame {
  color: GrayText;
  cursor: default;
}

/* hidden inputs */
input[type="hidden"] {
  border: none;
  visibility: hidden;
  -moz-binding: none;
}

/* image buttons */
input[type="image"] {
  border: none;
  vertical-align: baseline;
  background-color: transparent;
  cursor: pointer;
  font-family: sans-serif;
  font-size: small;
  -moz-binding: none;
  padding: 0;
}

input[type="image"][disabled] {
  cursor: default;
}

input[type="image"]:focus {
  -moz-outline: 1px dotted -moz-FieldText;
}

/* file selector */
input[type="file"] {
  white-space: nowrap;
  border: none;
  cursor: default;
  -moz-binding: none;
  padding: 0;
}

/* button part of file selector */
input[type="file"] > input[type="button"] {
  height: inherit;
}

input[type="file"] > input[type="button"]:-moz-focus-inner
 {
  padding: 0px 2px 0px 2px;
  border: 1px dotted transparent;
}

/* radio buttons */
input[type="radio"] {
  border: 2px inset ThreeDFace;
  background-color: -moz-Field;
  color: -moz-FieldText;
  width: 12px;
  height: 12px;
  cursor: default;
  vertical-align: baseline;
  -moz-border-radius: 100%;
  -moz-binding: none;
  margin: 3px 3px 0px 5px;
  padding: 0;
}

/* check boxes */
input[type="checkbox"] {
  border: 2px inset ThreeDFace;
  background-color: -moz-Field;
  color: -moz-FieldText;
  width: 13px;
  height: 13px;
  cursor: default;
  vertical-align: text-bottom;
  -moz-binding: none;
  margin: 3px 3px 3px 4px;
  padding: 0;
}

/* common features of radio buttons and check boxes */
input[type="radio"][disabled],
input[type="radio"][disabled]:active,
input[type="radio"][disabled]:hover,
input[type="radio"][disabled]:hover:active,
input[type="checkbox"][disabled],
input[type="checkbox"][disabled]:active,
input[type="checkbox"][disabled]:hover,
input[type="checkbox"][disabled]:hover:active {
  padding: 1px;
  border: 1px inset ThreeDShadow;
  background-color: GrayText;
}

input[type="checkbox"]:focus,
input[type="radio"]:focus {
  border-style: groove;
}

input[type="checkbox"]:hover:active,
input[type="radio"]:hover:active {
  border-style: inset;
  background-color: ThreeDHighlight;
}

*|*:-moz-radio {
  background-color: -moz-FieldText;
  width: 4px;
  height: 4px;
  left: 6px;
  top: 6px;
  -moz-border-radius: 3px;
}

/* buttons */
button, 
input[type="reset"],
input[type="button"],
input[type="submit"] { 
  border: 2px outset ButtonFace;
  background-color: ButtonFace;
  color: ButtonText; 
  padding: 2px 0 2px 0;
  font: button;
  cursor: default;
  white-space: pre;
  -moz-box-sizing: border-box;
  -moz-user-select: none;
  -moz-user-focus: normal;
  -moz-binding: none;
}

*|*:button-content {
  display: block;
  text-align: center;
}

button:active:hover,
input[type="reset"]:active:hover,
input[type="button"]:active:hover,
input[type="submit"]:active:hover {
  border-style: inset;
  padding: 3px 0 1px 0;
}

button:-moz-focus-inner,
input[type="reset"]:-moz-focus-inner,
input[type="button"]:-moz-focus-inner,
input[type="submit"]:-moz-focus-inner {
  padding: 1px 2px 1px 2px;
  border: 1px dotted transparent;
}

button:focus:-moz-focus-inner,
input[type="reset"]:focus:-moz-focus-inner,
input[type="button"]:focus:-moz-focus-inner,
input[type="submit"]:focus:-moz-focus-inner {
  border-color: ButtonText;
}

button[disabled]:active, button[disabled],
input[type="reset"][disabled]:active,
input[type="reset"][disabled],
input[type="button"][disabled]:active,
input[type="button"][disabled],
input[type="file"][disabled] > input[type="button"],
input[type="file"][disabled] > input[type="button"]:active,
select[disabled] > input[type="button"],
select[disabled] > input[type="button"]:active,
input[type="submit"][disabled]:active,
input[type="submit"][disabled] {
  border: 1px outset ButtonShadow;
  padding: 3px 1px 3px 1px;
  color: GrayText;
}


