/* Thunderbird 91.X userContent.css customizations for NsCDE */

:root {
  --body-background-color: var(--nscde-bg-color-4) !important;
  --body-text-color: var(--nscde-fg-color-4) !important;
  --header-background-color: var(--nscde-sel-color-5) !important;
  --head-text-color: var(--nscde-fg-color-4) !important;
  --in-content-border-active: transparent !important;
  --in-content-border-active-shadow: transparent !important;
  --in-content-page-background: var(--nscde-bg-color-4) !important;
  --in-content-page-color: var(--nscde-fg-color-4) !important;
  --in-content-primary-button-background: var(--nscde-bg-color-1) !important;
  --in-content-button-text-color-hover: var(--nscde-fg-color-6) !important;
  --arrowpanel-background: var(--nscde-bg-color-6) !important;
  --arrowpanel-color: var(--nscde-fg-color-6) !important;
}

:root[dialogroot], dialog, dialogBox {
  --in-content-page-background: var(--nscde-bg-color-6) !important;
  background-color: var(--nscde-bg-color-6) !important;
  color: var(--nscde-fg-color-6) !important;
  border-radius: 0px !important;
}

::selection {
  background-color: var(--nscde-sel-color-4);
  color: var(--nscde-fg-color-4);
}

input::selection, textarea::selection {
  background-color: var(--nscde-fg-color-4);
  color: var(--nscde-sel-color-4);
}

window menulist, menupopup, menuseparator {
  background-color: var(--nscde-bg-color-6) !important;
  color: var(--nscde-fg-color-6) !important;
  border-top: 1px solid var(--nscde-ts-color-6) !important;
  border-left: 1px solid var(--nscde-ts-color-6) !important;
  border-right: 1px solid var(--nscde-bs-color-6) !important;
  border-bottom: 1px solid var(--nscde-bs-color-6) !important;
  border-radius: 0px !important;
}

window menulist:is(:active, :hover:active, [open], [checked], [selected="true"]) {
  background-color: var(--nscde-sel-color-6) !important;
  border-top: 1px solid var(--nscde-bs-color-6) !important;
  border-left: 1px solid var(--nscde-bs-color-6) !important;
  border-right: 1px solid var(--nscde-ts-color-6) !important;
  border-bottom: 1px solid var(--nscde-ts-color-6) !important;
}

dialog menuitem,
window menuitem {
  background-color: var(--nscde-bg-color-6) !important;
  color: var(--nscde-fg-color-6) !important;
  border-radius: 0px !important;
  margin: 1px !important;
}

dialog menuitem:is(:active, :open, :checked, [selected="true"]),
window menuitem:is(:active, :open, :checked) {
  background-color: var(--nscde-sel-color-6) !important;
  color: var(--nscde-fg-color-6) !important;
  border-top: 1px solid var(--nscde-bs-color-6) !important;
  border-left: 1px solid var(--nscde-bs-color-6) !important;
  border-right: 1px solid var(--nscde-ts-color-6) !important;
  border-bottom: 1px solid var(--nscde-ts-color-6) !important;
  margin: 0px !important;
}

dialog .radio-check,
window .radio-check,
dialog .checkbox-check,
window .checkbox-check {
  background-color: var(--nscde-bg-color-6) !important;
  color: var(--nscde-fg-color-6) !important;
  border-top: 1px solid var(--nscde-ts-color-6) !important;
  border-left: 1px solid var(--nscde-ts-color-6) !important;
  border-right: 1px solid var(--nscde-bs-color-6) !important;
  border-bottom: 1px solid var(--nscde-bs-color-6) !important;
  border-radius: 0px !important;
}

dialog .radio-check[selected],
window .radio-check[selected],
dialog .checkbox-check[checked],
window .checkbox-check[checked] {
  background-color: var(--nscde-sel-color-6) !important;
  color: var(--nscde-fg-color-6) !important;
  border-top: 1px solid var(--nscde-bs-color-6) !important;
  border-left: 1px solid var(--nscde-bs-color-6) !important;
  border-right: 1px solid var(--nscde-ts-color-6) !important;
  border-bottom: 1px solid var(--nscde-ts-color-6) !important;
  border-radius: 0px !important;
}

dialog menulist,
dialog button,
window dialog button,
.dialog-button-box button {
  border-width: 1px !important;
  background-color: var(--nscde-bg-color-6) !important;
  color: var(--nscde-fg-color-6) !important;
  border-left-color: var(--nscde-ts-color-6) !important;
  border-right-color: var(--nscde-bs-color-6) !important;
  border-top-color: var(--nscde-ts-color-6) !important;
  border-bottom-color: var(--nscde-bs-color-6) !important;
  border-radius: 0px !important;
}

dialog menulist:-moz-any(:hover:active,[open="true"]):not([disabled="true"]),
dialog button:-moz-any(:hover:active,[open="true"]):not([disabled="true"]),
window dialog button:-moz-any(:hover:active,[open="true"]):not([disabled="true"]),
.dialog-button-box button:-moz-any(:hover:active,[open="true"]):not([disabled="true"]) {
  border-width: 1px !important;
  background-color: var(--nscde-sel-color-6) !important;
  border-right-color: var(--nscde-ts-color-6) !important;
  border-left-color: var(--nscde-bs-color-6) !important;
  border-bottom-color: var(--nscde-ts-color-6) !important;
  border-top-color: var(--nscde-bs-color-6) !important;
}

#containerBox richlistbox {
  background-color: var(--nscde-bg-color-4) !important;
  color: var(--nscde-fg-color-4) !important;
  border-left-color: var(--nscde-bs-color-5) !important;
  border-right-color: var(--nscde-ts-color-5) !important;
  border-top-color: var(--nscde-bs-color-5) !important;
  border-bottom-color: var(--nscde-ts-color-5) !important;
  border-radius: 0px !important;
}

dialog richlistbox,
dialog tree,
window richlistbox {
  background-color: var(--nscde-bg-color-4) !important;
  color: var(--nscde-fg-color-4) !important;
  border-left-color: var(--nscde-bs-color-6) !important;
  border-right-color: var(--nscde-ts-color-6) !important;
  border-top-color: var(--nscde-bs-color-6) !important;
  border-bottom-color: var(--nscde-ts-color-6) !important;
  border-radius: 0px !important;
}

#containerBox richlistbox richlistitem,
#containerBox richlistbox richlistitem:hover {
  background-color: var(--nscde-bg-color-4) !important;
  color: var(--nscde-fg-color-4) !important;
  margin: 1px !important;
}

#containerBox richlistbox richlistitem[current="true"],
dialog richlistitem[current="true"] {
  background-color: var(--nscde-sel-color-4) !important;
  color: var(--nscde-fg-color-4) !important;
  border: 1px solid var(--nscde-bg-color-1) !important;
  border-radius: 0px !important;
  margin: 0px !important;
}

dialog tab {
  background-color: var(--nscde-bg-color-6) !important;
  color: var(--nscde-fg-color-6) !important;
  border: 1px transparent !important;
  border-radius: 0px !important;
  margin: 1px !important;
}

dialog tab:is(:active, :open, [selected], [checked], [focus], [focus-visible]) {
  font-weight: bold !important;
  font-size: 95% !important;
  border-radius: 0px !important;
  border-top: 1px solid var(--nscde-ts-color-6) !important;
  border-left: 1px solid var(--nscde-ts-color-6) !important;
  border-right: 1px solid var(--nscde-bs-color-6) !important;
  border-bottom: 1px solid var(--nscde-bs-color-6) !important;
  margin: 0px !important;
}

.dialogBox {
  background-color: var(--nscde-bg-color-6) !important;
  color: var(--nscde-fg-color-6) !important;
  border-top: 1px solid var(--nscde-ts-color-1) !important;
  border-left: 1px solid var(--nscde-ts-color-1) !important;
  border-right: 1px solid var(--nscde-bs-color-1) !important;
  border-bottom: 1px solid var(--nscde-bs-color-1) !important;
  border-radius: 0px !important;
}

.dialogTitleBar button,
.dialogTitleBar {
  background-color: var(--nscde-bg-color-1) !important;
  color: var(--nscde-fg-color-1) !important;
  border-top: 1px solid var(--nscde-ts-color-1) !important;
  border-left: 1px solid var(--nscde-ts-color-1) !important;
  border-right: 1px solid var(--nscde-bs-color-1) !important;
  border-bottom: 1px solid var(--nscde-bs-color-1) !important;
  border-radius: 0px !important;
}

