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

/* 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");

:root,
:host(.anonymous-content-host) {
  @layer tokens-foundation-brand {
    /** 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-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));

    /** font-size **/
    --font-size-root: 15px;
    /* 13px in-content, unset in platform (we want to avoid going too small when the root font size is already quite small) */
    --font-size-small: 0.867rem;

    /** input **/
    --input-text-color: var(--text-color);

    /** 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));
  }

  @layer tokens-prefers-contrast {
    @media (prefers-contrast) {
      /** button **/
      --button-text-color-ghost-disabled: var(--button-text-color-disabled);
    }
  }

  @layer tokens-forced-colors {
    @media (forced-colors) {
      /** button **/
      --button-background-color-ghost: ButtonFace;
      --button-background-color-ghost-disabled: var(--button-background-color-disabled);
      --button-text-color-ghost-disabled: var(--button-text-color-disabled);
    }
  }

  @media ((max-width: 0px) and (min-width: 1px)) {
    @layer tokens-foundation-brand-nova {
      /** background-color **/
      --background-color-box: light-dark(var(--color-white), var(--color-gray-70));
      --background-color-box-info: light-dark(var(--color-gray-15), var(--color-gray-65));
      --background-color-canvas: light-dark(var(--color-gray-05), var(--color-gray-85));

      /** border **/
      --border-color: light-dark(var(--color-gray-30), var(--color-gray-40));

      /** button **/
      --button-background-color-hover: light-dark(var(--color-violet-desaturated-20), var(--color-violet-desaturated-50));
      --button-background-color-active: light-dark(var(--color-violet-desaturated-30), var(--color-violet-desaturated-40));
      --button-text-color-ghost: var(--button-text-color);
      --button-text-color-ghost-disabled: var(--button-text-color-ghost);

      /** table **/
      /* TODO Bug 1821203 - Gray use needs to be consolidated */
      --table-row-background-color-alternate: light-dark(var(--color-gray-20), var(--color-gray-65));

      /** text-color **/
      --text-color-accent-primary-selected: light-dark(var(--color-white), var(--color-gray-55));
    }

    @layer tokens-forced-colors-nova {
      @media (forced-colors) {
        /** button **/
        --button-text-color-ghost: ButtonText;
        --button-text-color-ghost-disabled: GrayText;
      }
    }
  }
}
