/* 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/. */

@import url("chrome://messenger/skin/messenger.css");
@import url("chrome://messenger/skin/messageIcons.css");

#threadTree {
  flex: 1;
}

#searchTerms {
  flex: 1 auto;
  min-height: 12em;
  margin-top: 8px;
}

#searchTermListBox > #booleanAndGroup,
#searchTermListBox > #searchTermBox,
#searchTerms > vbox > hbox {
  padding-left: 6px;
  padding-right: 6px;
}

#searchTermBox {
  min-height: 0;
  padding-top: 2px;
  padding-bottom: 2px;
}

#searchResults {
  flex: 1 auto;
  min-height: 8em;
  padding: 0 6px 6px;
  text-shadow: none;
}

#searchableFolders {
  flex: 2 2;
}

#searchResultListBox {
  margin: 4px;
  min-height: 50px;
}

.search-value-menulist {
  flex: 1;
}

.search-value-input {
  width: -moz-available;
}

.search-menulist[unavailable="true"] {
  color: GrayText;
}

radio[value="and"] {
  margin-inline-end: 18px;
}

/* ::::: box sizes ::::: */

#virtualFolderSearchTerms {
  flex: 1 1 0;
  overflow: hidden;
}

#virtualFolderSearchTermListBoxWrapper {
  flex: 1;
  min-height: 0;
}

#virtualFolderSearchTermListBox {
  flex: 1;
}

#searchTermTree {
  min-height: 50px;
}

/* ::::: thread decoration ::::: */

treechildren::-moz-tree-cell-text(read) {
  font-weight: normal;
}

treechildren::-moz-tree-cell-text(unread) {
  font-weight: bold;
}

/* on a collapsed thread, if the top level message is read, but the thread has
 * unread children, underline the text.  4.x mac did this, very slick
 */
treechildren::-moz-tree-cell-text(container, closed, hasUnread, read) {
  text-decoration: underline;
}

#gray_horizontal_splitter {
  min-height: 4px;
  background-color: -moz-Dialog;
  border-top: 1px solid ThreeDHighlight;
  border-bottom: 1px solid ThreeDShadow;
}

/* ::::: theme support ::::: */

:root:not([lwt-tree]) #searchTermBox:-moz-lwtheme,
:root:not([lwt-tree]) #searchResults:-moz-lwtheme {
  background-color: -moz-Dialog;
}

:root[lwt-tree] #searchTermBox,
:root[lwt-tree] #searchResults {
  background-color: var(--lwt-accent-color-inactive, var(--lwt-accent-color));
}

:root:not(:-moz-lwtheme) #searchTermList:focus > richlistitem[selected="true"] {
  color: inherit;
}

:root:-moz-lwtheme #gray_horizontal_splitter {
  background-color: var(--toolbar-bgcolor);
  border-color: hsla(0, 0%, 50%, .3);
}
