

// placeholder
// --------------------------------

::placeholder
{
  color: var(--color-input-placeholder);
}


// inputs
// --------------------------------

input[type="text"], input[type="color"], input[type="date"], input[type="datetime"], input[type="email"], input[type="file"], input[type="month"], input[type="number"],
input[type="password"], input[type="range"], input[type="search"], input[type="tel"], input[type="time"], input[type="url"], input[type="week"],
textarea, .ui-native-select, .ui-rte-input, .flatpickr-current-month
{
  font-family: var(--font);
  background: var(--color-input);
  border: var(--color-input-border);
  font-size: var(--font-size);
  display: inline-block;
  height: 48px; 
  padding: 6px 16px;
  line-height: 1.5;
  color: var(--color-text);
  border-radius: var(--radius-inner);
  vertical-align: middle;
  box-sizing: border-box;
  width: 100%;

  &:not(:disabled):not([readonly]):focus 
  {
    background-color: var(--color-input-focus-bg);
    border: var(--color-input-focus-border);
    box-shadow: var(--color-input-focus-shadow);
    outline: none;
  }
}

select:focus
{
  /*background-color: #fff;
  border: 1px solid var(--color-line-onbg);
  box-shadow: 0 0 0 4px var(--color-input);*/
  outline: none;
}


// textarea
// --------------------------------

textarea
{
  resize: vertical;
  min-height: 80px;
}


// select
// --------------------------------

.ui-native-select, .flatpickr-current-month
{
  position: relative;
  font-size: var(--font-size);

  select
  {
    font-family: var(--font);
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    width: 100%;
    padding-left: 9px;
    -webkit-appearance: none;
    border: none;
    font-size: var(--font-size);
    background: none;
    border: 1px solid transparent;
    color: var(--color-text);
    border-radius: var(--radius-inner);
  }

  select:focus
  {
    background-color: var(--color-input-focus-bg);
    border: var(--color-input-focus-border);
    box-shadow: var(--color-input-focus-shadow);
    outline: none;
  }

  &:after
  {
    font-family: var(--font-icon);
    content: "\e842";
    position: absolute;
    right: 12px;
    top: 0;
    height: 48px;
    line-height: 46px;
  }

  &[disabled], &[readonly]
  {
    min-height: 23px;

    &:after
    {
      display: none;
    }

    /*select
    {
      text-indent: -2px;
      padding-left: 0;
    }*/
  }
}


// checkbox
// --------------------------------

.ui-native-check
{
  position: relative;
  top: 1px;
  font-size: var(--font-size);
  cursor: pointer;
  display: flex;
  align-items: center;
  line-height: 1;

  input
  {
    width: 0;
    height: 0;
    opacity: 0;
    position: absolute;
    left: 0;
    overflow: hidden;
    visibility: hidden;
    -webkit-appearance: none;
    border: none;
  }

  .is-disabled &
  {
    cursor: default;
  }
}

.ui-native-check-toggle
{
  display: inline-block;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  border-radius: 3px;
  border: 1px solid transparent;
  background: var(--color-check);
  margin-right: 10px;
  position: relative;
  top: -1px;

  .onbg :not(input:checked) ~ &
  {
    background: var(--color-bg-shade-1);
    box-shadow: var(--shadow-short);
  }

  &:before
  {
    content: "\e83f";
    font-family: var(--font-icon);
    color: transparent;
    font-size: var(--font-size-s);
  }

  input:focus ~ &
  {
    background: var(--color-checked) !important;
    border: var(--color-input-focus-border);
    box-shadow: var(--color-input-focus-shadow);
    outline: none;
  }

  input:checked ~ &
  {
    background: var(--color-checked);

    &:before
    {
      color: var(--color-checked-fg);
    }
  }
}