@use "tokens" as *;

// Select múltiple (MultiSelect.vue): hereda toda la estética de .base-select;
// aquí la casilla de check de cada opción y las etiquetas del trigger (las
// elegidas se quitan desde su aspa sin abrir el panel).
.multi-select {
  .base-select__value {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  // El trigger crece con las etiquetas (min-height en vez del alto fijo).
  .base-select__trigger {
    height: auto;
    min-height: $input-height;
    padding-block: 4px;
  }

  // Variante compacta (prop compactTrigger): alto FIJO del select simple y
  // resumen en una línea (el .base-select__value de arriba ya elipsa); las
  // elegidas se pintan fuera (chips del consumidor), no dentro del trigger.
  &--compact .base-select__trigger {
    height: $input-height;
    min-height: 0;
    padding-block: 0;
  }

  &__tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    min-width: 0;
  }

  &__tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    padding: 1px $space-1 1px $space-2;
    border: 1px solid $border;
    border-radius: $radius-sm;
    background: $surface-2;
    font-size: $fs-13;
    line-height: 1.4;
  }

  &__tag-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    color: $text-3;
    cursor: pointer;

    &:hover {
      color: $danger;
    }
  }

  &__option {
    display: flex;
    align-items: center;
    gap: $space-2;
  }

  &__box {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border: 1px solid $border-strong;
    border-radius: $radius-sm;
    color: #fff;

    &.is-checked {
      background: $accent-500;
      border-color: $accent-500;
    }
  }
}
