@import './colors.scss';

input[type='text'],
input[type='search'],
input[type='tel'],
input[type='email'],
input[type='password'],
input[type='number'] {
  font-size: 14px;
  height: 46px;
  border-radius: 4px;
  border: solid 1px color('blue-mid');
  padding: 16px;
  width: 100%;
}

input[type='text']:hover,
input[type='search']:hover,
input[type='tel']:hover,
input[type='email']:hover,
input[type='password']:hover,
input[type='number']:hover {
  border-color: color('electrolux-blue');
  outline: none;
}

input[type='text']:focus-visible,
input[type='search']:focus-visible,
input[type='tel']:focus-visible,
input[type='email']:focus-visible,
input[type='password']:focus-visible,
input[type='number']:focus-visible {
  border-color: color('electrolux-blue');
  outline: none;
}

input[type='search'] {
  padding-left: 45px;
  box-sizing: border-box;
  background-image: url('../icons/Search.svg');
  background-repeat: no-repeat;
  background-position: 10px center;
  background-size: 28px 28px;
}

input[type='file'] {
  font-size: 0;
  width: 1px;
  height: 1px;
  left: 0;
  position: fixed;
  opacity: 0;
  bottom: 0;
}

input[type='date'] {
  appearance: none;
}

input[type='checkbox'] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #ccc;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}

input[type='checkbox']:checked {
  background-color: color('electrolux-blue');
  border-color: color('electrolux-blue');
}

input[type='checkbox']:disabled {
  background-color: color('blue-ligth');
  border-color: color('blue-ligth');
}

input[type='checkbox']:checked::before {
  content: '\2713';
  font-size: 16px;
  color: color('white');
  position: relative;
  top: -4px;
  left: 3px;
}

input[type='radio'] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  outline: none;
  cursor: pointer;
  position: relative;
  border: 1px solid color('electrolux-blue') !important;
}

input[type='radio']:checked::before {
  content: '';
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: color('electrolux-blue');
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

input[type='radio']:disabled {
  cursor: not-allowed;
  background-color: color('blue-tint');
  border: 1px solid color('blue-ligth') !important;
}

input[type='radio']:disabled:checked::before {
  background-color: color('blue-ligth');
}

input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type='number'] {
  -moz-appearance: textfield;
}

input.ng-invalid.ng-touched {
  border-color: red;
}