.dialogTitleBar button:is(:hover:active,[open="true"]):not([disabled="true"]) {
  background-color: var(--nscde-sel-color-1) !important;
  color: var(--nscde-fg-color-1) !important;
  border-top: 1px solid var(--nscde-bs-color-1) !important;
  border-left: 1px solid var(--nscde-bs-color-1) !important;
  border-right: 1px solid var(--nscde-ts-color-1) !important;
  border-bottom: 1px solid var(--nscde-ts-color-1) !important;
}

.toolbarbutton-1.msgHeaderView-button:not([type="menu-button"]) {
  background-color: var(--nscde-bg-color-5) !important;
  color: var(--nscde-fg-color-5) !important;
  border-top: 1px solid var(--nscde-ts-color-5) !important;
  border-left: 1px solid var(--nscde-ts-color-5) !important;
  border-right: 1px solid var(--nscde-bs-color-5) !important;
  border-bottom: 1px solid var(--nscde-bs-color-5) !important;
  border-radius: 0px !important;
}

.toolbarbutton-1.msgHeaderView-button:not([type="menu-button"]):active {
  background-color: var(--nscde-sel-color-5) !important;
  color: var(--nscde-fg-color-5) !important;
  border-top: 1px solid var(--nscde-bs-color-5) !important;
  border-left: 1px solid var(--nscde-bs-color-5) !important;
  border-right: 1px solid var(--nscde-ts-color-5) !important;
  border-bottom: 1px solid var(--nscde-ts-color-5) !important;
  border-radius: 0px !important;
}

#content {
  background-color: var(--nscde-bg-color-4) !important;
  color: var(--nscde-fg-color-4) !important;
}

window input[type="color"] {
  background-image: none !important;
  background-color: var(--nscde-bg-color-6) !important;
  color: var(--nscde-fg-color-5) !important;
  border-top: 1px solid var(--nscde-ts-color-6) !important;
  border-left: 1px solid var(--nscde-ts-color-6) !important;
  border-right: 1px solid var(--nscde-bs-color-6) !important;
  border-bottom: 1px solid var(--nscde-bs-color-6) !important;
  border-radius: 0px !important;
}

window input[type="color"]:active {
  background-color: var(--nscde-sel-color-6) !important;
  border-top: 1px solid var(--nscde-bs-color-6) !important;
  border-left: 1px solid var(--nscde-bs-color-6) !important;
  border-right: 1px solid var(--nscde-ts-color-6) !important;
  border-bottom: 1px solid var(--nscde-ts-color-6) !important;
}

.moz-txt-sig, .moz-signature {
  font-style: italic !important;
  font-size: 85% !important;
  opacity: 1.0 !important;
}

.moz-txt-sig > a, .moz-signature > a {
  font-style: italic !important;
  font-size: 85% !important;
  opacity: 1.0 !important;
}

@media (prefers-color-scheme: dark) {
  html {
    scrollbar-color: var(--nscde-bg-color-5) var(--nscde-sel-color-5) !important;
    scrollbar-width: 16px auto !important;
  }

  body {
    color: #000000;
    background-color: #fff7e9;
  }

  span[_moz_quote="true"] {
    color: #34462b;
  }

  a {
    color: #4500cf;
  }

  a:visited, a:active {
    color: #551a8b;
  }
}

@media (prefers-color-scheme: light) {
  html {
    scrollbar-color: var(--nscde-bg-color-5) var(--nscde-sel-color-5) !important;
    scrollbar-width: 16px auto !important;
  }

  body {
    color: #000000;
    background-color: #fff7e9;
  }

  span[_moz_quote="true"] {
    color: #34462b;
  }

  a {
    color: #4500cf;
  }

  a:visited, a:active {
    color: #551a8b;
  }
}

@-moz-document url-prefix(about:config) {
  td.cell-value > form > input[type="text"],
  td.cell-value > form > input[type="number"] {
    appearance: none !important;
    background-color: var(--nscde-bg-color-4) !important;
    color: var(--nscde-fg-color-4) !important;
  }

   #about-config-search {
     background-color: var(--nscde-bg-color-4) !important;
     color: var(--nscde-fg-color-4) !important;
     border-top: 1px solid var(--nscde-bs-color-5) !important;
     border-left: 1px solid var(--nscde-bs-color-5) !important;
     border-right: 1px solid var(--nscde-ts-color-5) !important;
     border-bottom: 1px solid var(--nscde-ts-color-5) !important;
     border-radius: 0px !important;
   }

   #about-config-search:focus {
     outline: 1px solid var(--nscde-bg-color-1) !important;
     outline-offset: 2px !important;
   }

   .config-background-wrapper {
     background-color: var(--nscde-bg-color-5) !important;
     color: var(--nscde-fg-color-5) !important;
     border-top: 1px solid var(--nscde-ts-color-5) !important;
     border-left: 1px solid var(--nscde-ts-color-5) !important;
     border-right: 1px solid var(--nscde-bs-color-5) !important;
     border-bottom: 1px solid var(--nscde-bs-color-5) !important;
     border-radius: 0px !important;
   }

   .config-background {
     background-color: var(--nscde-sel-color-5) !important;
     color: var(--nscde-fg-color-5) !important;
     border-top: 1px solid var(--nscde-bs-color-5) !important;
     border-left: 1px solid var(--nscde-bs-color-5) !important;
     border-right: 1px solid var(--nscde-ts-color-5) !important;
     border-bottom: 1px solid var(--nscde-ts-color-5) !important;
     border-radius: 0px !important;
   }

   #show-all {
     background-color: var(--nscde-bg-color-5) !important;
     color: var(--nscde-fg-color-5) !important;
     border-top: 1px solid var(--nscde-ts-color-5) !important;
     border-left: 1px solid var(--nscde-ts-color-5) !important;
     border-right: 1px solid var(--nscde-bs-color-5) !important;
     border-bottom: 1px solid var(--nscde-bs-color-5) !important;
     border-radius: 0px !important;
   }

   #show-all:active {
     background-color: var(--nscde-sel-color-5) !important;
     color: var(--nscde-fg-color-5) !important;
     border-top: 1px solid var(--nscde-bs-color-5) !important;
     border-left: 1px solid var(--nscde-bs-color-5) !important;
     border-right: 1px solid var(--nscde-ts-color-5) !important;
     border-bottom: 1px solid var(--nscde-ts-color-5) !important;
     border-radius: 0px !important;
   }

   #show-all:focus {
     outline: 1px solid var(--nscde-bg-color-1) !important;
     outline-offset: 2px !important;
   }
}

#toolbar {
  background-color: var(--nscde-bg-color-5) !important;
  color: var(--nscde-fg-color-5) !important;
}

input[type="checkbox"] {
  background-color: var(--nscde-bg-color-5) !important;
  color: var(--nscde-fg-color-5) !important;
  border-top: 1px solid var(--nscde-ts-color-5) !important;
  border-left: 1px solid var(--nscde-ts-color-5) !important;
  border-right: 1px solid var(--nscde-bs-color-5) !important;
  border-bottom: 1px solid var(--nscde-bs-color-5) !important;
  border-radius: 0px !important;
}

input[type="checkbox"]:checked {
  background-color: var(--nscde-sel-color-5) !important;
  color: var(--nscde-fg-color-5) !important;
  border-top: 1px solid var(--nscde-bs-color-5) !important;
  border-left: 1px solid var(--nscde-bs-color-5) !important;
  border-right: 1px solid var(--nscde-ts-color-5) !important;
  border-bottom: 1px solid var(--nscde-ts-color-5) !important;
  border-radius: 0px !important;
}

button {
  border-width: 1px !important;
  background-color: var(--nscde-bg-color-5) !important;
  color: var(--nscde-fg-color-5) !important;
  border-left-color: var(--nscde-ts-color-5) !important;
  border-right-color: var(--nscde-bs-color-5) !important;
  border-top-color: var(--nscde-ts-color-5) !important;
  border-bottom-color: var(--nscde-bs-color-5) !important;
  border-radius: 0px !important;
}

