﻿.select {
  height: 30px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  padding: 0 16px 0 12px;
  outline: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
  &[disabled] {
    opacity: 1;
    background-color: #f5f5f5;
    cursor: not-allowed;
  }
  &:hover {
    border-color: #40a9ff;
  }
  &:not(.no-border):focus {
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
  }
  &.select--large {
    height: 30px;
    min-width: 80px;
  }
  &.select--small {
    height: 24px;
  }
  &.select--mimi {
    height: 20px;
    font-size: 12px;
  }
  & + & {
    margin-left: 6px;
  }
  &.no-border {
    border-top: none;
    border-left: none;
    border-right: none;
  }
}

.custom-select {
  position: relative;
  display: inline-flex;
  align-items: center;

  &::before,
  &::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 7px;
    height: 1px;
    background: rgba(0, 0, 0, 0.25);
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
  }

  &::before {
    right: 14px;
    transform: rotateZ(50deg);
  }
  &::after {
    right: 10px;
    transform: rotateZ(-50deg);
  }

  &.large {
    select {
      height: 30px;
      line-height: 30px;
    }
  }
  &.small {
    select {
      height: 24px;
      line-height: 24px;
    }
  }
  &.mini {
    select {
      height: 20px;
      line-height: 20px;
      font-size: 12px;
    }
  }

  select {
    @extend .select;
    width: 100%;
    padding: 0 24px 0 12px;
    text-overflow: ellipsis;
    word-break: break-all;
    appearance: none;
  }
}

.ghost-select {
  background-color: transparent !important;
  color: currentColor !important;
  & > .ant-select-selector {
    color: inherit !important;
    background-color: inherit !important;
    border-color: inherit !important;
    .ant-select-selection-item {
      color: inherit !important;
    }
  }
  & > .ant-select-arrow {
    color: inherit !important;
  }
}

.btn-icon {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 24px;
  min-width: 24px;
  border-radius: 4px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
  &.disabled {
    cursor: not-allowed;
    color: rgba(0, 0, 0, 0.25);
    pointer-events: none;
  }
  & > * {
    transform: scale(1.143);
  }
  &:not(.disabled):hover {
    background-color: rgba(0, 0, 0, 0.06);
  }
  &:not(.disabled):active {
    background-color: rgba(0, 0, 0, 0.15);
  }
}

.input {
  display: inline-block;
  min-width: 0;
  width: 100%;
  line-height: 1.5714285714285714;
  padding: 4px 12px;
  background-color: #ffffff;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  color: rgba(0, 0, 0, 0.88);
  font-size: 14px;
  transition: all 0.2s;
  outline: 0;
  &:hover {
    border-color: #4096ff;
  }
  &:focus {
    border-color: #4096ff;
    box-shadow: 0 0 0 2px rgba(5, 145, 255, 0.1);
  }
}

.input-indicator {
  margin: 0 1px;
  border-left: 2px solid;
  animation: InputIdentifier 1s linear infinite;
}

@keyframes InputIdentifier {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0;
    display: none;
  }
  100% {
    opacity: 1;
  }
}
