.TextField {
  --caption-margin-left: 0;
  --input-space-left: var(--space-m);
  --counter-button-icon-color: var(--color-control-typo-ghost);
  --counter-button-background: transparent;
  --clear-button-color: var(--color-control-typo-clear);

  position: relative;
  display: -webkit-inline-box;
  display: -ms-inline-flexbox;
  display: inline-flex;
}

  .TextField_width_full {
    width: 100%;
  }

  .TextField_size_xs {
      --input-height: var(--control-height-xs);
      --input-font-size: var(--control-text-size-xs);
      --input-space: calc(var(--control-space-xs) * 0.5);
    }

  .TextField_size_s {
      --input-height: var(--control-height-s);
      --input-font-size: var(--control-text-size-s);
      --input-space: calc(var(--control-space-s) * 0.5);
    }

  .TextField_size_m {
      --input-height: var(--control-height-m);
      --input-font-size: var(--control-text-size-2xl);
      --input-space: calc(var(--control-space-m) * 0.5);
    }

  .TextField_size_l {
      --input-height: var(--control-height-l);
      --input-font-size: var(--control-text-size-l);
      --input-space: calc(var(--control-space-l) * 0.5);
    }

  .TextField_labelPosition_top {
      -webkit-box-orient: vertical;
      -webkit-box-direction: normal;
          -ms-flex-direction: column;
              flex-direction: column;
    }

  .TextField_labelPosition_top > *:not(:last-child) {
        margin-bottom: var(--space-xs);
      }

  .TextField_labelPosition_left {
      -webkit-box-orient: horizontal;
      -webkit-box-direction: normal;
          -ms-flex-direction: row;
              flex-direction: row;
    }

  .TextField_labelPosition_left .TextField-Label {
        display: -webkit-inline-box;
        display: -ms-inline-flexbox;
        display: inline-flex;
        -webkit-box-align: center;
            -ms-flex-align: center;
                align-items: center;
        height: var(--input-height);
      }

  .TextField_labelPosition_left > *:not(:last-child) {
        margin-right: var(--space-s);
      }

  .TextField-Body {
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    width: 100%;
  }

  .TextField-Body .TextField-Caption {
      margin-top: var(--space-2xs);
      margin-left: var(--caption-margin-left);
    }

  .TextField_view_clear .TextField-Caption {
      --caption-margin-left: 0;
    }

  .TextField-InputContainer {
    position: relative;
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-sizing: border-box;
            box-sizing: border-box;
    max-width: 100%;
    min-height: var(--input-height);
    font-family: var(--font-primary);
    font-weight: var(--font-weight-text-regular);
    -webkit-transition: border-color 0.15s, background-color 0.15s, -webkit-box-shadow 0.15s;
    transition: border-color 0.15s, background-color 0.15s, -webkit-box-shadow 0.15s;
    transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
    transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s, -webkit-box-shadow 0.15s;
  }

  .TextField-InputContainer_disabled {
      --counter-button-background: var(--color-control-bg-disable);
      --counter-button-icon-color: var(--color-control-typo-disable);
    }

  .TextField-InputContainer_view_clear,
    .TextField-InputContainer_view_clear:hover,
    .TextField-InputContainer_view_clear:focus {
      padding: 0;
      color: var(--color-control-typo-default);
    }

  .TextField-InputContainer_view_clear.TextField-InputContainer_disabled, .TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled, .TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled {
        pointer-events: none;
      }

  .TextField-InputContainer_view_clear.TextField-InputContainer_disabled .TextField-Input, .TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled .TextField-Input, .TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled .TextField-Input {
          color: var(--color-control-typo-disable);
        }

  .TextField-InputContainer_view_clear.TextField-InputContainer_disabled .TextField-Input:-webkit-autofill,
          .TextField-InputContainer_view_clear.TextField-InputContainer_disabled .TextField-Input:-webkit-autofill:hover,
          .TextField-InputContainer_view_clear.TextField-InputContainer_disabled .TextField-Input:-webkit-autofill:focus,
          .TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled .TextField-Input:-webkit-autofill,
          .TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled .TextField-Input:-webkit-autofill:hover,
          .TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled .TextField-Input:-webkit-autofill:focus,
          .TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled .TextField-Input:-webkit-autofill,
          .TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled .TextField-Input:-webkit-autofill:hover,
          .TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled .TextField-Input:-webkit-autofill:focus {
            -webkit-text-fill-color: var(--color-control-typo-disable);
          }

  .TextField-InputContainer_view_clear.TextField-InputContainer_disabled .TextField-Input::-webkit-input-placeholder, .TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled .TextField-Input::-webkit-input-placeholder, .TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled .TextField-Input::-webkit-input-placeholder {
          color: var(--color-control-typo-disable);
        }

  .TextField-InputContainer_view_clear.TextField-InputContainer_disabled .TextField-Input::-moz-placeholder, .TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled .TextField-Input::-moz-placeholder, .TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled .TextField-Input::-moz-placeholder {
          color: var(--color-control-typo-disable);
        }

  .TextField-InputContainer_view_clear.TextField-InputContainer_disabled .TextField-Input:-ms-input-placeholder, .TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled .TextField-Input:-ms-input-placeholder, .TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled .TextField-Input:-ms-input-placeholder {
          color: var(--color-control-typo-disable);
        }

  .TextField-InputContainer_view_clear.TextField-InputContainer_disabled .TextField-Input::-ms-input-placeholder, .TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled .TextField-Input::-ms-input-placeholder, .TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled .TextField-Input::-ms-input-placeholder {
          color: var(--color-control-typo-disable);
        }

  .TextField-InputContainer_view_clear.TextField-InputContainer_disabled .TextField-Input::placeholder, .TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled .TextField-Input::placeholder, .TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled .TextField-Input::placeholder {
          color: var(--color-control-typo-disable);
        }

  .TextField-InputContainer_view_clear.TextField-InputContainer_disabled .TextField-Side_type_string,
        .TextField-InputContainer_view_clear.TextField-InputContainer_disabled.TextField-InputContainer_withValue .TextField-Side_type_string,
        .TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled .TextField-Side_type_string,
        .TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled.TextField-InputContainer_withValue .TextField-Side_type_string,
        .TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled .TextField-Side_type_string,
        .TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled.TextField-InputContainer_withValue .TextField-Side_type_string {
          color: var(--color-control-typo-disable);
        }

  .TextField-InputContainer_view_clear.TextField-InputContainer_disabled.TextField-InputContainer .TextField-Icon,
        .TextField-InputContainer_view_clear.TextField-InputContainer_disabled.TextField-InputContainer_withValue .TextField-Icon,
        .TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled.TextField-InputContainer .TextField-Icon,
        .TextField-InputContainer_view_clear:hover.TextField-InputContainer_disabled.TextField-InputContainer_withValue .TextField-Icon,
        .TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled.TextField-InputContainer .TextField-Icon,
        .TextField-InputContainer_view_clear:focus.TextField-InputContainer_disabled.TextField-InputContainer_withValue .TextField-Icon {
          color: var(--color-control-typo-disable);
        }

  .TextField-InputContainer_view_outline {
      --container-border-color: var(--color-reach-black);
      --control-border-width: 1px;
      overflow-x: hidden;
      padding: 0 var(--input-space-left);
      color: var(--color-control-typo-default);
      border: var(--control-border-width) solid var(--container-border-color);
      border-radius: var(--control-radius);
      position: relative;
    }

  .TextField-InputContainer_view_outline.TextField-InputContainer_status_alert {
          --container-border-color: var(--color-fire-opal);
        }

  .TextField-InputContainer_view_outline.TextField-InputContainer_status_alert:before {
            content: '';
            position: absolute;
            top: 50%;
            right: 0;
            -webkit-transform: translateY(-50%);
                    transform: translateY(-50%);
            width: 40px;
            height: 40px;
            background-image: url('../../icons/IconFieldError/IconFieldError.svg');
            margin-right: var(--space-xs);
          }

  .TextField-InputContainer_view_default {
      --container-border-color: var(--color-control-bg-border-default);
      overflow-x: hidden;
      padding: 0 var(--input-space);
      color: var(--color-control-typo-default);
      background: var(--color-control-bg-default);
      border: var(--control-border-width) solid var(--container-border-color);
      border-radius: var(--control-radius);
    }

  .TextField-InputContainer_view_default:hover {
        border-color: var(--color-control-bg-border-default-hover);
      }

  .TextField-InputContainer_view_default.TextField-InputContainer_status_alert {
          --container-border-color: var(--color-bg-alert);
        }

  .TextField-InputContainer_view_default.TextField-InputContainer_status_success {
          --container-border-color: var(--color-bg-success);
        }

  .TextField-InputContainer_view_default.TextField-InputContainer_status_warning {
          --container-border-color: var(--color-bg-warning);
        }

  .TextField-InputContainer_view_default .TextField-Input {
        color: var(--color-control-typo-default);
      }

  .TextField-InputContainer_view_default .TextField-Input::-webkit-input-placeholder {
          color: var(--color-control-typo-placeholder);
        }

  .TextField-InputContainer_view_default .TextField-Input::-moz-placeholder {
          color: var(--color-control-typo-placeholder);
        }

  .TextField-InputContainer_view_default .TextField-Input:-ms-input-placeholder {
          color: var(--color-control-typo-placeholder);
        }

  .TextField-InputContainer_view_default .TextField-Input::-ms-input-placeholder {
          color: var(--color-control-typo-placeholder);
        }

  .TextField-InputContainer_view_default .TextField-Input::placeholder {
          color: var(--color-control-typo-placeholder);
        }

  .TextField-InputContainer_view_default .TextField-Input:-webkit-autofill,
        .TextField-InputContainer_view_default .TextField-Input:-webkit-autofill:hover,
        .TextField-InputContainer_view_default .TextField-Input:-webkit-autofill:focus {
          -webkit-text-fill-color: var(--color-control-typo-default);
        }

  .TextField-InputContainer_view_default .TextField-Side_type_string {
          color: var(--color-control-typo-placeholder);
        }

  .TextField-InputContainer_view_default.TextField-InputContainer_focus {
        z-index: 1;
        border-color: var(--color-control-bg-border-focus);
        outline: none;
      }

  .TextField-InputContainer_view_default.TextField-InputContainer_focus.TextField-InputContainer_form_clearClear {
          -webkit-box-shadow: var(--control-border-width) 0
              var(--color-control-bg-border-focus),
            calc(-1 * var(--control-border-width)) 0
              var(--color-control-bg-border-focus);
                  box-shadow: var(--control-border-width) 0
              var(--color-control-bg-border-focus),
            calc(-1 * var(--control-border-width)) 0
              var(--color-control-bg-border-focus);
        }

  .TextField-InputContainer_view_default.TextField-InputContainer_focus.TextField-InputContainer_form_defaultClear,
        .TextField-InputContainer_view_default.TextField-InputContainer_focus.TextField-InputContainer_form_brickClear,
        .TextField-InputContainer_view_default.TextField-InputContainer_focus.TextField-InputContainer_form_roundClear {
          -webkit-box-shadow: var(--control-border-width) 0
            var(--color-control-bg-border-focus);
                  box-shadow: var(--control-border-width) 0
            var(--color-control-bg-border-focus);
        }

  .TextField-InputContainer_view_default.TextField-InputContainer_focus.TextField-InputContainer_form_clearDefault,
        .TextField-InputContainer_view_default.TextField-InputContainer_focus.TextField-InputContainer_form_clearBrick,
        .TextField-InputContainer_view_default.TextField-InputContainer_focus.TextField-InputContainer_form_clearRound {
          -webkit-box-shadow: calc(-1 * var(--control-border-width)) 0
            var(--color-control-bg-border-focus);
                  box-shadow: calc(-1 * var(--control-border-width)) 0
            var(--color-control-bg-border-focus);
        }

  .TextField-InputContainer_view_default.TextField-InputContainer_disabled {
        --clear-button-color: var(--color-control-typo-disable);
        background: var(--color-control-bg-disable);
        border-color: var(--color-control-bg-border-disable);
        pointer-events: none;
      }

  .TextField-InputContainer_view_default.TextField-InputContainer_disabled .TextField-Input {
          color: var(--color-control-typo-disable);
        }

  .TextField-InputContainer_view_default.TextField-InputContainer_disabled .TextField-Input::-webkit-input-placeholder {
          color: var(--color-control-typo-disable);
        }

  .TextField-InputContainer_view_default.TextField-InputContainer_disabled .TextField-Input::-moz-placeholder {
          color: var(--color-control-typo-disable);
        }

  .TextField-InputContainer_view_default.TextField-InputContainer_disabled .TextField-Input:-ms-input-placeholder {
          color: var(--color-control-typo-disable);
        }

  .TextField-InputContainer_view_default.TextField-InputContainer_disabled .TextField-Input::-ms-input-placeholder {
          color: var(--color-control-typo-disable);
        }

  .TextField-InputContainer_view_default.TextField-InputContainer_disabled .TextField-Input::placeholder {
          color: var(--color-control-typo-disable);
        }

  .TextField-InputContainer_view_default.TextField-InputContainer_disabled .TextField-Side_type_string,
        .TextField-InputContainer_view_default.TextField-InputContainer_disabled.TextField-InputContainer_withValue .TextField-Side_type_string {
          color: var(--color-control-typo-disable);
        }

  .TextField-InputContainer_view_default.TextField-InputContainer_disabled.TextField-InputContainer .TextField-Icon,
        .TextField-InputContainer_view_default.TextField-InputContainer_disabled.TextField-InputContainer_withValue .TextField-Icon {
          color: var(--color-control-typo-disable);
        }

  .TextField-InputContainer_type_textarea {
        padding: 0;
      }

  .TextField-InputContainer_type_textarea .TextField-Input {
          padding: var(--space-l) var(--input-space-left);
          min-height: 88px;
        }

  .TextField-InputContainer_form_default {
        border-radius: 2px;
      }

  .TextField-Counter {
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    width: var(--space-xl);
    height: calc(var(--input-height) - (var(--control-border-width) * 2));
  }

  .TextField-CounterButton {
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    overflow-y: hidden;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    -webkit-box-flex: 1;
        -ms-flex: 1;
            flex: 1;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    width: var(--space-xl);
    margin: 0;
    padding: 0;
    color: var(--counter-button-icon-color);
    background-color: var(--counter-button-background);
    border: none;
    cursor: pointer;
    -webkit-transition: background-color 0.15s;
    transition: background-color 0.15s;
  }

  .TextField-ClearButton {
    height: calc(var(--input-height) - (var(--control-border-width) * 2));
    margin: 0;
    margin-left: var(--input-space);
    padding: 0;
    color: var(--clear-button-color);
    background-color: transparent;
    border: none;
    cursor: pointer;
  }

  .TextField-ClearButton:hover {
      --clear-button-color: var(--color-control-typo-clear-hover);
    }

  .TextField-ClearButtonIcon {
    position: relative;
    top: 1px;
  }

  .TextField-Input {
    -webkit-box-flex: 1;
        -ms-flex: 1;
            flex: 1;
    width: 100%;
    min-width: 80px;
    height: calc(var(--input-height) - (var(--control-border-width) * 2));
    padding: 0;
    color: currentColor;
    background: transparent;
    border: none;
    outline: none;
    font-family: var(--font-primary);
    font-size: var(--input-font-size);
  }

  .TextField-Input::-webkit-outer-spin-button,
    .TextField-Input::-webkit-inner-spin-button {
      -webkit-appearance: none;
      margin: 0;
    }

  .TextField-Input[type='number'] {
      -moz-appearance: textfield;
    }

  .TextField-Input:focus {
      outline: none;
    }

  .TextField-Input:-webkit-autofill,
    .TextField-Input:-webkit-autofill:hover,
    .TextField-Input:-webkit-autofill:focus {
      border: none;
      -webkit-box-shadow: 0 0 0 1000px transparent inset;
      -webkit-transition: background-color 5000s ease-in-out 0s;
      transition: background-color 5000s ease-in-out 0s;
    }

  .TextField-Side {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    overflow: hidden;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    height: calc(var(--input-height) - (var(--control-border-width) * 2));
  }

  .TextField-Side_position_left {
        margin-right: var(--input-space);
      }

  .TextField-Side_position_right {
        margin-left: var(--input-space);
      }

  .TextField-Side_type_string {
        font-size: var(--input-font-size);
        white-space: nowrap;
      }

  .TextField-Icon {
    color: var(--color-control-typo-placeholder);
  }
