/*
 * 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 {
  .group {
    @apply gap-xs flex;

    @variant orientation-horizontal {
      @apply flex-wrap;
    }

    @variant orientation-vertical {
      @apply flex-col;
    }

    > .label {
      @apply w-full;
    }
  }

  .checkbox {
    @apply gap-m flex cursor-pointer items-center;
    scroll-margin: 0 !important;
    scroll-padding: 0 !important;

    &.labelStart {
      .label {
        order: -1;
      }
    }

    @variant disabled {
      @apply cursor-not-allowed;
    }

    @variant group-orientation-horizontal/checkbox-group {
      @apply grow basis-1/3;
    }

    .label {
      @apply fg-primary-bold text-body-s;

      @variant group-disabled/checkbox {
        @apply fg-disabled;
      }
    }
  }

  .control {
    @apply size-l rounded-small outline-interactive fg-info-bold my-xxs flex items-center justify-center outline;

    @variant group-hover/checkbox {
      @apply outline-interactive-hover;
    }

    @variant group-focus-visible/checkbox {
      @apply outline-interactive-hover;
    }

    @variant group-pressed/checkbox {
      @apply outline-interactive-pressed;
    }

    @variant group-disabled/checkbox {
      @apply fg-disabled outline-interactive-disabled;
    }

    @variant group-indeterminate/checkbox {
      @apply fg-a11y-on-accent bg-accent-primary-bold outline-accent-primary-bold;

      @variant group-hover/checkbox {
        @apply bg-accent-primary-hover outline-accent-primary-hover;
      }

      @variant group-focus-visible/checkbox {
        @apply bg-accent-primary-hover outline-accent-primary-hover;
      }

      @variant group-pressed/checkbox {
        @apply bg-accent-primary-pressed outline-accent-primary-pressed;
      }

      @variant group-disabled/checkbox {
        @apply bg-interactive-disabled;
      }
    }

    @variant group-selected/checkbox {
      @apply fg-a11y-on-accent bg-accent-primary-bold outline-accent-primary-bold;

      @variant group-hover/checkbox {
        @apply bg-accent-primary-hover outline-accent-primary-hover;
      }

      @variant group-focus-visible/checkbox {
        @apply bg-accent-primary-hover outline-accent-primary-hover;
      }

      @variant group-pressed/checkbox {
        @apply bg-accent-primary-pressed outline-accent-primary-pressed;
      }

      @variant group-disabled/checkbox {
        @apply bg-interactive-disabled;
      }
    }
  }
}
