%if 0
/* - 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/. */
%endif
@namespace html "http://www.w3.org/1999/xhtml";

* {
  -moz-user-select: text;
}

:root {
  --in-content-category-background: #fafafc;
}

.main-content {
  padding-top: 0;
}

.pane-container {
  /* A workaround to keep the container always float on the `top: 0` (Bug 1377009) */
  display: block;
  width: 664px;
}

#mainPrefPane {
  width: 100%;
  padding: 0;
  font: message-box;
  color: currentColor;
}

groupbox + groupbox {
  margin-top: 16px;
}

groupbox + groupbox > .groupbox-body,
groupbox + vbox groupbox > .groupbox-body {
  margin-top: 4px;
}

.groupbox-title {
  margin-top: 16px;
}

description.indent,
.indent > description {
  color: #737373;
}

button,
treecol,
html|option {
  /* override the * rule */
  -moz-user-select: none;
}

description,
label {
  line-height: 30px;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

description > checkbox {
  vertical-align: bottom;
}

.indent {
  margin-inline-start: 28px !important;
}

separator.thin:not([orient="vertical"]) {
  height: 8px;
}

.checkbox-check {
  margin-inline-end: 8px;
  width: 20px;
  height: 20px;
}

.learnMore {
  margin-inline-start: 10px;
  font-weight: normal;
  white-space: nowrap;
}

.accessory-button {
  min-width: 145px;
  margin: 2px 0;
}

#searchInput {
  border-radius: 0;
}

/* Subcategory title */

/**
 * The first subcategory title for each category should not have margin-top.
 */

.subcategory:not([hidden]) ~ .subcategory {
  margin-top: 32px;
  padding-top: 15px;
  border-top: 1px solid rgba(12, 12, 13, 0.15);
}

/* Category List */

#category-general > .category-icon {
  list-style-image: url("chrome://browser/skin/preferences/in-content/general.svg");
}

#category-search > .category-icon {
  list-style-image: url("chrome://browser/skin/preferences/in-content/search.svg");
}

#category-privacy > .category-icon {
  list-style-image: url("chrome://browser/skin/preferences/in-content/privacy-security.svg");
}

#category-sync > .category-icon {
  list-style-image: url("chrome://browser/skin/preferences/in-content/sync.svg");
}

/* header */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header[hidden=true] {
  display: none;
}

/* General Pane */

#isDefaultLabel {
  font-weight: 600;
}

#startupPageBox {
  padding-top: 32px;
}

#browserHomePage {
  margin-inline-start: 0;
  margin-inline-end: 0;
}

.homepage-button:first-of-type {
  margin-inline-start: 0;
}

.homepage-button:last-of-type {
  margin-inline-end: 0;
}

.extension-controlled-icon {
  height: 20px;
  margin-bottom: 6px;
  vertical-align: bottom;
  width: 20px;
}

#getStarted {
  font-size: 90%;
}

#downloadFolder {
  margin-inline-start: 0;
}

#browserHomePage:-moz-locale-dir(rtl) input {
  unicode-bidi: plaintext;
  direction: rtl;
}

#updateApp > .groupbox-body > label {
  margin: 0 0 4px 0;
  line-height: 30px;
}

#updateApp > .groupbox-body > description {
  line-height: 30px;
  margin: 0;
}

#updateBox {
  margin-top: 8px;
  margin-bottom: 32px;
}

#updateDeck > hbox > button {
  margin-top: 0;
  margin-bottom: 0;
  margin-inline-end: 0;
}

#updateDeck > hbox > label {
  -moz-box-flex: 1;
}

#manualLink {
  margin-inline-start: 6px !important;
}

#updateRadioGroup > radio {
  height: 30px;
  margin: 2px 0;
}

#filter {
  margin: 4px 0 8px 0;
}

#handlersView {
  height: 25em;
  margin-inline-end: 0;
}

#handlersView > richlistitem {
  min-height: 30px !important;
}

