input[type="checkbox"] {
  accent-color: $secondary-color;
}

.oh-input {
  border: 1px solid $border-color;
  border-radius: 0rem;
  padding: 0.8rem 1.25rem;
  color: $text-color;

  &:read-only {
    border: none;
    &:focus,
    &:focus-visible {
      outline: none;
      border: none !important;
    }
  }
}
.oh-input,
select {
  &::placeholder {
    color: $placeholder-color;
    @media (max-width: 575.98px) {
      font-size: 0.8rem;
    }
  }

  &:focus,
  &:focus-visible {
    outline: $brand-color solid 1px;
    border: 1px solid $brand-color !important;
  }
}
.oh-input--textarea {
  width: 100%;
  padding: 0.8rem 1.25rem !important;
}
.oh-input:disabled {
  background-color: transparent;
  padding-left: 0px;
  padding-right: 0px;
}
.oh-input--small {
  padding: 0.25rem 0.8rem;
  font-size: 0.85rem;
}
.oh-input--filter,
.oh-dropdown__filter-body
  .oh-select--sm
  + .select2-container
  .select2-selection--single {
  font-size: 0.85rem !important;
  height: 28px !important;
}
.oh-input--res-height {
  height: 38px;
}
.oh-input--block {
  width: 100%;
}
.oh-input__icon {
  padding-left: 28px;
}
.oh-input-group {
  position: relative;
}
.oh-input-group__icon {
  position: relative;
  color: $icon-grey;
}
.oh-input-group__icon--left {
  top: 3px;
  left: 30px;
}
.oh-input__search-group {
  @media (max-width: 1000px) {
    display: none;
    position: absolute;
    padding: 15px;
    background: white;
    z-index: 99;
    right: 0;
    top: 150px;
    border-radius: 0rem;
  }
}
.oh-input__search-group--show {
  @media (max-width: 1000px) {
    display: block !important;
  }
}
.oh-select {
  border: 1px solid $border-color;
  padding: 0.3rem 0.8rem 0.3rem 0.3rem;
  border-radius: 0rem;
  background-color: #fff;
}
.oh-select--sm,
.oh-select--xs-forced {
  font-size: 0.8rem;
  padding-top: 0.25rem;
}
.oh-select--xs-forced
  + .select2-container
  .select2-selection.select2-selection--single {
  height: 29.03px !important;
  font-size: 0.8rem !important;
}
.oh-select--xs + .select2-container .select2-selection--single {
  height: 29.03px !important;
  font-size: 0.8rem !important;
}
.oh-select--xs + .select2.select2-container .select2-selection__choice {
  font-size: 0.8rem !important;
}
.oh-select--dropdown {
  width: 100%;
  padding: 0.35rem 0.25rem;
  margin-top: 0.5rem;
  margin-bottom: 0.15rem;
  font-size: 0.9rem;
  border-radius: 0rem;
  height: 32px;
  &:first-child {
    margin-top: 0;
  }
  &:last-child {
    margin-bottom: 0;
  }
}
.oh-input--dropdown {
  width: 100%;
  font-size: 0.9rem;
  padding: 0.35rem 0.25rem;
  border-radius: 0rem;
  margin-top: 0.6rem;
  height: 32px;
}
.oh-input__label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  margin-top: 1rem;
}
.oh-label {
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  margin-top: 1rem;
}
.oh-info {
  display: flex;
  align-items: center;
  position: relative;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIGZpbGw9IiM5YzljOWMiIHZpZXdCb3g9IjAgMCAyNCAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEyIDJDNi40ODYgMiAyIDYuNDg2IDIgMTJzNC40ODYgMTAgMTAgMTAgMTAtNC40ODYgMTAtMTBTMTcuNTE0IDIgMTIgMlptMSAxNWgtMnYtNmgydjZabTAtOGgtMlY3aDJ2MloiPjwvcGF0aD4KPC9zdmc+");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  cursor: pointer;
}
.oh-label__info {
  display: flex;
  align-items: center;
}
.oh-label--question {
  display: block;
  font-weight: bold;
}

.oh-editable-input {
  width: auto;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  background-color: transparent;
}
select.oh-select--lg {
  padding: 0.8rem 1.25rem 0.8rem 0.25rem;
}

