/* 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 the relevant *.tokens.json file
 * and run `mach buildtokens` to see your changes. */

@import url("chrome://global/skin/design-system/tokens-shared.css");

@layer tokens-foundation {
  :root,
  :host(.anonymous-content-host) {
    /** background-color **/
    --background-color-box-info: color-mix(in srgb, currentColor 6%, transparent);
    --background-color-canvas: Canvas;
    --background-color-list-item-hover: color-mix(in srgb, currentColor 20%, transparent);

    /** border **/
    --border-color: color-mix(in srgb, currentColor 50%, transparent);
    --border-color-deemphasized: color-mix(in srgb, currentColor 24%, transparent);
    --border-color-interactive: color-mix(in srgb, currentColor 15%, var(--color-gray-60));

    /** button **/
    /* TODO Bug 1821203 - Gray use needs to be consolidated */
    --button-background-color: color-mix(in srgb, currentColor 13%, transparent);
    --button-background-color-hover: color-mix(in srgb, currentColor 17%, transparent);
    --button-background-color-active: color-mix(in srgb, currentColor 30%, transparent);
    --button-text-color: currentColor;
    --button-text-color-primary: AccentColorText;

    /** color **/
    --color-accent-attention: AccentColor;
    --color-accent-primary: AccentColor;
    --color-accent-primary-hover: color-mix(in srgb, black 10%, var(--color-accent-primary));
    --color-accent-primary-active: color-mix(in srgb, black 20%, var(--color-accent-primary));
    --color-accent-primary-selected: SelectedItem;

    /** font-size **/
    --font-size-root: unset;
    --font-size-xsmall: unset;
    --font-size-small: unset;
    --font-size-large: unset;
    --font-size-xlarge: unset;
    --font-size-xxlarge: unset;
    --font-size-xxxlarge: unset;

    /** link **/
    --link-color: LinkText;
    --link-color-hover: color-mix(in srgb, black 10%, var(--link-color));
    --link-color-active: color-mix(in srgb, black 20%, var(--link-color));

    /** table **/
    --table-header-text-color: AccentColorText;
    /* TODO Bug 1821203 - Gray use needs to be consolidated */
    --table-row-background-color-alternate: light-dark(rgba(0, 0, 0, 0.05), rgba(255, 255, 255, 0.05));

    /** text-color **/
    --text-color: currentColor;
    --text-color-accent-primary-selected: SelectedItemText;
  }
}

/* Bug 1879900: Can't nest media queries inside of :host, :root selector
   until Bug 1879349 lands */
@layer tokens-browser-theme {
  @media not ((forced-colors) or (-moz-native-theme)) {
    :root:not([lwtheme]),
    :host(.anonymous-content-host) {
      /** button **/
      /* TODO Bug 1821203 - Gray use needs to be consolidated */
      --button-background-color: light-dark(rgba(207, 207, 216, 0.33), rgba(0, 0, 0, 0.33));
      --button-background-color-hover: light-dark(rgba(207, 207, 216, 0.66), rgba(207, 207, 216, 0.2));
      --button-background-color-active: light-dark(rgb(207, 207, 216), rgba(207, 207, 216, 0.4));
      --button-text-color: light-dark(rgb(21, 20, 26), rgb(251, 251, 254));
      --button-text-color-primary: light-dark(rgb(251, 251, 254), rgb(43, 42, 51));

      /** color **/
      --color-accent-attention: light-dark(#2ac3a2, #54ffbd);
      --color-accent-primary: light-dark(var(--color-blue-60), var(--color-cyan-30));

      /** input **/
      --input-text-background-color: light-dark(var(--color-white), #42414d);
      --input-text-color: light-dark(rgb(21, 20, 26), rgb(251, 251, 254));

      /** link **/
      --link-color: light-dark(var(--color-blue-60), var(--color-cyan-30));
    }
  }
}
