/* 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: light-dark(var(--color-gray-20), var(--color-gray-80));
    --background-color-canvas: light-dark(var(--color-white), var(--color-gray-90));
    --background-color-list-item-hover: color-mix(in srgb, var(--color-accent-primary) 20%, transparent);

    /** border **/
    --border-color: light-dark(var(--color-gray-50), var(--color-gray-70));
    --border-color-deemphasized: light-dark(var(--color-gray-30), var(--color-gray-70));
    --border-color-interactive: light-dark(var(--color-gray-60), var(--color-gray-50));

    /** button **/
    /* TODO Bug 1821203 - Gray use needs to be consolidated */
    --button-background-color: color-mix(in srgb, currentColor 7%, transparent);
    --button-background-color-hover: color-mix(in srgb, currentColor 14%, transparent);
    --button-background-color-active: color-mix(in srgb, currentColor 21%, transparent);
    --button-text-color: light-dark(var(--color-gray-100), var(--color-gray-0));
    --button-text-color-primary: light-dark(var(--color-white), var(--color-gray-100));

    /** color **/
    --color-accent-attention: light-dark(#2ac3a2, #54ffbd);
    --color-accent-primary: light-dark(var(--color-blue-60), var(--color-cyan-30));
    --color-accent-primary-hover: light-dark(var(--color-blue-70), var(--color-cyan-20));
    --color-accent-primary-active: light-dark(var(--color-blue-80), var(--color-cyan-10));
    --color-accent-primary-selected: light-dark(var(--color-blue-60), var(--color-cyan-30));

    /** font-size **/
    --font-size-root: 15px;
    /* 11px / Note this token is to be used in rare cases because its hard to read. Please consult with the Design Systems and A11y teams for case-by-case feedback. */
    --font-size-xsmall: 0.733rem;
    /* 13px */
    --font-size-small: 0.867rem;
    /* 17px */
    --font-size-large: 1.133rem;
    /* 22px */
    --font-size-xlarge: 1.467rem;
    /* 24px */
    --font-size-xxlarge: 1.6rem;
    /* 33px */
    --font-size-xxxlarge: 2.2rem;

    /** link **/
    --link-color: var(--color-accent-primary);
    --link-color-hover: var(--color-accent-primary-hover);
    --link-color-active: var(--color-accent-primary-active);

    /** page **/
    --page-main-content-width: 664px;
    --page-space-block-start: 64px;

    /** table **/
    --table-header-text-color: light-dark(var(--color-white), var(--color-gray-100));
    /* TODO Bug 1821203 - Gray use needs to be consolidated */
    --table-row-background-color-alternate: light-dark(#f0f0f4, var(--color-gray-80));

    /** text-color **/
    --text-color: light-dark(var(--color-gray-100), var(--color-gray-0));
    --text-color-accent-primary-selected: 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-prefers-contrast {
  @media (prefers-contrast) {
    :root,
    :host(.anonymous-content-host) {
      /** button **/
      --button-text-color-ghost: var(--button-text-color);
      --button-text-color-ghost-disabled: var(--button-text-color-disabled);
      --button-text-color-toolbar: var(--button-text-color);
      --button-text-color-toolbar-disabled: var(--button-text-color-disabled);
    }
  }
}

/* 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(.anonymous-content-host) {
      /** button **/
      --button-background-color-ghost: var(--button-background-color);
      --button-background-color-ghost-disabled: var(--button-background-color-disabled);
      --button-background-color-toolbar: var(--button-background-color);
      --button-background-color-toolbar-disabled: var(--button-background-color-disabled);
      --button-text-color-ghost: var(--button-text-color);
      --button-text-color-ghost-disabled: var(--button-text-color-disabled);
      --button-text-color-toolbar: var(--button-text-color);
      --button-text-color-toolbar-disabled: var(--button-text-color-disabled);
    }
  }
}
