@use "../../variables/index" as *;

@use "../icons/c8y-glyphs";
@use "../mixins/icon-base";

/**
 * Caret Icons - Dropdown arrow indicators
 *
 * Note: Uses $size-4, $size-5 for positioning and $form-control-icon-color for color.
 *
 * Intentionally hardcoded values:
 * - -2px margin: Fine-tuning vertical alignment
 * - 0.8em width: Relative sizing for icon container
 * - 18px font-size: Icon size
 * - Transform values: Positioning calculations
 */

// Dropdown arrow caret
.caret {
  position: relative;
  display: inline-block;
  margin-top: -2px;
  width: 0.8em;
  vertical-align: inherit;
  &:after {
    position: absolute;
    top: 50%;
    left: $size-4;
    z-index: 2;
    color: $form-control-icon-color;
    content: c8y-glyphs.$c8y-glyph-caret;
    font-size: 18px;
    transform: translate(0, -50%);
    pointer-events: none;
    @include icon-base.c8y-glyph;
  }
}

.dropdown-caret:after {
  position: absolute;
  top: 50%;
  right: $size-5;
  z-index: 2;
  color: $form-control-icon-color;
  content: c8y-glyphs.$c8y-glyph-caret;
  font-size: 18px;
  transform: translate(0, -50%);
  pointer-events: none;
  @include icon-base.c8y-glyph;
}