/*
 * 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-xxs flex h-full w-full flex-col overflow-y-auto select-none;
  }

  .item {
    @apply fg-primary-bold pt-xs pb-xs pr-s pl-s text-body-s bg-surface-default rounded-medium gap-s relative flex cursor-pointer items-center outline outline-transparent;

    @variant hover {
      @apply fg-a11y-on-accent bg-interactive-muted-hover;
    }

    @variant focus-visible {
      @apply fg-a11y-on-accent bg-interactive-muted-hover;
    }

    @variant pressed {
      @apply bg-interactive-muted-pressed;
    }

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

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

      @variant focus-visible {
        @apply outline-2 -outline-offset-2;
      }

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

    @variant disabled {
      @apply cursor-not-allowed bg-transparent;

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

  .content {
    @apply gap-xxs flex min-w-0 flex-auto flex-col;
  }

  .title {
    @apply fg-primary-bold truncate;

    &.compact {
      @apply text-header-s;
    }

    &.cozy {
      @apply text-header-m;
    }

    @variant group-disabled/list-item {
      @apply fg-disabled;
    }
  }

  .description {
    @apply fg-primary-muted truncate;

    &.compact {
      @apply text-body-xs;
    }

    &.cozy {
      @apply text-body-s;
    }

    @variant group-disabled/list-item {
      @apply fg-disabled;
    }
  }
}