#handlersView > richlistitem > hbox > hbox > menulist {
  margin-top: 0;
  margin-bottom: 0;
  margin-inline-end: 0;
  min-height: 0;
}

.typeIcon {
  margin-inline-start: 10px !important;
  margin-inline-end: 9px !important;
}

.actionIcon {
  margin-inline-start: 11px !important;
  margin-inline-end: 8px !important;
}

.actionsMenu {
  min-height: 36px;
}

.actionsMenu > menupopup > menuitem {
  padding-inline-start: 10px !important;
}

.actionsMenu > menupopup > menuitem > .menu-iconic-left {
  margin-inline-end: 8px !important;
}

/* Search Pane */

#defaultEngine {
  margin-top: 2px;
  margin-bottom: 6px;
}

#engineList {
  margin: 2px 0 5px 0;
}

#engineList > treechildren::-moz-tree-image(engineShown, checked),
#blocklistsTree > treechildren::-moz-tree-image(selectionCol, checked) {
  list-style-image: url("chrome://global/skin/in-content/check.svg");
  -moz-context-properties: fill, stroke;
  fill: #2292d0;
  stroke: none;
  width: 21px;
  height: 21px;
}

#engineList > treechildren::-moz-tree-image(engineShown, checked, selected),
#blocklistsTree > treechildren::-moz-tree-image(selectionCol, checked, selected) {
  fill: white;
  stroke: #0095dd;
}

#engineList > treechildren::-moz-tree-row,
#blocklistsTree > treechildren::-moz-tree-row {
  min-height: 36px;
}

#selectionCol {
  min-width: 26px;
}

#addEnginesBox {
  margin: 4px 0 0 0;
}

/* Privacy Pane */

#formAutofillGroup {
  margin-top: 28px;
}

.doNotTrackLearnMore {
  margin-inline-start: calc(1em + 30px);
  margin-bottom: 1em;
  font-weight: normal;
}

.doNotTrackLearnMore > label {
  font-size: 1em !important;
  margin-left: 0;
}

#locationBarGroup > .text-link {
  margin-top: 6px;
  line-height: 30px;
}

#allowSmartSize {
  margin-top: 0;
  margin-bottom: 4px;
}

#doNotTrackLearnMoreBox {
  margin-top: 32px;
}

#trackingProtectionAdvancedSettings {
  margin-inline-start: 15px;
}

#historyPane {
  margin-top: 4px;
}

/* Collapse the non-active vboxes in decks to use only the height the
   active vbox needs */
#historyPane:not([selectedIndex="1"]) > #historyDontRememberPane,
#historyPane:not([selectedIndex="2"]) > #historyCustomPane,
#weavePrefsDeck:not([selectedIndex="1"]) > #hasFxaAccount,
#fxaLoginStatus:not([selectedIndex="1"]) > #fxaLoginUnverified,
#fxaLoginStatus:not([selectedIndex="2"]) > #fxaLoginRejected {
  visibility: collapse;
}

#weavePrefsDeck > vbox > label,
#weavePrefsDeck > vbox > groupbox,
#weavePrefsDeck > vbox > description,
#weavePrefsDeck > #hasFxaAccount > vbox > label,
#weavePrefsDeck > #hasFxaAccount > hbox > label {
  /* no margin-inline-start for elements at the beginning of a line */
  margin-inline-start: 0;
}

#weavePrefsDeck > vbox > groupbox {
  margin-top: 16px;
}

#tabsElement {
  margin-inline-end: 4px; /* add the 4px end-margin of other elements */
}

.text-link {
  margin-bottom: 0;
}

#showUpdateHistory {
  margin-inline-start: 0;
}

/**
 * Dialog
 */

.dialogOverlay {
  visibility: hidden;
}

.dialogOverlay[topmost="true"] {
  background-color: rgba(0,0,0,0.5);
}

.dialogBox {
  background-color: #fbfbfb;
  background-clip: content-box;
  color: #424e5a;
  font-size: 14px;
  /* `transparent` will use the dialogText color in high-contrast themes and
     when page colors are disabled */
  border: 1px solid transparent;
  border-radius: 3.5px;
  box-shadow: 0 2px 6px 0 rgba(0,0,0,0.3);
  display: -moz-box;
  margin: 0;
  padding: 0;
}

