/* This Source Code Form is subject to the terms of the Creative Commons
 * Attribution-NonCommercial-ShareAlike International License, v. 4.0.
 * If a copy of the CC BY-NC-SA 4.0 was not distributed with this
 * file, You can obtain one at http://creativecommons.org/licenses/by-nc-sa/4.0/
 * or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA. */

/* CSS style adjustments for various mozilla sites */

@-moz-document domain("bugzilla.mozilla.org") {
  :root {
    --font-family-monospace: Fira Code UC, Fira Code, SF Mono, Menlo, Consolas, Monaco, -moz-fixed, monospace !important;
    --font-weight-monospace: 400 !important;
  }

  xmp,
  pre,
  code,
  plaintext,
  kbd {
    font-weight: var(--font-weight-monospace, inherit);
  }

  #bottom-actions {
    margin-bottom: 200px !important;
  }
}

@-moz-document domain("firefox-source-docs.mozilla.org") {
  /* make search highlight color match the selection color */
  .rst-content .highlighted {
    background-color: var(--global-selection-bgcolor) !important;
    color: var(--global-selection-color) !important;
    background-image: none;
    box-shadow: var(--global-selection-bgcolor) 0 0 0 2px !important;
  }
}

@-moz-document domain("phabricator.services.mozilla.com") {
  /* use Fira Code for code. you can also set the default monospace font in about:preferences, but that can cause issues */
  .platform-windows .PhabricatorMonospaced,
  .platform-windows .phabricator-remarkup .remarkup-code-block .remarkup-code {
    font-family: Fira Code UC, Fira Code, SF Mono, Menlo, Consolas, Monaco, monospace !important;
    font-weight: 300 !important;
  }
}

@-moz-document domain("hg.mozilla.org") {
  xmp,
  pre,
  plaintext {
    font-family: Fira Code UC, Fira Code, SF Mono, Menlo, Consolas, Monaco, monospace;
    font-weight: 300;
  }
}

@-moz-document domain("searchfox.org") {
  :root {
    --dummy-property: initial;
  }

  tt,
  code,
  kbd,
  samp,
  .results td > a {
    font-family: Fira Code UC, Fira Code, SF Mono, Menlo, Consolas, Monaco, monospace;
    font-weight: 300;
  }

  .graph text {
    font-family: Fira Code UC, Fira Code, SF Mono, Menlo, Consolas, Monaco, monospace !important;
    font-weight: 300;
  }

  @media (min-width: 1919px) {
    .source-line {
      white-space: pre-wrap !important;
    }
  }

  .graph {
    fill: currentColor !important;
  }

  #spinner {
    pointer-events: none !important;
  }
}

@-moz-document domain("addons.mozilla.org") {
  /* invert an icon that darkreader can't invert correctly. */
  :root[data-darkreader-mode="dynamic"][data-darkreader-scheme="dark"] .Icon-permission-unlimitedStorage {
    background-image: url('data:image/svg+xml;utf8,<svg width="18px" height="20px" viewBox="0 0 18 20" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><path d="M19.5,15.825 L4.5,15.825 C3.675,15.825 3,16.5 3,17.325 L3,20.25 C3,21.075 3.675,21.75 4.5,21.75 L19.5,21.75 C20.325,21.75 21,21.075 21,20.25 L21,17.325 C21,16.5 20.325,15.825 19.5,15.825 Z M18.075,20.25 C17.25,20.25 16.575,19.575 16.575,18.75 C16.575,17.925 17.25,17.25 18.075,17.25 C18.9,17.25 19.575,17.925 19.575,18.75 C19.575,19.575 18.9,20.25 18.075,20.25 Z M18.75,2.25 L5.25,2.25 C3.975,2.25 3,3.3 3,4.65 L3,14.625 C3.45,14.4 3.975,14.25 4.5,14.25 L19.5,14.25 C20.025,14.25 20.55,14.4 21,14.625 L21,4.65 C21,3.3 20.025,2.25 18.75,2.25 Z" id="path-1"/></defs><g id="Symbols" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="storage" transform="translate(-3.000000, -2.000000)"><g id="Icon-/-32-/-Storage---32"><rect id="bouding-box" x="0" y="0" width="24" height="24"/><mask id="mask-2" fill="white"><use xlink:href="%23path-1"/></mask><g id="Shape" fill-rule="nonzero"/><g id="Icon-Color" fill="white" mask="url(%23mask-2)"><rect id="Rectangle" x="0" y="0" width="24" height="24"/></g></g></g></g></svg>') !important;
  }
}

@-moz-document domain("paste.mozilla.org") {
  .snippet-form textarea {
    font-family: Fira Code UC, Fira Code, SF Mono, Menlo, Consolas, Monaco, monospace !important;
    font-weight: 300 !important;
  }
}