// Picker Input
.oh-input-picker-group {
  display: flex;
  align-items: center;
}
.oh-input-picker-group--resp {
  @media (max-width: 767.98px) {
    flex-direction: column;
  }
}
.oh-input-picker {
  display: inline-block;
  padding: 10px;
  border: 1px solid $border-light-color;
  cursor: pointer;
  input {
    display: none;
  }

  &:first-child {
    border-radius: 0rem 0rem 0rem 0rem;
    border-right: none;
  }
  &:last-child {
    border-radius: 0rem 0rem 0rem 0;
    border-left: none;
  }
}
.oh-input-picker--sm {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.oh-input-picker--likert {
  font-size: 0.85rem;
  padding-left: 1.25rem;
  padding-right: 1.25rem;

  @media (max-width: 767.98px) {
    width: 100%;
    text-align: center;
  }
}
.oh-input-picker--1.oh-input-picker--selected {
  background-color: $danger-color;
}
.oh-input-picker--2.oh-input-picker--selected {
  background-color: $orange;
}
.oh-input-picker--3.oh-input-picker--selected {
  background-color: $yellow;
}
.oh-input-picker--4.oh-input-picker--selected {
  background-color: $green;
}
.oh-input-picker--5.oh-input-picker--selected {
  background-color: $success-color-dark;
}
.oh-input-picker--selected {
  background-color: $secondary-color;
  color: $white;
}
.oh-input-picker-selected {
  border: 1px solid $border-light-color;
}
.oh-input--file {
  padding: 1rem;
}
.oh-input--file-sm {
  max-width: 250px;
}
// Image Select2
.oh-select-image ~ .select2-container .select2-container--default,
.oh-select-image ~ .select2-container .select2-selection--single {
  border: none;
}
.oh-select-image__img {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 50%;
}
// Select2 Override
.select2-dropdown {
  border-radius: 0rem;
  box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 2px 0px;
}
.select2-container--open .select2-dropdown--above {
  top: -10px;
}
.select2-container--open .select2-dropdown--below {
  top: 10px;
}
.select2-container--open .select2-dropdown--below,
.select2-container--open .select2-dropdown--above {
  border: 1px solid $border-light-color;
  border-top-left-radius: 0.25rem !important;
  border-top-right-radius: 0.25rem !important;
  border-bottom-left-radius: 0.25rem !important;
  border-bottom-right-radius: 0.25rem !important;
}
.select2-results__option--selected {
  background-color: $border-light-color !important;
}
.select2-results__option--highlighted {
  background-color: rgba($border-light-color, 0.5) !important;
  color: $text-color !important;
}
.oh-select-no-search + .select2-container,
.oh-select-2 + .select2-container {
  width: 100% !important;
}
.oh-select-no-search + .select2-container .select2-selection--single,
.oh-select-2 + .select2-container .select2-selection.select2-selection--single {
  border: 1px solid $border-light-color;
  // padding: 0.8rem 1.25rem;
  height: 48.54px !important;
  display: flex;
  align-items: center;

  &:focus,
  &:focus-visible,
  &:active {
    border: 2px solid $brand-color !important;
  }
}
.select2-search__field {
  border-radius: 0px !important;

  // &:focus, &:focus-visible{
  //   outline: $brand-color solid 2px !important;
  // }
}
.select2-container--open .select2-selection {
  border-radius: 0rem !important;
}

.oh-select-no-search + .select2-container .select2-selection__arrow,
.select2-container--default
  .select2-selection--single
  .select2-selection__arrow {
  display: block;
  height: 100% !important;
}

.oh-select-no-search + .select2-container .select2-selection__rendered {
  height: 100%;
  display: flex !important;
  align-items: center !important;
}

.oh-select-image + .select2-container .select2-selection__rendered {
  height: unset !important;
}

.select2-results__option {
  padding: 0.4rem;
}

.select2-selection__arrow {
  height: 100%;
}
.oh-select:disabled + .select2-container,
.oh-select:disabled + .select2-container .select2-selection__rendered {
  padding-left: 0px !important;
  padding-right: 0px !important;
}

.oh-select:disabled + .select2-container .select2-selection {
  background-color: transparent !important;
  border: none !important;
}
.oh-select:disabled
  + .select2-container
  .select2-selection
  .select2-selection__arrow {
  display: none !important;
}
.oh-select-no-search + .select2-container .select2-selection--single {
  height: unset;
  padding-top: 0.25rem !important;
  padding-bottom: 0.25rem !important;
}
.select2-container--default .select2-selection--single {
  border-radius: 0px !important;
  border-color: $border-color !important;
}
.oh-select-no-search + .select2-container .select2-selection--single {
  height: 48.84px;
}
.oh-select--sm + .select2-container .select2-selection--single {
  height: 38px !important;
}

.oh-select-no-search + .select2-container,
.select2-container--default .select2-selection--multiple {
  border-radius: 0px !important;
  border-color: $border-color !important;
}
.select2-container--default
  .select2-selection--multiple
  .select2-selection__choice {
  background-color: $white !important;
  background: $white !important;
  border-color: $border-color !important;
  border-radius: 0px !important;
}

/* =================================
*     CHECKBOXES AND SWITCHES
* ================================ */
.oh-switch {
  display: flex;
  align-items: center;
}
.oh-switch .oh-switch__checkbox {
  appearance: none;
  background-color: #dfe1e4;
  border-radius: 72px;
  border-style: none;
  flex-shrink: 0;
  height: 20px;
  margin: 0;
  position: relative;
  width: 30px;
  display: inline-block;
  cursor: pointer;
}

.oh-switch .oh-switch__checkbox::before {
  bottom: -6px;
  content: "";
  left: -6px;
  position: absolute;
  right: -6px;
  top: -6px;
}

.oh-switch .oh-switch__checkbox,
.oh-switch .oh-switch__checkbox::after {
  transition: all 100ms ease-out;
}
.oh-select-2--large + .select2-container .select2-selection--multiple {
  height: 48.84px;
}
.oh-switch .oh-switch__checkbox::after {
  background-color: #fff;
  border-radius: 50%;
  content: "";
  height: 14px;
  left: 3px;
  position: absolute;
  top: 3px;
  width: 14px;
}

.oh-switch input[type="checkbox"] {
  cursor: default;
}

.oh-switch .oh-switch__checkbox:hover {
  background-color: #c9cbcd;
  transition-duration: 0s;
}

.oh-switch .oh-switch__checkbox:checked {
  background-color: $secondary-color;
}

.oh-switch .oh-switch__checkbox:checked::after {
  background-color: #fff;
  left: 13px;
}

.oh-switch :focus:not(.focus-visible) {
  outline: 0;
}

.oh-switch .oh-switch__checkbox:checked:hover {
  background-color: $secondary-color;
}

// Password Input
.oh-password-input-container {
  position: relative;
}
.oh-password-input--toggle {
  position: absolute;
  top: 1px;
  right: 1px;
  height: 100%;
  font-size: 1.25rem;
}

/* ===============================
*     RADIO, ANSWERS & oh-rate
* ==============================*/
.oh-questions {
  padding-left: 0;
  list-style-type: none;
}

.oh-radio {
  display: block;
  position: relative;
  padding-left: 20px;
  cursor: pointer;
  font-size: 22px;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.oh-radio input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  left: 0;
  top: 9px;
  z-index: 5;
}

.oh-radio__checkmark {
  position: absolute;
  top: 9px;
  left: 0;
  height: 16px;
  width: 16px;
  background-color: #eee;
  border-radius: 50%;
  z-index: initial;
}

.oh-radio:hover input ~ .oh-radio__checkmark {
  background-color: $border-light-color;
}

.oh-radio input:checked ~ .oh-radio__checkmark {
  background-color: $secondary-color;
}

.oh-radio__checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.oh-radio input:checked ~ .oh-radio__checkmark:after {
  display: block;
}

.oh-radio .oh-radio__checkmark:after {
  top: 4.5px;
  left: 4.5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: white;
}

.oh-radio .oh-label {
  margin-top: 0px !important;
  margin-bottom: 0px !important;
  cursor: pointer;
}

// Rating
.oh-rate {
  display: inline-block;
  height: 36px;
  padding: 0;
}
.oh-rate:not(:checked) > input {
  position: absolute;
  top: -9999px;
}
.oh-rate:not(:checked) > label {
  float: right;
  width: 1.15em;
  overflow: hidden;
  white-space: nowrap;
  cursor: pointer;
  font-size: 1.25rem;
  color: #ccc;
}
.oh-rate:not(:checked) > label:before {
  content: "★ ";
}
.oh-rate > input:checked ~ label {
  color: #ffc700;
}
.oh-rate:not(:checked) > label:hover,
.oh-rate:not(:checked) > label:hover ~ label {
  color: #deb217;
}
.oh-rate > input:checked + label:hover,
.oh-rate > input:checked + label:hover ~ label,
.oh-rate > input:checked ~ label:hover,
.oh-rate > input:checked ~ label:hover ~ label,
.oh-rate > label:hover ~ input:checked ~ label {
  color: #c59b08;
}

/* ===============================
*     REGISTRATION - PHOTO
* ==============================*/

.oh-profile-photo {
  font-size: 2rem;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  border: 1px dashed $text-color;
  border-radius: 50%;
  margin-bottom: 0.75rem;
  background: rgba($border-light-color, 0.2);
  cursor: pointer;

  &:hover {
    background: rgba($border-light-color, 0.4);
  }
}

.oh-profile-photo__input {
  display: none;
}
