.labeled-input {
  position: relative;
  display: table;
  border-collapse: separate;
  min-height: $input-height;
  width: $input-width;
  // flex: 1;
  z-index: 0; // Prevent label from cover other elements outside of the input
  height: $input-height;

  &.compact-input {
    min-height: $unlabeled-input-height;
    // padding: 0 10px;

    INPUT.no-label {
      line-height: $input-line-height;
    }
  }

  LABEL {
    position: absolute;
    transform: translate(0, -10px) scale(1);
    transform-origin: top left;
    transition-property: transform, font-size;
    transition-duration: 0.1s;
    transition-timing-function: ease-in-out;
    color: var(--input-label);
    pointer-events: none;
    width: calc(100% - 20px);

    i {
      pointer-events: initial
    }
  }

  .corner {
    top: 5px;
    right: 10px;
    margin: 0;
    padding: 0;
    text-align: right;
    z-index: 3;
    transform: none !important;
  }

  .required {
    color: var(--error);
  }

  INPUT,
  SELECT {
    position: relative;
    font-size: 12px;
    display: block;
    width: 100%;
  }

  SELECT.empty {
    color: var(--input-placeholder);
  }

  SELECT {
    -webkit-appearance: textfield;
    user-select: none;
  }

  INPUT, INPUT:hover, INPUT:focus,
  TEXTAREA, TEXTAREA:hover, TEXTAREA:focus,
  SELECT, SELECT:hover, SELECT:focus {
    border: none;
    background-color: transparent;
    outline: 0;
    box-shadow: none;
    padding: 0 0 0 0;
    // line-height: calc(#{$input-line-height} + 1px);
    line-height: calc(29px + 1px);
    // border: solid var(--border-width) var(--input-border);
    padding: 0px 11px;
    box-sizing: border-box;
    border-radius: 2px;

    &:hover{
      border-color: var(--input-border);
      box-shadow: 0 4px 6px 0 var(--input-border-box-shadow);
    }
    &.no-label {
      // padding: $input-padding-sm 0px $input-padding-sm 0px;
    }
  }

  &.view>DIV:not(.addon) {
    font-size: 14px;
    padding: $input-padding-lg 0 0 0;

    &.no-label {
      padding-top: 0px;
    }
  }

  &.create,
  &.edit,
  &.view {

    .addon,
    .addon.btn {
      display: table-cell;
      align-items: center;
      justify-content: center;
      white-space: nowrap;
      vertical-align: middle;
      color: #{$secondary};
    }

    .addon {
      // padding: 6px 12px;
      // font-size: 14px;
      // font-weight: normal;
      // line-height: 1;
      // text-align: center;
      // border-left: solid thin var(--input-border);
      padding: 4px 0px 4px 4px;
      font-size: 12px;
      font-weight: normal;
      line-height: 1;
      text-align: center;
      position: absolute;
      top: 5px;
      right: 5px;
      // background-color: #fff;
    }
  }

  &.suffix INPUT {
    padding-right: 0px;
    width: $input-width;
  }

  .cron-label,
  .sub-label {
    position: absolute;
    top: 100%;
    width: 100%;
    // padding-top: 5px;
    padding-top: 0px;
    left: 0;
    width: 400px !important;
    color: var(--outline);
    // color: var(--input-label);
    pointer-events:initial;
  }

  .validation-message,
  .sub-label.validation-message {
    color: var(--error);
  }
}

.TEXTAREA, TEXTAREA:hover, TEXTAREA:focus{
  border: solid var(--border-width) var(--input-border);
}

@media(max-width:1400px) {
  .labeled-input{
    &.suffix INPUT {
      width: 370px;
    }
  }
}