button:-moz-any(:hover:active,[open="true"]):not([disabled="true"]) {
  border-width: 1px !important;
  background-color: var(--nscde-sel-color-5) !important;
  border-right-color: var(--nscde-ts-color-5) !important;
  border-left-color: var(--nscde-bs-color-5) !important;
  border-bottom-color: var(--nscde-ts-color-5) !important;
  border-top-color: var(--nscde-bs-color-5) !important;
}

button[default]:not(:focus-visible) {
  outline: 1px solid var(--nscde-bg-color-1) !important;
  outline-offset: 2px !important;
}

#prefs {
  background-color: var(--nscde-sel-color-5) !important;
  color: var(--nscde-fg-color-5) !important;
  border-right-color: var(--nscde-ts-color-5) !important;
  border-left-color: var(--nscde-bs-color-5) !important;
  border-bottom-color: var(--nscde-ts-color-5) !important;
  border-top-color: var(--nscde-bs-color-5) !important;
}

.table-shown {
  background-color: var(--nscde-bg-color-5) !important;
  color: var(--nscde-fg-color-5) !important;
  border-right-color: var(--nscde-ts-color-5) !important;
  border-left-color: var(--nscde-bs-color-5) !important;
  border-bottom-color: var(--nscde-ts-color-5) !important;
  border-top-color: var(--nscde-bs-color-5) !important;
}

@-moz-document url-prefix(about:downloads) {
  :root {
    --in-content-focus-outline-color: var(--nscde-bg-color-1) !important;
    --toolbar-bgcolor: var(--nscde-bg-color-5) !important;
  }

  body {
    background-color: var(--nscde-bg-color-5) !important;
    color: var(--nscde-fg-color-5) !important;
  }

  richlistbox {
    background-color: var(--nscde-bg-color-4) !important;
    color: var(--nscde-fg-color-4) !important;
    border-top: 1px solid var(--nscde-bs-color-5) !important;
    border-left: 1px solid var(--nscde-bs-color-5) !important;
    border-right: 1px solid var(--nscde-ts-color-5) !important;
    border-bottom: 1px solid var(--nscde-ts-color-5) !important;
    border-radius: 0px !important;
  }

  richlistitem {
    background-color: var(--nscde-bg-color-5) !important;
    color: var(--nscde-fg-color-5) !important;
    border-top: 1px solid var(--nscde-ts-color-5) !important;
    border-left: 1px solid var(--nscde-ts-color-5) !important;
    border-right: 1px solid var(--nscde-bs-color-5) !important;
    border-bottom: 1px solid var(--nscde-bs-color-5) !important;
    border-radius: 0px !important;
    margin: 8px !important;
  }

  richlistitem[current="true"] {
    background-color: var(--nscde-sel-color-5) !important;
    color: var(--nscde-fg-color-5) !important;
    border-top: 1px solid var(--nscde-bs-color-5) !important;
    border-left: 1px solid var(--nscde-bs-color-5) !important;
    border-right: 1px solid var(--nscde-ts-color-5) !important;
    border-bottom: 1px solid var(--nscde-ts-color-5) !important;
    border-radius: 0px !important;
    margin: 8px !important;
    outline: none !important;
  }

  .downloadButton > .button-box > .button-icon {
     list-style-image: url("nsicons/Filepicker.png") !important;
     -moz-image-region: rect(0px, 24px, 24px, 0px) !important;
     max-width: 48px;
  }

  .downloadButton:hover > .button-box > .button-icon {
    list-style-image: url("nsicons/Filepicker.png") !important;
    -moz-image-region: rect(24px, 24px, 48px, 0px) !important;
    max-width: 48px;
  }

  .downloadButton:hover > .button-box {
    background-color: var(--nscde-bg-color-5) !important;
    border-radius: 0px !important;
    outline: 1px solid var(--nscde-bg-color-1) !important;
    outline-offset: 4px !important;
  }

  .downloadButton:hover:active > .button-box {
    background-color: var(--nscde-bg-color-5) !important;
  }

  #searchBox {
    background-color: var(--nscde-bg-color-4) !important;
    color: var(--nscde-fg-color-4) !important;
    border-top: 1px solid var(--nscde-bs-color-5) !important;
    border-left: 1px solid var(--nscde-bs-color-5) !important;
    border-right: 1px solid var(--nscde-ts-color-5) !important;
    border-bottom: 1px solid var(--nscde-ts-color-5) !important;
    border-radius: 0px !important;
  }

  #searchBox:is(:active, :open, :focus, :focus-visible, [checked], [selected="true"]) {
    outline: 1px solid var(--nscde-bg-color-1) !important;
    outline-offset: 2px !important;
  }
}

/* 100+ */
vbox #containerBox,
body > #containerBox {
  background-color: var(--nscde-bg-color-5) !important;
  color: var(--nscde-fg-color-5) !important;
  border-right-color: var(--nscde-ts-color-5) !important;
  border-left-color: var(--nscde-bs-color-5) !important;
  border-bottom-color: var(--nscde-ts-color-5) !important;
  border-top-color: var(--nscde-bs-color-5) !important;
}

body > #containerBox .radio-check,
body > #containerBox .checkbox-check {
  background-color: var(--nscde-bg-color-5) !important;
  color: var(--nscde-fg-color-5) !important;
  border-top: 1px solid var(--nscde-ts-color-5) !important;
  border-left: 1px solid var(--nscde-ts-color-5) !important;
  border-right: 1px solid var(--nscde-bs-color-5) !important;
  border-bottom: 1px solid var(--nscde-bs-color-5) !important;
}

body > #containerBox .radio-check[selected],
body > #containerBox .checkbox-check[checked] {
  background-color: var(--nscde-sel-color-5) !important;
  color: var(--nscde-fg-color-5) !important;
  border-top: 1px solid var(--nscde-bs-color-5) !important;
  border-left: 1px solid var(--nscde-bs-color-5) !important;
  border-right: 1px solid var(--nscde-ts-color-5) !important;
  border-bottom: 1px solid var(--nscde-ts-color-5) !important;
  fill: var(--nscde-fg-color-5) !important;
  outline: var(--nscde-bg-color-1) !important;
}

body > #containerBox .radio-check {
  border-radius: 100px !important;
}

body > #containerBox .checkbox-check,
body > #containerBox .checkbox-check[checked] {
  border-radius: 0px !important;
}

body > #containerBox menupopup menuitem {
  background-color: var(--nscde-bg-color-6) !important;
  color: var(--nscde-fg-color-6) !important;
}

body > #containerBox menupopup menuitem:is(:active, :checked, [selected="true"], [open="true"]) {
  background-color: var(--nscde-sel-color-6) !important;
  color: var(--nscde-fg-color-6) !important;
  margin-left: -2px !important;
}

menulist > menupopup > menuitem:is(:active, :checked, [selected="true"], [open="true"]) {
  border-top: 1px solid var(--nscde-bs-color-6) !important;
  border-left: 1px solid var(--nscde-bs-color-6) !important;
  border-right: 1px solid var(--nscde-ts-color-6) !important;
  border-bottom: 1px solid var(--nscde-ts-color-6) !important;
  margin-left: -2px !important;
}

menulist > menupopup {
  color: var(--nscde-fg-color-6) !important;
  background-color: var(--nscde-bg-color-6) !important;
  border-top: 1px solid var(--nscde-ts-color-6) !important;
  border-left: 1px solid var(--nscde-ts-color-6) !important;
  border-right: 1px solid var(--nscde-bs-color-6) !important;
  border-bottom: 1px solid var(--nscde-bs-color-6) !important;
  border-radius: 0px !important;
  box-shadow: none !important;
  --panel-border-color: var(--nscde-bg-color-6) !important;
  --panel-background: var(--nscde-bg-color-6) !important;
  --panel-border-radius: 0px !important;
  margin-left: 0px !important;
  margin-top: 0px !important;
}

menupopup menu {
  margin: 1px !important;
}

menulist > menupopup menupopup > menu {
  margin: 0px !important;
}

menupopup menu:not([disabled="true"])[_moz-menuactive="true"] {
  background-color: var(--nscde-sel-color-6) !important;
  color: var(--nscde-fg-color-6) !important;
  border-top: 1px solid var(--nscde-bs-color-6) !important;
  border-left: 1px solid var(--nscde-bs-color-6) !important;
  border-right: 1px solid var(--nscde-ts-color-6) !important;
  border-bottom: 1px solid var(--nscde-ts-color-6) !important;
  border-radius: 0px !important;
  margin: 0px !important;
}

