/* :::: Credit where credit is due :::: */
/* Sharebird: light-weight theme idea */

@import url(chrome://MonterailFDOverlay/content/skin/root.css);
@import url("chrome://MonterailFDOverlay/content/skin/lightning.css");

menupopup {
    -moz-appearance: none !important;
    color: #fff;
    --panel-background: var(--background-color-inactive);
    --panel-color: #fff;
}


menuitem:hover:not([disabled="true"]),
menupopup > menu:hover:not([disabled="true"]),
menuitem label:hover:not([disabled="true"]) {
    color: #fff !important;
    background-color: var(--background-color-light);
}

.toolbarbutton-1:not([type="menu-button"]):not([disabled="true"]):-moz-any([open="true"], [checked="true"], :hover:active) {
    background: var(--toolbarbutton-active-background) !important;
    border-color: var(--toolbarbutton-active-bordercolor);
    box-shadow: var(--toolbarbutton-active-boxshadow) !important;
    transition-duration: 10ms;
    background-image: none !important;
}

menuseparator {
    border-top: 1px solid #656A6F;
    border-bottom: none;
    -moz-appearance: none;
    margin: 6px 20px;
    padding: 0;
}

#tabbar-toolbar .toolbarbutton-icon,
#header-view-toolbox .toolbarbutton-icon {
    fill: #fff;
}

#navigation-toolbox:not(:-moz-window-inactive) {
    color: #fff !important;
    background-color: var(--background-color) !important;
}

#navigation-toolbox:-moz-window-inactive {
    color: #fff !important;
    background-color: var(--background-color-inactive) !important;
}

#menubar-items>#mail-menubar>menu {
    -moz-appearance: none;
    border-style: none;
    color: inherit !important;
}

#menubar-items>#mail-menubar>menu[_moz-menuactive="true"]:not([disabled="true"]) {
    background-color: hsla(0, 0%, 0%, .12);
}

#menubar-items>#mail-menubar>menu[_moz-menuactive="true"][open="true"]:not([disabled="true"]) {
    background-color: hsla(0, 0%, 0%, .22);
}

.mail-toolbox,
#mailContent>#mail-toolbox,
.contentTabInstance>.contentTabToolbox,
#folderpane-mode-selector-menulist,
#threadCols,
.contentTabToolbox {
    box-shadow: none;
    background-image: none;
    background-color: var(--background-color-light);
    color: var(--message-list-text-color);
}

#quick-filter-bar,
#status-bar,
.tabmail-tab > .tab-stack > .tab-background[selected="true"],
.tabmail-tab > .tab-stack > .tab-content[selected="true"] {
    background-color: var(--background-color-light) !important;
    color: var(--message-list-text-color) !important;
    background-image: none !important;
}

#calendar-add-task-button {
    color: var(--message-list-text-color);
}

#folderpane-mode-selector-menulist {
    border: 0;
}

#attachmentView>#attachmentBar:not(:-moz-window-inactive) {
    color: var(--message-list-text-color);
    background-color: var(--background-color);
}

#attachmentView>#attachmentBar:-moz-window-inactive {
    color: var(--message-list-text-color);
    background-color: var(--background-color-inactive);
}

#attachmentView {
    border: 0;
}

.tabmail-tab .tab-background-middle[selected=true] {
    --fgTabBackgroundColor: #fff;
    --fgTabTexture: linear-gradient(transparent, transparent);
}

.tab-background[selected] {
    background-color: var(--background-color-light) !important;
}

.tabmail-tab:not([selected]) {
    color: inherit !important;
}

.treecol-icon,
.tabmail-tab,
.toolbarbutton-1 {
    -moz-context-properties: fill;
}

.toolbarbutton-1,
.toolbarbutton-menubutton-button {
    color: var(--message-list-text-color);
    fill: var(--message-list-text-color);
}

.toolbarbutton-text {
    color: #fff;
}

#navigation-toolbox .toolbarbutton-1,
#navigation-toolbox .toolbarbutton-menubutton-button,
.tab-label {
    color: #fff;
    fill: #fff;
}

