.pisell-base-virtual-input {
  overflow: hidden;
  display: flex;
  align-items: center;
  background-color: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  position: relative;
  height: var(--virtual-input-height);
  user-select: none;

  &--disabled {
    cursor: not-allowed;
    opacity: 0.6;
  }

  &--center {
    justify-content: center;
  }

  &--end {
    justify-content: flex-end;
  }
}

.pisell-base-virtual-input-placeholder {
  color: #98a2b3;
  font-weight: 400;
  user-select: none;
  position: absolute;
  left: 0;
  top: 0;
  max-width: 100%;
  overflow: hidden;
  pointer-events: none;
  font-size: var(--virtual-input-font-size);
  height: var(--virtual-input-height);
  line-height: var(--virtual-input-height);

  &--end {
    text-align: right;
  }

  &--center {
    text-align: center;
  }
}

.pisell-base-virtual-input-value {
  padding-left: 2px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  max-width: 100%;
  overflow-y: hidden;
  overflow-x: auto;
  font-size: var(--virtual-input-font-size);
  line-height: var(--virtual-input-height);
  height: var(--virtual-input-height);

  -ms-overflow-style: none; /* IE 和 Edge */
  scrollbar-width: none; /* Firefox */
  &::-webkit-scrollbar {
    display: none; /* Chrome, Safari 和 Opera */
  }
}

.pisell-base-virtual-input-caret-container {
  height: 100%;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.pisell-base-virtual-input-caret {
  width: 2px;
  height: var(--virtual-input-caret-height);
  background-color: var(--color-primary, #5d3f9f);
  border-radius: 1px;
  animation: pisell-base-virtual-input-caret-blink 1s infinite;
}

@keyframes pisell-base-virtual-input-caret-blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

// 选中状态样式
.pisell-base-virtual-input--selected {
  .pisell-base-virtual-input-value--selected {
    position: relative;
    z-index: 0;
    color: white;

    &::before {
      content: '';
      position: absolute;
      top: 50%;
      left: -2px;
      right: -1px;
      transform: translateY(-50%);
      height: 1.2em;
      background-color: var(--color-primary, #5d3f9f);
      pointer-events: none;
      z-index: -1;
    }
  }
}