:is(panel, menupopup) {
  --panel-border-color: var(--nscde-bg-color-6) !important;
  --panel-background: var(--nscde-bg-color-6) !important;
}

menulist > menupopup menupopup > menu,
menulist > menupopup menupopup > menuitem {
  background-color: var(--nscde-bg-color-6) !important;
  color: var(--nscde-fg-color-6) !important;
}

menulist > menupopup menupopup > menu:not([disabled="true"])[_moz-menuactive="true"],
menulist > menupopup menupopup > menuitem:not([disabled="true"])[_moz-menuactive="true"] {
  background-color: var(--nscde-sel-color-6) !important;
  color: var(--nscde-fg-color-6) !important;
  border-top: 1px solid var(--nscde-bs-color-6) !important;
  border-left: 1px solid var(--nscde-bs-color-6) !important;
  border-right: 1px solid var(--nscde-ts-color-6) !important;
  border-bottom: 1px solid var(--nscde-ts-color-6) !important;
}

#accountActionsDropdown > menuseparator,
menulist > menupopup menupopup menuseparator {
  border-top: 1px solid var(--nscde-bs-color-6) !important;
  border-bottom: 1px solid var(--nscde-ts-color-6) !important;
}

.panel-arrowcontainer .menupopup-arrowscrollbox,
.menupopup-arrowscrollbox,
.panel-arrowbox+slot {
  box-shadow: none !important;
  margin: 0px !important;
}

body > #containerBox menulist {
  background-color: var(--nscde-bg-color-6) !important;
  color: var(--nscde-fg-color-6) !important;
  border-top: 1px solid var(--nscde-ts-color-6) !important;
  border-left: 1px solid var(--nscde-ts-color-6) !important;
  border-right: 1px solid var(--nscde-bs-color-6) !important;
  border-bottom: 1px solid var(--nscde-bs-color-6) !important;
  border-radius: 0px !important;
}

#accounttree li > div {
  display: flex;
  align-items: center;
  -moz-context-properties: fill;
  margin-inline: 6px;
  background-color: var(--nscde-sel-color-5) !important;
  color: var(--nscde-fg-color-5) !important;
  border-radius: 0px !important;
  border: var(--nscde-bg-color-5) !important;
  fill: currentColor;
  cursor: default;
}

#accounttree li.selected > div {
  background-color: var(--nscde-sel-color-5) !important;
  color: var(--nscde-fg-color-5) !important;
  border: 1px solid var(--nscde-bg-color-1) !important;
  font-weight: bold !important;
}

#editVCardDialog vcard-edit {
  color: var(--nscde-fg-color-6) !important;
  background-color: var(--nscde-bg-color-6) !important;
}

#editVCardDialog vcard-edit select:not([size], [multiple]) {
  color: var(--nscde-fg-color-6) !important;
  background-color: var(--nscde-bg-color-6) !important;
  border-top: 1px solid var(--nscde-ts-color-6) !important;
  border-left: 1px solid var(--nscde-ts-color-6) !important;
  border-right: 1px solid var(--nscde-bs-color-6) !important;
  border-bottom: 1px solid var(--nscde-bs-color-6) !important;
  border-radius: 0px !important;
}

#editVCardDialog vcard-edit select:is(:active, [open="true"]):not([size], [multiple]) {
  background-color: var(--nscde-sel-color-6) !important;
  border-top: 1px solid var(--nscde-bs-color-6) !important;
  border-left: 1px solid var(--nscde-bs-color-6) !important;
  border-right: 1px solid var(--nscde-ts-color-6) !important;
  border-bottom: 1px solid var(--nscde-ts-color-6) !important;
}

#editVCardDialog .dialog-menu-container button,
#editVCardDialog .dialog-menu-container,
#editVCardDialog .addr-book-edit-fieldset-button {
  background-color: var(--nscde-bg-color-6) !important;
  color: var(--nscde-fg-color-6) !important;
}

#editVCardDialog .dialog-menu-container button {
  border-top: 1px solid var(--nscde-ts-color-6) !important;
  border-left: 1px solid var(--nscde-ts-color-6) !important;
  border-right: 1px solid var(--nscde-bs-color-6) !important;
  border-bottom: 1px solid var(--nscde-bs-color-6) !important;
}

#editVCardDialog .dialog-menu-container button:is(:active,[open="true"]):not([disabled="true"]) {
  background-color: var(--nscde-sel-color-6) !important;
  border-top: 1px solid var(--nscde-bs-color-6) !important;
  border-left: 1px solid var(--nscde-bs-color-6) !important;
  border-right: 1px solid var(--nscde-ts-color-6) !important;
  border-bottom: 1px solid var(--nscde-ts-color-6) !important;
}

#editVCardDialog .n-list-component button img,
#editVCardDialog .n-list-component button {
  background-color: var(--nscde-bg-color-6) !important;
  color: var(--nscde-fg-color-6) !important;
}

#editVCardDialog .n-list-component button {
  border-top: 1px solid var(--nscde-ts-color-6) !important;
  border-left: 1px solid var(--nscde-ts-color-6) !important;
  border-right: 1px solid var(--nscde-bs-color-6) !important;
  border-bottom: 1px solid var(--nscde-bs-color-6) !important;
}

#editVCardDialog .n-list-component button:is(:active,[open="true"]):not([disabled="true"]) {
  background-color: var(--nscde-sel-color-6) !important;
  border-top: 1px solid var(--nscde-bs-color-6) !important;
  border-left: 1px solid var(--nscde-bs-color-6) !important;
  border-right: 1px solid var(--nscde-ts-color-6) !important;
  border-bottom: 1px solid var(--nscde-ts-color-6) !important;
}

#editVCardDialog .addr-book-edit-fieldset-button::before {
  background-color: var(--nscde-bg-color-6) !important;
  color: var(--nscde-fg-color-6) !important;
  fill: var(--nscde-fg-color-6) !important;
  border-radius: 0px !important;
  border-top: 1px solid var(--nscde-ts-color-6) !important;
  border-left: 1px solid var(--nscde-ts-color-6) !important;
  border-right: 1px solid var(--nscde-bs-color-6) !important;
  border-bottom: 1px solid var(--nscde-bs-color-6) !important;
}

#editVCardDialog .addr-book-edit-fieldset-button:is(:active,[open="true"]):not([disabled="true"])::before {
  background-color: var(--nscde-sel-color-6) !important;
  border-top: 1px solid var(--nscde-bs-color-6) !important;
  border-left: 1px solid var(--nscde-bs-color-6) !important;
  border-right: 1px solid var(--nscde-ts-color-6) !important;
  border-bottom: 1px solid var(--nscde-ts-color-6) !important;
}

/* This doesnt work because it is overriden with important at contextMenu.css */
#ContentSelectDropdown .ContentSelectDropdown-item-0:not([_moz-menuactive="true"]) {
  border-radius: 0px !important;
  background-color: var(--nscde-bg-color-6) !important;
  color: var(--nscde-fg-color-6) !important;
}

@-moz-document url-prefix(about:accountsettings) {
  window {
    background-color: var(--nscde-bg-color-5) !important;
    color: var(--nscde-fg-color-5) !important;
    border-top: 1px solid var(--nscde-ts-color-5) !important;
    border-left: 1px solid var(--nscde-ts-color-5) !important;
    border-right: 1px solid var(--nscde-bs-color-5) !important;
    border-bottom: 1px solid var(--nscde-bs-color-5) !important;
  }

  #accountTreeBox {
    background-image: none !important;
    background-color: var(--nscde-sel-color-5) !important;
    color: var(--nscde-fg-color-5) !important;
    border-right: 1px solid var(--nscde-bs-color-5) !important;
  }

  .sidebar-footer-link {
    margin-right: 8px !important;
    border-radius: 0px !important;
  }

  .sidebar-footer-link {
    background-color: var(--nscde-bg-color-5) !important;
    color: var(--nscde-fg-color-5) !important;
    border-top: 1px solid var(--nscde-ts-color-5) !important;
    border-left: 1px solid var(--nscde-ts-color-5) !important;
    border-right: 1px solid var(--nscde-bs-color-5) !important;
    border-bottom: 1px solid var(--nscde-bs-color-5) !important;
  }

  .sidebar-footer-link:is(:active, [selected]) {
    background-color: var(--nscde-sel-color-5) !important;
    color: var(--nscde-fg-color-5) !important;
    border-top: 1px solid var(--nscde-bs-color-5) !important;
    border-left: 1px solid var(--nscde-bs-color-5) !important;
    border-right: 1px solid var(--nscde-ts-color-5) !important;
    border-bottom: 1px solid var(--nscde-ts-color-5) !important;
  }
}