.tabmail-tab[selected]:-moz-window-inactive .tab-icon-image,
.tabmail-tab[selected]:-moz-window-inactive .tab-label-container,
.toolbarbutton-1:-moz-window-inactive .toolbarbutton-icon,
.toolbarbutton-1:-moz-window-inactive>.toolbarbutton-text,
.toolbarbutton-menubutton-button:-moz-window-inactive>.toolbarbutton-icon,
.toolbarbutton-menubutton-button:-moz-window-inactive>.toolbarbutton-text {
    opacity: 0.5;
}

.toolbarbutton-menubutton-button>.toolbarbutton-icon,
.toolbarbutton-1 .toolbarbutton-icon {
    width: 16px !important;
    height: 16px !important;
    margin: 1px !important;
    padding: 0 !important;
}

toolbar>#button-chat[unreadMessages="true"] {
    fill: var(--tree-background-color-selected);
}

toolbar[brighttext]>.toolbarbutton-1 {
    fill: #fff;
}

#quick-filter-bar {
    background-color: var(--background-color-light);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) inset;
}

#singlemessage>#msgHeaderView,
#msgHeaderView {
    background-color: var(--background-color) !important;
    color: #fff;
}

/* foldertree & threadtree */

#searchInput,
.searchBox,
#task-text-filter-field,
#unifinder-search-field  {
    background-color: var(--background-color) !important;
    color: var(--search-text-color) !important;
}

#quick-filter-bar[filterActive="matches"] #qfb-results-label {
    color: #6eff22;
}

#folderPaneBox>#folderTree {
    background-color: var(--background-color);
}

#folderPaneBox>#folderTree:-moz-window-inactive {
    background-color: var(--background-color-inactive);
}

#folderTree>treechildren,
#threadTree>treechildren,
#calendar-task-tree treechildren,
#unifinder-search-results-tree>treechildren {
    --treechildren-selectedBackground: var(--tree-background-color-selected) !important;
    --treechildren-selectedFocusBackground: var(--tree-background-color-selected);
    --treechildren-selectedFocusCurrentBackground: var(--tree-background-color-selected);
    --treechildren-hoverSelectedBackground: var(--tree-background-color-selected);
}

#threadTree>treechildren, 
#calendar-task-tree treechildren,
#unifinder-search-results-tree>treechildren {
    --treechildren-hoverBackground: var(--tree-background-color-hover);
    --treechildren-hoverCurrentBackground: var(--tree-background-color-hover);
    color: #fff !important;
}

#threadTree > treechildren::-moz-tree-cell-text(unread),
#threadTree > treechildren::-moz-tree-cell(unread) {
    font-weight: bold !important;
}

#folderTree>treechildren {
    --treechildren-hoverBackground: rgba(255,255,255,.1);
    --treechildren-hoverCurrentBackground: rgba(255,255,255,.1);
}

#threadTree treechildren::-moz-tree-row(container, hover) {
    background: var(--tree-background-color-hover) !important;
}

#threadTree treechildren::-moz-tree-row(selected),
#threadTree treechildren::-moz-tree-row(container, selected) {
    background: var(--tree-background-color-selected) !important;
}

#threadContentArea>#threadTree, 
#calendar-task-tree treechildren,
#calendar-task-tree treechildren::-moz-tree-row(even),
#calendar-task-tree treechildren::-moz-tree-row(odd),
#unifinder-search-results-tree>treechildren,
#unifinder-search-results-tree>treechildren::-moz-tree-row(even),
#unifinder-search-results-tree>treechildren::-moz-tree-row(odd),
#threadTree treechildren::-moz-tree-row(container) {
    background-color: var(--thread-background-color);
}

#threadTree > treechildren::-moz-tree-cell-text(untagged),
#threadCols {
    color: #fff !important;
}


#threadTree>treechildren:not(.autocomplete-treebody)::-moz-tree-cell-text(selected),
#threadTree>treechildren:not(.autocomplete-treebody)::-moz-tree-cell-text(selected, focus),
#folderTree>treechildren:not(.autocomplete-treebody)::-moz-tree-cell-text,
#folderTree>treechildren:not(.autocomplete-treebody)::-moz-tree-cell-text(selected, focus),
#calendar-task-tree treechildren:not(.autocomplete-treebody)::-moz-tree-cell-text,
#calendar-task-tree treechildren:not(.autocomplete-treebody)::-moz-tree-cell-text(selected, focus),
#unifinder-search-results-tree>treechildren:not(.autocomplete-treebody)::-moz-tree-cell-text,
#unifinder-search-results-tree>treechildren:not(.autocomplete-treebody)::-moz-tree-cell-text(selected, focus) {
    color: #fff !important;
}

