/**
 * 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/theme' as *;
@use '@carbon/styles/scss/colors' as *;
@use '@carbon/styles/scss/spacing' as *;
@use '@carbon/styles/scss/motion' as *;

$prefix: 'clabs' !default;

.#{$prefix}__resizer {
  position: relative;
  flex: none;
  background-color: $border-subtle;

  &:hover {
    @media (prefers-reduced-motion: no-preference) {
      background-color: $border-interactive;
      transition: background-color $duration-moderate-01;
    }
  }

  &:focus {
    background-color: $border-interactive;
    outline: none;
  }

  &:active {
    background-color: $border-interactive;
  }

  &:focus:not(:focus-visible) {
    box-shadow: none;
    outline: none;
  }

  &--horizontal {
    cursor: ns-resize;
  }

  &--vertical {
    cursor: ew-resize;
  }
}

.sr-only {
  position: absolute;
  overflow: hidden;
  padding: 0;
  border: 0;
  margin: -1px;
  block-size: 1px;
  clip: rect(0, 0, 0, 0);
  inline-size: 1px;
  white-space: nowrap;
}

// add transitions to panel resizes
.smooth-resize {
  @media (prefers-reduced-motion: no-preference) {
    transition: all $duration-moderate-01 linear;
  }
}