/* XXX This needs to be in some about: url-prefix */
input:is([type="email"], [type="tel"], [type="text"], [type="password"], [type="url"], [type="number"]),
textarea {
  background-color: var(--nscde-bg-color-4) !important;
  color: var(--nscde-fg-color-4) !important;
  border-top: 1px solid var(--nscde-bs-color-5) !important;
  border-left: 1px solid var(--nscde-bs-color-5) !important;
  border-right: 1px solid var(--nscde-ts-color-5) !important;
  border-bottom: 1px solid var(--nscde-ts-color-5) !important;
  border-radius: 0px !important;
}

input:is([type="email"], [type="tel"], [type="text"], [type="password"], [type="url"], [type="number"]):focus,
textarea:focus {
  outline: 1px solid var(--nscde-bg-color-1) !important;
  outline-offset: 1px !important;
}

/* Title in about:accountsettings is for some reason outside about. */
.dialogheader-title {
  background-color: var(--nscde-bg-color-5) !important;
  color: var(--nscde-fg-color-5) !important;
}

window > vbox {
  background-color: var(--nscde-bg-color-5) !important;
  color: var(--nscde-fg-color-5) !important;
}

window > vbox .radio-check,
window > vbox .checkbox-check {
  background-color: var(--nscde-bg-color-5) !important;
  color: var(--nscde-fg-color-5) !important;
  border-top: 1px solid var(--nscde-ts-color-5) !important;
  border-left: 1px solid var(--nscde-ts-color-5) !important;
  border-right: 1px solid var(--nscde-bs-color-5) !important;
  border-bottom: 1px solid var(--nscde-bs-color-5) !important;
  border-radius: 0px !important;
}

window > vbox .radio-check[selected],
window > vbox .checkbox-check[checked] {
  background-color: var(--nscde-sel-color-5) !important;
  color: var(--nscde-fg-color-5) !important;
  border-top: 1px solid var(--nscde-bs-color-5) !important;
  border-left: 1px solid var(--nscde-bs-color-5) !important;
  border-right: 1px solid var(--nscde-ts-color-5) !important;
  border-bottom: 1px solid var(--nscde-ts-color-5) !important;
  border-radius: 0px !important;
}

/* This five needs to be out of about:addons on Thunerbird 7.X for some reason. */
#sidebar {
  background-color: var(--nscde-bg-color-5) !important;
  color: var(--nscde-fg-color-5) !important;
  border-right: 1px solid var(--nscde-bs-color-5) !important;
}

.addon.card {
  background-color: var(--nscde-sel-color-5) !important;
  color: var(--nscde-fg-color-5) !important;
  border-top: 1px solid var(--nscde-bs-color-5) !important;
  border-left: 1px solid var(--nscde-bs-color-5) !important;
  border-right: 1px solid var(--nscde-ts-color-5) !important;
  border-bottom: 1px solid var(--nscde-ts-color-5) !important;
  border-radius: 0px !important;
}

.addon.card:hover {
  box-shadow: none !important;
}

.sidebar-footer-link,
*#categories > *.category {
  background-color: var(--nscde-bg-color-5) !important;
  color: var(--nscde-fg-color-5) !important;
  border-top: 1px solid var(--nscde-ts-color-5) !important;
  border-left: 1px solid var(--nscde-ts-color-5) !important;
  border-right: 1px solid var(--nscde-bs-color-5) !important;
  border-bottom: 1px solid var(--nscde-bs-color-5) !important;
}

.sidebar-footer-link:is(:active, [selected]),
*#categories > *.category:is(:active, [selected]) {
  background-color: var(--nscde-sel-color-5) !important;
  color: var(--nscde-fg-color-5) !important;
  border-top: 1px solid var(--nscde-bs-color-5) !important;
  border-left: 1px solid var(--nscde-bs-color-5) !important;
  border-right: 1px solid var(--nscde-ts-color-5) !important;
  border-bottom: 1px solid var(--nscde-ts-color-5) !important;
}

search-textbox[focused] {
  outline: 2px solid var(--nscde-bg-color-1) !important;
  outline-offset: 2px !important;
}

@-moz-document url-prefix(about:addons) {
  :root {
    --in-content-box-background: var(--nscde-bg-color-6) !important;
    --in-content-focus-outline-color: var(--nscde-bg-color-1) !important;
  }

  .header-name,
  body {
      background-color: var(--nscde-bg-color-5) !important;
      color: var(--nscde-fg-color-5) !important;
      border-right-color: var(--nscde-ts-color-5) !important;
      border-left-color: var(--nscde-bs-color-5) !important;
      border-bottom-color: var(--nscde-ts-color-5) !important;
      border-top-color: var(--nscde-bs-color-5) !important;
  }

  search-addons > search-textbox {
    border-top: 1px solid var(--nscde-bs-color-5) !important;
    border-left: 1px solid var(--nscde-bs-color-5) !important;
    border-right: 1px solid var(--nscde-ts-color-5) !important;
    border-bottom: 1px solid var(--nscde-ts-color-5) !important;
    background-color: var(--nscde-bg-color-4) !important;
    color: var(--nscde-fg-color-4) !important;
    border-radius: 0px !important;
  }

  search-addons > search-textbox:focus {
    outline: 2px solid var(--nscde-bg-color-1) !important;
    outline-offset: 2px !important;
  }

  input,
  textarea {
    background-color: var(--nscde-bg-color-4) !important;
    color: var(--nscde-fg-color-4) !important;
    border-right-color: var(--nscde-ts-color-4) !important;
    border-left-color: var(--nscde-bs-color-4) !important;
    border-bottom-color: var(--nscde-ts-color-4) !important;
    border-top-color: var(--nscde-bs-color-4) !important;
  }

  .main-search, .sticky-container, .main-heading {
      background-color: var(--nscde-bg-color-5) !important;
      color: var(--nscde-fg-color-5) !important;
  }

  #categories > .category {
    margin-right: 10px !important;
    margin-left: 10px !important;
  }

  #sidebar {
    border-right: 1px solid var(--nscde-bs-color-5) !important;
  }

  .sidebar-footer-link {
    margin-right: 8px !important;
    border-radius: 0px !important;
  }

  .sidebar-footer-link,
  *#categories > *.category {
    background-color: var(--nscde-bg-color-5) !important;
    color: var(--nscde-fg-color-5) !important;
    border-top: 1px solid var(--nscde-ts-color-5) !important;
    border-left: 1px solid var(--nscde-ts-color-5) !important;
    border-right: 1px solid var(--nscde-bs-color-5) !important;
    border-bottom: 1px solid var(--nscde-bs-color-5) !important;
  }

  .addon.card,
  .sidebar-footer-link:is(:active, [selected]),
  *#categories > *.category:is(:active, [selected]) {
    background-color: var(--nscde-sel-color-5) !important;
    color: var(--nscde-fg-color-5) !important;
    border-top: 1px solid var(--nscde-bs-color-5) !important;
    border-left: 1px solid var(--nscde-bs-color-5) !important;
    border-right: 1px solid var(--nscde-ts-color-5) !important;
    border-bottom: 1px solid var(--nscde-ts-color-5) !important;
  }

  .addon.card {
    border-radius: 0px !important;
  }

  .addon-name-link, .addon-name, .addon-detail-row {
    background-color: var(--nscde-sel-color-5) !important;
    color: var(--nscde-fg-color-5) !important;
  }

  #content {
    background-color: var(--nscde-bg-color-5) !important;
    color: var(--nscde-fg-color-5) !important;
  }

  panel-list,
  #page-options > * {
    background-color: var(--nscde-bg-color-6) !important;
    color: var(--nscde-fg-color-6) !important;
    border-top: 1px solid var(--nscde-ts-color-6) !important;
    border-left: 1px solid var(--nscde-ts-color-6) !important;
    border-right: 1px solid var(--nscde-bs-color-6) !important;
    border-bottom: 1px solid var(--nscde-bs-color-6) !important;
    border-radius: 0px !important;
  }
}