.dialogBox[resizable="true"] {
  resize: both;
  overflow: hidden;
  min-height: 20em;
  min-width: 66ch;
}

.dialogBox > .groupbox-title {
  margin-top: 0;
  padding: 3.5px 0;
  background-color: #F1F1F1;
  border-bottom: 1px solid #C1C1C1;
}

.dialogTitle {
  text-align: center;
  -moz-user-select: none;
}

.close-icon {
  border: none;
  background: none !important;
  min-width: 0;
  min-height: auto;
}

.dialogBox > .groupbox-body {
  -moz-appearance: none;
  padding: 20px;
}

.dialogFrame {
  -moz-box-flex: 1;
  /* Default dialog dimensions */
  width: 66ch;
}

.largeDialogContainer.doScroll {
  overflow-y: auto;
  -moz-box-flex: 1;
}

/**
 * End Dialog
 */

/**
 * Font group and font dialog menulist fixes
 */

#defaultFont {
  width: 25ch;
}

#defaultFontType,
#serif,
#sans-serif,
#monospace {
  min-width: 30ch;
}

/**
 * Sync
 */

.fxaProfileImage {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 1px solid transparent;
  list-style-image: url("chrome://browser/skin/preferences/in-content/fxa-avatar.svg");
  margin-inline-end: 24px;
  -moz-user-focus: normal;
}

.fxaProfileImage.actionable {
  cursor: pointer;
}

.fxaProfileImage.actionable:hover {
  border-color: #0095DD;
}

.fxaProfileImage.actionable:hover:active {
  border-color: #ff9500;
}

#useFirefoxSync  {
  font-size: 90%;
  margin-inline-end: 8px !important;
}

#fxaNoLoginStatus {
  margin-top: 46px;
  margin-bottom: 64px;
}

#fxaSyncComputerName {
  margin-top: 3px;
  margin-inline-start: 0;
  margin-bottom: 0;
}

#tosPP-small-ToS {
  margin-bottom: 14px;
}

#noFxaCaption {
  line-height: 30px;
  margin-top: 0;
  margin-bottom: 4px;
}

#noFxaSignIn {
  margin-inline-start: 8px;
}

.fxaSyncIllustration {
  list-style-image: url("chrome://browser/skin/preferences/in-content/sync-devices.svg");
  width: 312px;
  height: 136px;
}

#noFxaDescription {
  padding-inline-end: 52px;
}

.separator {
  border-bottom: 1px solid var(--in-content-box-border-color);
}

#fxaGroup {
  margin-bottom: 32px;
}

.openLink {
  line-height: 30px;
  cursor: pointer;
}

.openLink:visited {
  color: var(--in-content-link-color);
}

#fxaDisplayName {
  margin-inline-end: 10px !important;
}

.fxaEmailAddress {
  margin-inline-end: 8px !important;
}

.fxaLoginRejectedWarning {
  list-style-image: url(chrome://browser/skin/warning.svg);
  margin-inline-start: 4px;
  margin-inline-end: 8px;
}

#fxaSyncEngines > vbox > checkbox {
  max-width: 224px;
}

.fxaMobilePromo {
  margin: 2px 0 32px 0 !important;
}

.androidLink {
  list-style-image: url("chrome://browser/skin/preferences/in-content/logo-android.svg");
}

.iOSLink {
  list-style-image: url("chrome://browser/skin/preferences/in-content/logo-ios.svg");
}

.androidLink,
.iOSLink {
  margin-inline-start: 2px;
  margin-inline-end: 4px;
  width: 20px;
  height: 20px;
  vertical-align: text-bottom;
}

#updateDeck > hbox > label {
  margin-inline-end: 5px ! important;
}

.update-throbber {
  width: 16px;
  min-height: 16px;
  margin-inline-end: 8px;
  margin-top: 7px;
  margin-bottom: 7px;
  list-style-image: url("chrome://global/skin/icons/loading.png");
}

