/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

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

@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
@namespace html url("http://www.w3.org/1999/xhtml"); /* namespace for HTML elements */

/* :::::::::: menulist :::::::::: */

menulist {
  margin: 1px 4px;
  border: 2px solid transparent;
  min-height: 19px;
  color: #000000;
  font: message-box;
}

.menulist-label {
  margin-top: 0px !important;
  margin-bottom: 0px !important;
  margin-inline-start: 0px !important;
  margin-inline-end: 2px !important;
}

.menulist-description {
  font-style: italic;
  color: #5D616E;
  margin-inline-start: 1em !important;
}

.menulist-icon {
  margin-inline-end: 2px;
}

.menulist-label-box {
  -moz-box-align: center;
  -moz-box-pack: center;
  padding: 2px;
  border: 1px solid #000000;
  border-right: 1px solid transparent;
  border-top-left-radius: 2px;
  border-bottom-left-radius: 2px;
  background-color: #A6B3C0;
  padding-inline-start: 8px;
}

.menulist-dropmarker {
  border: 1px solid black;
  border-left: 1px solid #6D7C8F;
  border-top-left-radius: 0px;
  border-bottom-left-radius: 0px;
}

.menulist-dropmarker > .dropmarker-icon {
  margin: 1px 2px 0px;
}

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

menulist:focus {
  border-color: #98A5B2;
  border-radius: 7px;
  background-color: #98A5B2;
}

/* ..... active state ..... */
  
menulist[open="true"] {
  color: #FFFFFF;
}
  
menulist[open="true"] > .menulist-label-box {
  border-top-color: #313948;
  border-bottom-color: #313948;
  border-left-color: #313948;
  background-color: #91A2B4;
}

menulist[open="true"] > .menulist-dropmarker {
  list-style-image: url("chrome://global/skin/menulist/mlist-act-arrow.png");
}

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

menulist[disabled="true"] {
  color: #8C99AB !important;
}
  
menulist[disabled="true"] > .menulist-label-box {
  border-top-color: #727D8E !important;
  border-bottom-color: #727D8E !important;
  background-color: #B7BFCB !important;
}

menulist[disabled="true"] > .menulist-label-box {
  border-left-color: #727D8E !important;
}

menulist[disabled="true"] > .menulist-dropmarker {
  border-left-color: #95A1AD !important;
}

/* ::::: editable menulists ::::: */

.menulist-editable-box {
  border: 1px solid #000000;
  border-right: none;
  background-color: #FFFFFF;
  padding-top: 2px;
  padding-bottom: 2px;
  padding-inline-start: 2px;
  padding-inline-end: 0px;
}

html|*.menulist-editable-input {
  margin: 0px !important;
  border: none !important;
  padding: 0px !important;
  background: inherit;
  font: inherit;
}

menulist[focused="true"] {
  border-color: #98A5B2;
  border-top-right-radius: 7px;
  border-bottom-right-radius: 7px;
  background-color: #98A5B2;
}

/* ::::: compact menulists ::::: */

.menulist-compact {
  -moz-box-align: center;
  -moz-box-pack: center;
  margin: 0;
  border: 1px solid;
  border-top-color: #A6B3C0;
  border-right-color: #5D616E;
  border-bottom-color: #5D616E;
  border-left-color: #A6B3C0;
  border-radius: 0;
  padding: 1px;
  min-height: 0px;
  background-color: #A6B3C0;
  color: #000000;
}

.menulist-compact > .menulist-label {
  margin-top: 0px !important;
  margin-bottom: 0px !important;
  margin-inline-start: 0px !important;
  margin-inline-end: 3px !important;
  text-align: end;
}  

.menulist-compact > .menulist-dropmarker {
  border: none;
  background: transparent;
}

.menulist-compact > .menulist-dropmarker,
.menulist-compact[open="true"] > .menulist-dropmarker {
  list-style-image: url("chrome://global/skin/menulist/mlist-compact-arrow.png");
}

.menulist-compact:focus {
  border-radius: 0;
}
      
.menulist-compact[open="true"] {
  border-top-color: #788797;
  border-right-color: #5D616E;
  border-bottom-color: #5D616E;
  border-left-color: #788797;
  background-color: #91A2B4;
}