@-moz-document url-prefix(about:preferences) {
  :root {
    --in-content-page-background: var(--nscde-bg-color-5) !important;
    --in-content-page-color: var(--nscde-fg-color-5) !important;
    --in-content-primary-button-text-color: var(--nscde-fg-color-1) !important;
    --in-content-primary-button-background: var(--nscde-bg-color-1) !important;
    --in-content-focus-outline-color: var(--nscde-bg-color-1) !important;
    --in-content-border-active: transparent !important;
    --in-content-border-active-shadow: transparent !important;
  }

  #pref-category-box {
    background-color: var(--nscde-bg-color-5) !important;
    color: var(--nscde-fg-color-5) !important;
    border-right: 1px solid var(--nscde-bs-color-5) !important;
  }

  .header-name,
  body {
    color: var(--nscde-fg-color-5) !important;
    background-color: var(--nscde-bg-color-5) !important;
  }

  #categories > .category {
    margin-right: 10px !important;
    margin-left: 10px !important;
  }

  richlistbox:not(#categories) {
    background-color: var(--nscde-bg-color-4) !important;
    color: var(--nscde-fg-color-4) !important;
    border-left-color: var(--nscde-bs-color-6) !important;
    border-right-color: var(--nscde-ts-color-6) !important;
    border-top-color: var(--nscde-bs-color-6) !important;
    border-bottom-color: var(--nscde-ts-color-6) !important;
    border-radius: 0px !important;
  }

  .reload-tabs-button .button-icon,
  .reload-tabs-button .button-text,
  button {
    background-color: var(--nscde-bg-color-5) !important;
    color: var(--nscde-fg-color-5) !important;
    border-right-color: var(--nscde-bs-color-5) !important;
    border-left-color: var(--nscde-ts-color-5) !important;
    border-bottom-color: var(--nscde-bs-color-5) !important;
    border-top-color: var(--nscde-ts-color-5) !important;
    border-radius: 0px !important;
    font-weight: normal !important;
  }

  search-textbox,
  button:is(:active,[open="true"]):not([disabled="true"]) {
    background-color: var(--nscde-sel-color-5) !important;
    color: var(--nscde-fg-color-5) !important;
    border-right-color: var(--nscde-ts-color-5) !important;
    border-left-color: var(--nscde-bs-color-5) !important;
    border-bottom-color: var(--nscde-ts-color-5) !important;
    border-top-color: var(--nscde-bs-color-5) !important;
  }

  input,
  textarea {
    background-color: var(--nscde-bg-color-4) !important;
    color: var(--nscde-fg-color-4) !important;
    border-right-color: var(--nscde-ts-color-4) !important;
    border-left-color: var(--nscde-bs-color-4) !important;
    border-bottom-color: var(--nscde-ts-color-4) !important;
    border-top-color: var(--nscde-bs-color-4) !important;
  }

  treecol {
    background-color: var(--nscde-bg-color-5) !important;
    font-weight: bold !important;
    color: var(--nscde-fg-color-5) !important;
    border-top: 1px solid var(--nscde-ts-color-5) !important;
    border-left: 1px solid var(--nscde-ts-color-5) !important;
    border-right: 1px solid var(--nscde-bs-color-5) !important;
    border-bottom: 1px solid var(--nscde-bs-color-5) !important;
  }

  treechildren {
    background-color: var(--nscde-sel-color-5) !important;
    color: var(--nscde-fg-color-5) !important;
  }

  treechildren,
  treecol {
    border-width: 1px !important;
    border-left-color: var(--nscde-ts-color-4) !important;
    border-right-color: var(--nscde-bs-color-4) !important;
    border-top-color: var(--nscde-ts-color-4) !important;
    border-bottom-color: var(--nscde-bs-color-4) !important;
  }

  .sidebar-footer-link, .sidebar-footer-button > .text-link {
    background-color: var(--nscde-bg-color-5) !important;
    color: var(--nscde-fg-color-5) !important;
    border-top: 1px solid var(--nscde-ts-color-5) !important;
    border-left: 1px solid var(--nscde-ts-color-5) !important;
    border-right: 1px solid var(--nscde-bs-color-5) !important;
    border-bottom: 1px solid var(--nscde-bs-color-5) !important;
    border-radius: 0px !important;
  }

  #searchInput {
    background-color: var(--nscde-bg-color-4) !important;
    color: var(--nscde-fg-color-4) !important;
    border-radius: 0px !important;
  }

  .sidebar-footer-link:active, .sidebar-footer-button:active > .text-link {
    background-color: var(--nscde-sel-color-5) !important;
    color: var(--nscde-fg-color-5) !important;
    border-top: 1px solid var(--nscde-bs-color-5) !important;
    border-left: 1px solid var(--nscde-bs-color-5) !important;
    border-right: 1px solid var(--nscde-ts-color-5) !important;
    border-bottom: 1px solid var(--nscde-ts-color-5) !important;
  }

  .sidebar-footer-link {
    margin-right: 10px !important;
  }

  menupopup, menulist, menuseparator {
    -moz-appearance: none !important;
    --panel-border-color: var(--nscde-bg-color-6) !important;
    background-color: var(--nscde-bg-color-6) !important;
    color: var(--nscde-fg-color-6) !important;
    border-top: 1px solid var(--nscde-ts-color-6) !important;
    border-left: 1px solid var(--nscde-ts-color-6) !important;
    border-right: 1px solid var(--nscde-bs-color-6) !important;
    border-bottom: 1px solid var(--nscde-bs-color-6) !important;
    border-radius: 0px !important;
    font-weight: normal !important;
  }

  menuitem {
    border-width: 1px !important;
    -moz-appearance: none !important;
    background-color: var(--nscde-bg-color-6) !important;
    color: var(--nscde-fg-color-6) !important;
  }

  menupopup:active, menuitem:active {
    border-width: 1px !important;
    -moz-appearance: none !important;
    background-color: var(--nscde-sel-color-6) !important;
    color: var(--nscde-fg-color-6) !important;
    border-top: 1px solid var(--nscde-bs-color-6) !important;
    border-left: 1px solid var(--nscde-bs-color-6) !important;
    border-right: 1px solid var(--nscde-ts-color-6) !important;
    border-bottom: 1px solid var(--nscde-ts-color-6) !important;
  }

  .dialogClose,
  .dialogTitleBar {
      background-color: var(--nscde-bg-color-1) !important;
      color: var(--nscde-fg-color-1) !important;
      border-width: 1px !important;
      border-top: 1px solid var(--nscde-ts-color-1) !important;
      border-left: 1px solid var(--nscde-ts-color-1) !important;
      border-right: 1px solid var(--nscde-bs-color-1) !important;
      border-bottom: 1px solid var(--nscde-bs-color-1) !important;
      border-radius: 0px !important;
  }

  .dialogClose[checked="true"],
  .dialogClose:active {
      background-color: var(--nscde-bg-color-1) !important;
      color: var(--nscde-fg-color-1) !important;
      border-top: 1px solid var(--nscde-bs-color-1) !important;
      border-left: 1px solid var(--nscde-bs-color-1) !important;
      border-right: 1px solid var(--nscde-ts-color-1) !important;
      border-bottom: 1px solid var(--nscde-ts-color-1) !important;
      border-radius: 0px !important;
  }

  .dialogBox {
      background-color: var(--nscde-bg-color-6) !important;
      color: var(--nscde-fg-color-6) !important;
      border-top: 1px solid var(--nscde-ts-color-6) !important;
      border-left: 1px solid var(--nscde-ts-color-6) !important;
      border-right: 1px solid var(--nscde-bs-color-6) !important;
      border-bottom: 1px solid var(--nscde-bs-color-6) !important;
      border-radius: 0px !important;
  }

  input[type="radio"],
  input[type="checkbox"],
  .radio-check,
  .checkbox-check {
      background-color: var(--nscde-bg-color-5) !important;
      color: var(--nscde-fg-color-5) !important;
      border-top: 1px solid var(--nscde-ts-color-5) !important;
      border-left: 1px solid var(--nscde-ts-color-5) !important;
      border-right: 1px solid var(--nscde-bs-color-5) !important;
      border-bottom: 1px solid var(--nscde-bs-color-5) !important;
      border-radius: 0px !important;
  }

  input[type="radio"]:checked,
  input[type="checkbox"]:checked,
  .radio-check[selected],
  .checkbox-check[checked="true"] {
      background-color: var(--nscde-sel-color-5) !important;
      color: var(--nscde-fg-color-5) !important;
      border-top: 1px solid var(--nscde-bs-color-5) !important;
      border-left: 1px solid var(--nscde-bs-color-5) !important;
      border-right: 1px solid var(--nscde-ts-color-5) !important;
      border-bottom: 1px solid var(--nscde-ts-color-5) !important;
      border-radius: 0px !important;
  }

  #handlersView {
      background-color: var(--nscde-bg-color-4) !important;
      color: var(--nscde-fg-color-4) !important;
      border-top: 1px solid var(--nscde-bs-color-5) !important;
      border-left: 1px solid var(--nscde-bs-color-5) !important;
      border-right: 1px solid var(--nscde-ts-color-5) !important;
      border-bottom: 1px solid var(--nscde-ts-color-5) !important;
  }

  .info-panel, .extension-controlled {
      background-color: var(--nscde-sel-color-5) !important;
      color: var(--nscde-fg-color-5) !important;
      border-top: 1px solid var(--nscde-bs-color-5) !important;
      border-left: 1px solid var(--nscde-bs-color-5) !important;
      border-right: 1px solid var(--nscde-ts-color-5) !important;
      border-bottom: 1px solid var(--nscde-ts-color-5) !important;
  }

  #categories .category-name {
    background-color: inherit !important;
    color: inherit !important;
    text-align: center !important;
  }
  #categories .category-icon {
    display: none !important;
  }

  #categories > .category:hover,
  #categories > .category {
    background-color: var(--nscde-bg-color-5) !important;
    color: var(--nscde-fg-color-5) !important;
    fill: var(--nscde-fg-color-5) !important;
    border-left: 1px solid var(--nscde-ts-color-5) !important;
    border-top: 1px solid var(--nscde-ts-color-5) !important;
    border-right: 1px solid var(--nscde-bs-color-5) !important;
    border-bottom: 1px solid var(--nscde-bs-color-5) !important;
    border-radius: 0px !important;
  }

  #categories > .category:is(:active, :focus, [selected]) .category-icon {
    background-color: var(--nscde-sel-color-5) !important;
    color: var(--nscde-fg-color-5) !important;
    fill: var(--nscde-fg-color-5) !important;
  }

  #categories > .category:is(:active, :focus, [selected]) {
    background-color: var(--nscde-sel-color-5) !important;
    color: var(--nscde-fg-color-5) !important;
    border-left: 1px solid var(--nscde-bs-color-5) !important;
    border-top: 1px solid var(--nscde-bs-color-5) !important;
    border-right: 1px solid var(--nscde-ts-color-5) !important;
    border-bottom: 1px solid var(--nscde-ts-color-5) !important;
  }

  .sidebar-footer-icon {
    display: none !important;
  }
  .sidebar-footer-link {
    text-align: center !important;
  }
}

