@import '../../lib/commonStyles/full-size';
@import '../../lib/commonStyles/colors.scss';
@import '../../lib/commonStyles/text-ellipsis';

.root {
  position: relative;
  font-size: 13px;
  border: 1px solid #a6a6a6;
  border-radius: 2px;
  color: #797979;
  padding: 0 10px;
}

.noPadding {
  padding: 0 0px;
}

.button {
  position: relative;
  height: 30px;
  line-height: 30px;
  border: 0;
  // margin: 0 10px;
  padding: 0;
  width: 100%;
  outline: medium none !important;
  cursor: pointer;
  text-transform: none;
  background: transparent;
  text-align: left;
  overflow: hidden;

  label {
    float: left;
    width: 50px;
    overflow: hidden;
  }
}

.customInput {
  padding: 0;
  border: none;
  width: inherit;
  line-height: inherit;
  outline: none;
  box-sizing: border-box;
}

.selectedValue {
  margin-left: 0;
  display: block;
  margin-right: 20px;
  color: rgb(0, 0, 0);
}

.icon {
  position: absolute;
  right: 0px;
  top: 0;
}

.iconUp {
  transform: rotate(-180deg);
}

.left {
  text-align: left;
}

.right {
  text-align: right;
}

.center {
  text-align: center;
}

.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0px;
  margin: 0;
  margin-top: 1px;
  z-index: 2;
  width: 100%;
  border-radius: 2px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.175);
  background: #fff;
  max-height: 250px;
  overflow: hidden;
  overflow-y: auto;

  .placeholder:first-child {
    color: #303030;
    font-size: 13px;
    font-weight: bold;

    &:hover {
      color: #303030;
    }
  }
}

.open {
  .dropdown {
    display: block;
  }
}

.disabled {
  color: #777;
  cursor: not-allowed;

  .selectedValue {
    color: #777;
  }
}

.ellipsis {
  @include text-ellipsis;
}

[contenteditable]:focus {
  outline: 0px solid transparent;
}

.inputWithLabel {
  text-align: right;
  padding-right: 34px;
  margin-right: 0;
  // to avoid cover the selected option's label
  padding-left: 39%;
}
.active {
  padding-left: 0;
}

.selectedOptionLabel {
  position: absolute;
  left: 0;
  top: 0;
  width: calc(39% - 8px);
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.selectedOptionLabelHide {
  z-index: -1;
}