#rssSubscriptionsList>treechildren::-moz-tree-image,
#folderPaneBox>#folderTree>treechildren::-moz-tree-image {
    width: 14px;
    height: 14px;
}

/*     Folder Tree sizes    */

treechildren:-moz-tree-twisty {
    width: 12px !important;
    -moz-image-region: rect(0px 12px 12px 0px) !important;
    -moz-appearance: none !important;
    list-style-type: image !important;
}

#folderTree>hbox {
    margin-top: 30px !important;
}

#folderTree>treechildren::-moz-tree-row {
	margin-top: 0px !important;
}

#folderTree>treechildren::-moz-tree-row {
    height: var(--folder-tree-row-height) !important;
}

#folderTree>treechildren::-moz-tree-row(selected) {
    border: none !important;
}

#folderTree>treechildren::-moz-tree-cell-text(folderNameCol, newMessages-true),
#folderTree>treechildren::-moz-tree-cell-text(folderNameCol, closed, subfoldersHaveUnreadMessages-true) {
    color: #fff !important;
    font-style: italic !important;
}

/*    Thread tree sizes   */

#threadTree>treechildren::-moz-tree-row {
    height: var(--message-list-row-height) !important;
    border: none !important;
    border-bottom: 1px solid rgba(127, 127, 127, 0.2) !important;
}

#threadTree>treechildren::-moz-tree-row(selected) {
    border: none !important;
}

#threadCols,
#threadCols treecol,
#threadCols treecolpicker,
#calendar-task-tree treecol,
#calendar-task-tree treecolpicker,
#unifinder-search-results-tree treecol,
#unifinder-search-results-tree treecolpicker,
#unifinder-todo-tree treecol,
#unifinder-todo-tree treecolpicker {
    -moz-appearance: none !important;
}

#threadCols treecol[sortDirection="ascending"] .treecol-sortdirection {
    -moz-appearance: button-arrow-up !important;
}

#threadCols treecol[sortDirection="descending"] .treecol-sortdirection {
    -moz-appearance: button-arrow-down !important;
}

#threadCols treecol,
#threadCols treecolpicker,
#calendar-task-tree treecol,
#calendar-task-tree treecolpicker,
#unifinder-search-results-tree treecol,
#unifinder-search-results-tree treecolpicker,
#unifinder-todo-tree treecol,
#unifinder-todo-tree treecolpicker {
    color: #fff !important;
    fill: #fff;
    border: none !important;
    padding: 3px !important;
    border-left: 1px solid rgba(127, 127, 127, 0.4) !important;
    min-width: 21px !important;
}

#threadCols treecol, 
#calendar-task-tree treecol, 
#calendar-task-tree treecolpicker,  
#unifinder-search-results-tree treecol, 
#unifinder-search-results-tree treecolpicker,
#unifinder-todo-tree treecol,
#unifinder-todo-tree treecolpicker {
    background-color: var(--background-color-light) !important;
}

#threadPane {
    -moz-appearance: none !important;
}

.toolbarbutton-1.msgHeaderView-button {
    background-image: linear-gradient(0, var(--background-color-light), var(--background-color-light)) !important;
}

.headerValue, .dateLabel {
    color: #fff;
}

#folderpane_splitter {
    border-inline-start: 1px solid var(--background-color) !important;
}

#threadpane-splitter, #folderTree {
    border-bottom: 1px solid var(--background-color) !important;
}

.statusbar {
    -moz-appearance: none;
    background-color: var(--background-color) !important;
    color: #fff;
}

.moreIndicator {
    font-weight: bold;
    color: #fff;
}

.moreIndicator:hover {
    color: #fff;
    text-decoration: underline;
    cursor: pointer;
}


/*   customize toolbar */
#main-box { 
    background: var(--background-color);
}

toolbarpaletteitem,
menulist menupopup menuitem,
#modelistLabel,
#donebutton .button-text,
#restoreDefault .button-text,
#instructions,
menulist menupopup > menuitem:not([disabled="true"])[_moz-menuactive="true"] {
    color: #fff;
}

#modelist {
    color: #fff !important;
}

#modelistpopup {
    background-color: #3d4145;
}