#smtpServerInfoBox {
  background-color: var(--nscde-sel-color-5) !important;
  color: var(--nscde-fg-color-5) !important;
  border-top: 1px solid var(--nscde-bs-color-5) !important;
  border-left: 1px solid var(--nscde-bs-color-5) !important;
  border-bottom: 1px solid var(--nscde-ts-color-5) !important;
  border-right: 1px solid var(--nscde-ts-color-5) !important;
  border-radius: 0px !important;
  font-family: -moz-fixed !important;
}

#accountTreeBox {
  padding-top: 20px !important;
}

#accounttree > li.isDefaultServer > div > .name {
  text-decoration: underline !important;
  font-size: 110% !important; 
  font-weight: bold !important;
}

#accountActionsDropdown > menuitem {
  background-color: var(--nscde-bg-color-6) !important;
  color: var(--nscde-fg-color-6) !important;
  border: 1px solid var(--nscde-bg-color-6) !important;
}

#accountActionsDropdown > menuitem:not([disabled="true"]):is(:active, [open], [checked], [selected="true"]) {
  background-color: var(--nscde-sel-color-6) !important;
  color: var(--nscde-fg-color-6) !important;
  border-top: 1px solid var(--nscde-bs-color-6) !important;
  border-left: 1px solid var(--nscde-bs-color-6) !important;
  border-right: 1px solid var(--nscde-ts-color-6) !important;
  border-bottom: 1px solid var(--nscde-ts-color-6) !important;
}

#accountSetup h1,
#accountSetup body {
  background-color: var(--nscde-bg-color-5) !important;
  color: var(--nscde-fg-color-5) !important;
}

#aboutAddressBookCount,
#detailsPane,
#cardsPane,
#booksPane {
  background-color: var(--nscde-bg-color-5) !important;
  color: var(--nscde-fg-color-5) !important;
  border-top: 1px solid var(--nscde-bs-color-5) !important;
  border-left: 1px solid var(--nscde-bs-color-5) !important;
  border-right: 1px solid var(--nscde-ts-color-5) !important;
  border-bottom: 1px solid var(--nscde-ts-color-5) !important;
  padding-block-start: 2px !important;
}

#books {
  line-height: 1.8em !important;
}

#cardsHeader,
#cards {
  background-color: var(--nscde-sel-color-5) !important;
  color: var(--nscde-fg-color-5) !important;
}

tree-view-listbox > * {
  margin: 8px !important;
  border-radius: 0px !important;
}

#detailsBody section {
  background-color: var(--nscde-sel-color-5) !important;
  color: var(--nscde-fg-color-5) !important;
  border-top: 1px solid var(--nscde-bs-color-5) !important;
  border-left: 1px solid var(--nscde-bs-color-5) !important;
  border-right: 1px solid var(--nscde-ts-color-5) !important;
  border-bottom: 1px solid var(--nscde-ts-color-5) !important;
  border-radius: 0px !important;
  box-shadow: none !important;
}

.bookRow-container {
  border-radius: 0px !important;
}

.bookRow-container:hover {
  background-color: inherit !important;
}

.bookRow.selected > .bookRow-container {
  background-color: #ffffff !important;
  color: #000000 !important;
  outline: 1px solid var(--nscde-bg-color-1) !important;
  outline-offset: 1px !important;
}

#searchInput {
  background-color: var(--nscde-bg-color-4) !important;
  color: var(--nscde-fg-color-4) !important;
  border-radius: 0px !important;
}


#searchInput:is([selected="true"], :active, :focus) {
  outline: 1px solid var(--nscde-bg-color-1) !important;
  outline-offset: 1px !important;
}

ab-card-listrow {
  position: inherit !important;
  padding-top: 4px;
  padding-bottom: 4px;
  margin-top: 12px;
  margin-bottom: 12px;
}

tree-view-listbox > * {
  background-color: var(--nscde-sel-color-5) !important;
  color: var(--nscde-fg-color-5) !important;
}

tree-view-listbox:focus > .current.selected {
  background-color: #ffffff !important;
  color: #000000 !important;
  outline: 1px solid var(--nscde-bg-color-1) !important;
  outline-offset: 1px !important;
  font-weight: bold !important;
}

:is(.name, .address) {
  background-color: inherit !important;
  color: var(--nscde-fg-color-5) !important;
}

ab-card-listrow:is(.selected) .name {
  font-weight: bold !important;
}

.contact-heading-name, .contact-heading-nickname, .contact-heading-email {
  background-color: inherit !important;
  color: inherit !important;
}

.menupopup-arrowscrollbox {
  background-color: var(--nscde-bg-color-6) !important;
  color: var(--nscde-fg-color-6) !important;
}

menuseparator {
  -moz-appearance: none !important;
  border-top: 1px solid var(--nscde-bs-color-6) !important;
  border-bottom: 1px solid var(--nscde-ts-color-6) !important;
  margin-left: 0px !important;
  margin-right: 0px !important;
}

menupopup:hover > :is(menu, menuitem),
menupopup > :is(menu, menuitem) {
  background-color: var(--nscde-bg-color-6) !important;
  color: var(--nscde-fg-color-6) !important;
  border-radius: 0px !important;
  border: 1px solid var(--nscde-bg-color-6) !important;
  margin: 0px !important;
}

menupopup > :is(menu, menuitem):is([selected="true"],:active) {
  background-color: var(--nscde-sel-color-6) !important;
  color: var(--nscde-fg-color-6) !important;
  border-top: 1px solid var(--nscde-bs-color-6) !important;
  border-left: 1px solid var(--nscde-bs-color-6) !important;
  border-right: 1px solid var(--nscde-ts-color-6) !important;
  border-bottom: 1px solid var(--nscde-ts-color-6) !important;
}

