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

/* Lightning Blue theme: icon hook assignments */

@layer theme {
  .slds-icon_container {
    --slds-c-icon-radius-border: var(--slds-g-radius-border-2);
  }

  .slds-icon_container_circle {
    --slds-c-icon-radius-border: var(--slds-g-radius-border-circle);
    --slds-c-icon-spacing-block: var(--slds-g-spacing-2);
    --slds-c-icon-spacing-inline: var(--slds-g-spacing-2);
  }

  .slds-icon {
    --slds-c-icon-size: var(--slds-g-sizing-9);
    --slds-c-icon-color-foreground: var(--slds-g-color-neutral-base-100);

    /* Size modifiers */
    &.slds-icon_xxx-small {
      --slds-c-icon-size: var(--slds-g-sizing-3);
    }

    &.slds-icon_xx-small {
      --slds-c-icon-size: calc(var(--slds-g-sizing-1) + var(--slds-g-sizing-4));
    }

    &.slds-icon_x-small {
      --slds-c-icon-size: var(--slds-g-sizing-5);
    }

    &.slds-icon_small {
      --slds-c-icon-size: var(--slds-g-sizing-7);
    }

    &.slds-icon_large {
      --slds-c-icon-size: var(--slds-g-sizing-10);
    }

    /* Text color modifiers */
    &.slds-icon-text-warning {
      --slds-c-icon-color-foreground: var(--slds-g-color-warning-1);
    }

    &.slds-icon-text-success {
      --slds-c-icon-color-foreground: var(--slds-g-color-success-1);
    }

    &.slds-icon-text-error {
      --slds-c-icon-color-foreground: var(--slds-g-color-error-1);
    }

    &.slds-icon-text-light {
      --slds-c-icon-color-foreground: var(--slds-g-color-neutral-base-70);
    }

    &.slds-icon-text-default {
      --slds-c-icon-color-foreground: var(--slds-g-color-on-surface-1);
    }

    &.slds-icon-text-default.slds-is-disabled {
      --slds-c-icon-color-foreground: var(--slds-g-color-disabled-1);
    }

    /*
     * Removed: `.slds-input__icon` hook writes. Those `--slds-c-icon-input-*`
     * hooks were read only by `themes/base.css`'s nested `.slds-input__icon`
     * block, which is also gone. `icon.css` paints `.slds-input__icon`
     * directly with the same values.
     */
  }

  /*
   * Removed: action-variant descendant hook writes on `.slds-icon`.
   * Custom-property inheritance flows down, but the radius/spacing
   * readers live on the ancestor `.slds-icon_container`, so the writes
   * never reached them. `icon.css`'s unlayered action-container hook
   * write keeps the historical circle radius for this theme.
   */
}