@media (min-resolution: 1.1dppx) {
  .update-throbber {
    list-style-image: url("chrome://global/skin/icons/loading@2x.png");
  }
}

.help-button {
  display: flex;
  align-items: center;
  position: fixed;
  left: 0;
  bottom: 36px;
  background-image: url("chrome://global/skin/icons/help.svg");
  -moz-context-properties: fill, fill-opacity;
  fill: currentColor;
  line-height: 22px;
  height: unset;
  min-height: 36px;
  width: 168px;
  background-position: left 10px center;
  background-size: 16px;
  padding-inline-start: 38px;
  margin-inline-start: 34px;
}

.help-button:-moz-locale-dir(rtl) {
  background-position: right 10px top 10px;
  left: auto;
  right: 0;
}

.help-button:hover {
  fill: currentColor;
}

.help-button:link,
.help-button:visited {
  color: var(--in-content-category-text);
  text-decoration: none;
  border-radius: 2px;
}

.face-sad {
  list-style-image: url("chrome://browser/skin/preferences/in-content/face-sad.svg");
  width: 20px;
  height: 20px;
  margin-inline-end: 8px;
  margin-top: 5px;
  margin-bottom: 5px;
}

.face-smile {
  list-style-image: url("chrome://browser/skin/preferences/in-content/face-smile.svg");
  width: 20px;
  height: 20px;
  margin-inline-end: 8px;
  margin-top: 5px;
  margin-bottom: 5px;
}

.search-container {
  position: sticky;
  background-color: var(--in-content-page-background);
  width: 100%;
  top: 0;
  z-index: 1;
}

#searchInput {
  margin: 20px 0 30px 0;
}

#searchInput .textbox-search-icons:not([selectedIndex="1"]) {
  display: none;
}

.search-tooltip {
  font-size: 1.25rem;
  position: absolute;
  padding: 0 10px;
  background-color: #ffe900;
  border: 1px solid #d7b600;
  -moz-user-select: none;
  bottom: 35px;
}

.search-tooltip:hover,
.search-tooltip:hover::before {
  opacity: .1;
}

.search-tooltip::before {
  position: absolute;
  content: "";
  border: 7px solid transparent;
  border-top-color: #d7b600;
  top: 100%;
  offset-inline-start: calc(50% - 7px);
}

.search-tooltip::after {
  position: absolute;
  content: "";
  border: 6px solid transparent;
  border-top-color: #ffe900;
  top: 100%;
  offset-inline-start: calc(50% - 6px);
}

.search-tooltip-parent {
  position: relative;
}

.visually-hidden {
  visibility: hidden;
}

menulist[indicator=true] > menupopup menuitem:not([image]) > .menu-iconic-left {
  display: -moz-box;
  min-width: auto; /* Override the min-width defined in menu.css */
  margin-inline-end: 6px;
}

menulist[indicator=true] > menupopup menuitem:not([image]) > .menu-iconic-left > .menu-iconic-icon {
  width: 8px;
  height: 10px;
  margin: 0;
}

menulist[indicator=true] > menupopup menuitem[indicator=true]:not([image]) > .menu-iconic-left > .menu-iconic-icon {
  list-style-image: url(chrome://browser/skin/preferences/in-content/search-arrow-indicator.svg);
}

menulist[indicator=true] > menupopup menuitem[indicator=true]:not([image]) > .menu-iconic-left > .menu-iconic-icon:-moz-locale-dir(rtl) {
  transform: scaleX(-1);
}

.menu-iconic-highlightable-text {
  margin: 0; /* Align with the margin of xul:label.menu-iconic-text */
}

.no-results-message > label {
  margin: 2px 0;
  line-height: 30px;
}

.no-results-container {
  margin-top: 64px;
}

.no-results-container > image {
  list-style-image: url("chrome://browser/skin/preferences/in-content/no-search-results.svg");
  width: 380px;
  height: 293px;
}