.toolbarbutton-1:not([disabled="true"]):is([open="true"], [selected="true"], :active) > .toolbarbutton-menubutton-dropmarker:-moz-locale-dir(ltr),
.toolbarbutton-1:not([disabled="true"]):is([open="true"], [selected="true"], :active) > .toolbarbutton-menubutton-button,
#toolbarCreateBook:hover, #toolbarCreateContact:hover, #toolbarCreateList:hover, #toolbarImport:hover,
#toolbarCreateBook, #toolbarCreateContact, #toolbarCreateList, #toolbarImport {
  background-color: var(--nscde-bg-color-5) !important;
  color: var(--nscde-fg-color-5) !important;
  border-top: 1px solid var(--nscde-ts-color-5) !important;
  border-left: 1px solid var(--nscde-ts-color-5) !important;
  border-right: 1px solid var(--nscde-bs-color-5) !important;
  border-bottom: 1px solid var(--nscde-bs-color-5) !important;
  border-radius: 0px !important;
  box-shadow: none !important;
}

#detailsFooter,
.toolbarbutton-1:not([disabled="true"]):hover > .toolbarbutton-menubutton-dropmarker:-moz-locale-dir(ltr),
.toolbarbutton-1:not([disabled="true"]):hover > .toolbarbutton-menubutton-button {
  background-color: var(--nscde-bg-color-5) !important;
  border-color: var(--nscde-bg-color-5) !important;
}

#toolbarCreateBook:is([selected="true"],:active), #toolbarCreateContact:is([selected="true"],:active),
#toolbarCreateList:is([selected="true"],:active), #toolbarImport:is([selected="true"],:active) {
  background-color: var(--nscde-sel-color-5) !important;
  color: var(--nscde-fg-color-5) !important;
  border-top: 1px solid var(--nscde-bs-color-5) !important;
  border-left: 1px solid var(--nscde-bs-color-5) !important;
  border-right: 1px solid var(--nscde-ts-color-5) !important;
  border-bottom: 1px solid var(--nscde-ts-color-5) !important;
}

#detailsFooter menulist:not([hidden]) {
  background-color: var(--nscde-bg-color-5) !important;
  color: var(--nscde-fg-color-5) !important;
  border-top: 1px solid var(--nscde-ts-color-5) !important;
  border-left: 1px solid var(--nscde-ts-color-5) !important;
  border-right: 1px solid var(--nscde-bs-color-5) !important;
  border-bottom: 1px solid var(--nscde-bs-color-5) !important;
  border-radius: 0px !important;
}

#detailsFooter menulist:not([hidden]):is([selected="true"], [open="true"], :active) {
  background-color: var(--nscde-sel-color-5) !important;
  color: var(--nscde-fg-color-5) !important;
  border-top: 1px solid var(--nscde-bs-color-5) !important;
  border-left: 1px solid var(--nscde-bs-color-5) !important;
  border-right: 1px solid var(--nscde-ts-color-5) !important;
  border-bottom: 1px solid var(--nscde-ts-color-5) !important;
}

.addr-book-edit-fieldset-button::before {
  background-color: var(--nscde-bg-color-5) !important;
  fill: var(--nscde-fg-color-5) !important;
  border-top: 1px solid var(--nscde-ts-color-5) !important;
  border-left: 1px solid var(--nscde-ts-color-5) !important;
  border-right: 1px solid var(--nscde-bs-color-5) !important;
  border-bottom: 1px solid var(--nscde-bs-color-5) !important;
  border-radius: 0px !important;
}

.addr-book-edit-fieldset-button::before:is([selected="true"], [open="true"], :active) {
  background-color: var(--nscde-sel-color-5) !important;
  fill: var(--nscde-fg-color-5) !important;
  border-top: 1px solid var(--nscde-bs-color-5) !important;
  border-left: 1px solid var(--nscde-bs-color-5) !important;
  border-right: 1px solid var(--nscde-ts-color-5) !important;
  border-bottom: 1px solid var(--nscde-ts-color-5) !important;
  border-radius: 0px !important;
}

vcard-edit select:not([size], [multiple]) {
  background-color: var(--nscde-bg-color-6) !important;
  color: var(--nscde-fg-color-6) !important;
  border-top: 1px solid var(--nscde-ts-color-6) !important;
  border-left: 1px solid var(--nscde-ts-color-6) !important;
  border-right: 1px solid var(--nscde-bs-color-6) !important;
  border-bottom: 1px solid var(--nscde-bs-color-6) !important;
  border-radius: 0px !important;
}

/* Thunderbird 100+ - icons for userContent.css */
.bookRow-icon {
  background-image: url("nsicons/addrbook.png") !important;
}

#sortButton img {
  display: none !important;
}
#sortButton {
  background-image: url("nsicons/Prefs.png") !important;
  background-repeat: no-repeat !important;
  background-position: center center !important;
}

ab-table-card-listrow {
  background-image: url("nsicons/abcard.png") !important;
  background-repeat: no-repeat !important;
  background-position: 7px center !important;
}

#detailsWriteButton::before {
  background-image: url("nsicons/mail-toolbar-small.png") !important;
  background-position: top 0px right 32px !important;
}
#detailsWriteButton:hover::before {
  background-position: top -16px right 32px !important;
}
#detailsWriteButton[disabled="true"]::before {
  background-position: top 16px right 32px !important;
}

#detailsEventButton::before {
  background-image: url("nsicons/NewTask.png") !important;
}

#detailsSearchButton::before {
  background-image: url("nsicons/Find-small.png") !important;
}

#detailsNewListButton::before {
  background-image: url("nsicons/addressbook-toolbar.png") !important;
  background-position: top 0px right 48px !important;
}

#toolbarCreateBook {
  list-style-image: url("nsicons/addrbook.png") !important;
}

#toolbarCreateContact {
  list-style-image: url("nsicons/addressbook-toolbar.png") !important;
  -moz-image-region: rect(0px 24px 24px 0px) !important;
}
#toolbarCreateContact:hover {
  -moz-image-region: rect(24px 24px 48px 0px) !important;
}
#toolbarCreateContact[disabled="true"] {
  -moz-image-region: rect(48px 24px 72px 0px) !important;
}

#toolbarCreateList {
  list-style-image: url("nsicons/addressbook-toolbar.png") !important;
  -moz-image-region: rect(0px 48px 24px 24px) !important;
}
#toolbarCreateList:hover {
  -moz-image-region: rect(24px 48px 48px 24px) !important;
}
#toolbarCreateList[disabled="true"] {
  -moz-image-region: rect(48px 48px 72px 24px) !important;
}

#toolbarImport {
  list-style-image: url("nsicons/mail-toolbar.png") !important;
  -moz-image-region: rect(0px 312px 24px 288px) !important;
}
#toolbarImport:hover {
  -moz-image-region: rect(24px 312px 48px 288px) !important;
}
#toolbarImport[disabled="true"] {
  -moz-image-region: rect(48px 312px 72px 288px) !important;
}

#headingWrapper .toolbarbutton-1.message-header-view-button:hover,
#headingWrapper .toolbarbutton-1.message-header-view-button {
  border-radius: 0px !important;
  background-color: var(--nscde-bg-color-5) !important;
  color: var(--nscde-fg-color-5) !important;
  border-left: 1px solid var(--nscde-ts-color-5) !important;
  border-top: 1px solid var(--nscde-ts-color-5) !important;
  border-right: 1px solid var(--nscde-bs-color-5) !important;
  border-bottom: 1px solid var(--nscde-bs-color-5) !important;
}

#headingWrapper .toolbarbutton-1.message-header-view-button:is([selected="true"], :active) {
  background-color: var(--nscde-sel-color-5) !important;
  color: var(--nscde-fg-color-5) !important;
  border-left: 1px solid var(--nscde-bs-color-5) !important;
  border-top: 1px solid var(--nscde-bs-color-5) !important;
  border-right: 1px solid var(--nscde-ts-color-5) !important;
  border-bottom: 1px solid var(--nscde-ts-color-5) !important;
}

#headingWrapper .toolbarbutton-1 .toolbarbutton-icon {
  display: none !important;
}

