/*
 * Copyright 2026 Hypergiant Galactic Systems Inc. All rights reserved.
 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License. You may obtain a copy
 * of the License at https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under
 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
 * OF ANY KIND, either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 */

@reference '@accelint/design-foundation/styles';

@layer components.l1 {
  .list {
    @apply gap-xs flex w-fit flex-wrap;
  }

  .chip {
    @apply fg-primary-bold gap-xxs inline-flex w-fit items-center justify-center rounded-full outline;

    @variant size-medium {
      @apply px-s py-xs text-body-s;
    }

    @variant size-small {
      @apply px-s py-xs text-body-xs;
    }

    @variant color-info {
      @apply bg-info-muted outline-info-bold;
    }

    @variant color-advisory {
      @apply bg-advisory-muted outline-advisory-bold;
    }

    @variant color-normal {
      @apply bg-normal-muted outline-normal-bold;
    }

    @variant color-serious {
      @apply bg-serious-muted outline-serious-bold;
    }

    @variant color-critical {
      @apply bg-critical-muted outline-critical-bold;
    }
  }

  .selectable {
    @apply outline-interactive cursor-pointer select-none;

    @variant hover {
      @apply outline-interactive-hover outline-2;
    }

    @variant focus-visible {
      @apply outline-interactive-hover outline-2;
    }

    @variant pressed {
      @apply outline-accent-primary-pressed outline-1;
    }

    @variant selected {
      @apply bg-accent-primary-muted outline-accent-primary-bold;

      @variant hover {
        @apply outline-accent-primary-bold;
      }

      @variant focus-visible {
        @apply outline-accent-primary-bold;
      }

      @variant pressed {
        @apply outline-accent-primary-pressed;
      }
    }

    @variant disabled {
      @apply fg-disabled outline-interactive-disabled cursor-not-allowed;

      @variant selected {
        @apply bg-interactive-disabled;
      }
    }
  }

  .deletable {
    @apply gap-xs outline-interactive fg-primary-muted cursor-default select-none;

    @variant has-group-hover/button {
      @apply fg-hover;
    }

    @variant has-group-focus-visible/button {
      @apply fg-hover;
    }

    @variant has-group-pressed/button {
      @apply fg-pressed;
    }

    @variant disabled {
      @apply fg-disabled bg-interactive-disabled outline-interactive-disabled cursor-not-allowed;
    }
  }
}

@layer components.l2 {
  .remove {
    @apply rounded-full p-0;

    @variant hover {
      @apply fg-hover;
    }

    @variant focus-visible {
      @apply fg-primary-bold bg-transparent;
    }

    @variant pressed {
      @apply fg-pressed;
    }
  }
}
