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

/* Tor Browser instructions
 * ========================
 *
 * DO NOT EDIT this file directly!
 *
 * DO NOT MANUALLY RESOLVE MERGE CONFLICTS for this file!
 *
 * This is a file generated by `./mach buildtokens`.
 *
 * When resolving conflicts, first resolve other conflicts outside the
 * 'dist' directory, if there are any:
 *   git mergetool ':(exclude)toolkit/themes/shared/design-system/dist/'
 *
 * Then regenerate these 'dist' files:
 *
 *   ./mach buildtokens
 *
 * Then add the generated files as resolved:
 *
 *   git add toolkit/themes/shared/design-system/dist/
 */
/* DO NOT EDIT this file directly, instead modify moz-badge.tokens.json
 * and run `mach buildtokens` to see your changes. */

@layer tokens-foundation, tokens-browser-theme, tokens-foundation-brand, tokens-foundation-nova, tokens-browser-theme-nova, tokens-foundation-brand-nova, tokens-prefers-contrast, tokens-prefers-contrast-nova, tokens-forced-colors, tokens-forced-colors-nova;

@layer tokens-foundation {
  :root,
  :host {
    --badge-background-color: transparent;
    --badge-background-color-filled: light-dark(var(--color-green-70), var(--color-green-40));
    --badge-border-color: var(--border-color);
    --badge-border-color-filled: light-dark(rgba(251, 251, 254, 0.4), rgba(21, 20, 26, 0.4));
    --badge-border-radius: var(--border-radius-small);
    --badge-border-width: 1px;
    --badge-text-color: var(--text-color-deemphasized);
    --badge-text-color-filled: light-dark(var(--color-white), var(--color-gray-100));
  }
}

/* Bug 1879900: Can't nest media queries inside of :host, :root selector
   until Bug 1879349 lands */
@layer tokens-forced-colors {
  @media (forced-colors) {
    :root,
    :host {
      --badge-background-color: Canvas;
      --badge-background-color-filled: AccentColor;
      --badge-border-color-filled: CanvasText;
      --badge-text-color: CanvasText;
      --badge-text-color-filled: AccentColorText;
    }
  }
}

@media -moz-pref("browser.nova.enabled") {
  @layer tokens-foundation-nova {
    :root,
    :host {
      --badge-background-color-filled: light-dark(var(--color-green-50), var(--color-green-20));
      --badge-border-color: light-dark(rgba(21, 20, 26, 0.4), rgba(251, 251, 254, 0.4));
      --badge-border-radius: var(--border-radius-circle);
      --badge-text-color: var(--text-color);
      --badge-text-color-filled: var(--button-text-color-primary);
    }
  }

  /* Bug 1879900: Can't nest media queries inside of :host, :root selector
   until Bug 1879349 lands */
  @layer tokens-forced-colors-nova {
    @media (forced-colors) {
      :root,
      :host {
        --badge-background-color-filled: AccentColor;
        --badge-border-color: CanvasText;
      }
    }
  }
}
