/**
 * @license
 *
 * Copyright IBM Corp. 2025
 *
 * This source code is licensed under the Apache-2.0 license found in the
 * LICENSE file in the root directory of this source tree.
 */

@use '@carbon/styles/scss/spacing' as *;
@use '@carbon/styles/scss/type' as *;
@use '@carbon/react/scss/theme' as *;

$prefix: 'clabs--animated-header__header-action' !default;

.#{$prefix} {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: $spacing-05;
  min-block-size: 2.5rem;

  &::after {
    position: absolute;
    z-index: 2;
    display: block;
    background-color: $border-subtle;
    block-size: $spacing-06;
    content: '';
    inline-size: 0.0625rem;
    inset-inline-end: 0;
  }

  button.cds--btn {
    z-index: 3;
  }

  @media (prefers-reduced-motion: no-preference) {
    transition:
      opacity 500ms linear,
      visibility 500ms linear;
  }

  &[data-expanded='true'] {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
  }

  &[data-expanded='false'] {
    opacity: 0;
    pointer-events: none;
    user-select: none;
    visibility: hidden;
  }
}
