/*
 * 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 Communicator client code, released
 * March 31, 1998.
 *
 * The Initial Developer of the Original Code is Netscape
 * Communications Corporation. Portions created by Netscape are
 * Copyright (C) 1998-2001 Netscape Communications Corporation. All
 * Rights Reserved.
 *
 * Contributor(s):
 *   Joe Hewitt (hewitt@netscape.com)
 */

/* ===== textfield.css ==================================================
  == Styles used by the XUL textfield element.
  ======================================================================= */

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");

/* ::::: textfield ::::: */

textfield {
  cursor: text;
  margin: 2px 4px;
  background-color: #FFFFFF;
  color: #000000;
  font: inherit;
}

textfield,
textfield[readonly="true"][focused="true"] {
  border-top: 1px solid #A8B5C6;
  border-right: 1px solid #E2E8F0;
  border-bottom: 1px solid #E2E8F0;
  border-left: 1px solid #A8B5C6;
}

.textfield-internal-box,
.textarea-internal-box {
  padding: 1px 0px 1px 2px;
}

.textfield-internal-box,
.textarea-internal-box,
textfield[readonly="true"][focused="true"] > .textfield-internal-box,
textfield[readonly="true"][focused="true"] > .textarea-internal-box {
  border: 1px solid #757C8A;
}

.textfield-input,
.textfield-textarea {
  margin: 0px !important;
  border: none !important;
  padding: 0px !important;
  background-color: inherit;
  color: inherit;
  font: inherit;
}

/* ..... readonly state ..... */

textfield[readonly="true"] {
  background-color: #B4C3D4;
}

/* ..... focused state ..... */

textfield[focused="true"] {
  border: 1px solid #96A7BD;
}

textfield[focused="true"] > .textfield-internal-box,
textfield[focused="true"] > .textarea-internal-box {
  border-color: #000000;
}

/* ..... disabled state ..... */

textfield[disabled="true"] > .textfield-internal-box {
  background-color: #B4C3D4;
}

textfield[disabled="true"] {
  cursor: default !important;
  color: #85959E;
}

/* ::::: plain textfield ::::: */

textfield.plain,
textfield.plain > .textfield-internal-box,
textfield.plain > .textarea-internal-box {
  margin: 0px !important;
  border: none !important;
  padding: 0px !important;
}

/* ::::: scrollable textfield ::::: */

.scrollfield {
  margin: 1px 0px 0px 0px;
  border: none !important;
  background: inherit;
}

.scrollfield > .textfield-internal-box,
.scrollfield > .textarea-internal-box {
  margin: 0px !important;
  border: none !important;
  padding: 0px !important;
}

/* ::::: autocomplete text field ::::: */

.textfield-popup > menuitem {
  max-width: none !important;
}
