/*
 * Copyright (c) 2026, Salesforce, Inc.,
 * All rights reserved.
 * For full license text, see the LICENSE.txt file
 */

@layer theme {
  .slds-popover_tooltip {
    /* Sizing */
    --slds-c-tooltip-sizing-max-width: var(--slds-g-sizing-15);

    /* Surface */
    --slds-c-tooltip-color-background: var(--slds-g-color-surface-inverse-1);
    --slds-c-tooltip-color-foreground: var(--slds-g-color-on-surface-inverse-1);
    --slds-c-tooltip-shadow: var(--slds-g-shadow-3);

    /* Typography */
    --slds-c-tooltip-font-size: var(--slds-g-font-scale-neg-1);
  }

  /* Forward: tooltips paint on an inverse surface, so the nested
     icon's foreground hook gets reassigned to the on-inverse color.
     The leftmost compound is `.slds-popover_tooltip` (tooltip's own
     root), so the cross-component descendant write rides the
     own-scope carveout. */
  .slds-popover_tooltip .slds-icon-text-default {
    --slds-c-icon-color-foreground: var(--slds-g-color-on-surface-inverse-1);
  }
}
