$primary_color: var(--primary-500);
#{$all-text-inputs},
.card-element,
.form-control {
  height: 40px;
  display: block;
  width: 100%;
  padding: 10px 16px;
  border: 1px solid var(--gray-100);
  font-size: 14px;
  background-color: #fff;
  position: relative;
  font-weight: 400;
  color: var(--gray-900);
  border-radius: 4px;
  transition: all 0.24s ease-in-out;

  &.pill {
    border-radius: 999px;
  }
  &::placeholder {
    color: var(--gray-400);
    font-size: 14px;
    text-transform: capitalize;
    font-weight: 400;
  }
  &:disabled {
    &::placeholder {
      opacity: 0.45;
    }
  }
  select,
  .form-select {
    width: 100%;
    height: 48px;
    padding-left: 20px;
    font-size: 14px;
    border: 1px solid var(--gray-50);
    background-color: transparent;
    color: var(--gray-900);
    border-radius: 4px;
    appearance: none;
  }
}
textarea {
  height: auto !important;
}
select,
.form-select {
  width: 100%;
  height: 48px;
  display: block;
  font-size: 14px;
  position: relative;
  padding-left: 20px;
  border: 1px solid var(--gray-50);
  background-color: transparent;
  color: var(--gray-900);
  appearance: none;
  border-radius: 4px;

  &:focus {
    outline: none;
    box-shadow: none;
  }
  &:focus-visible {
    border-color: var(--primary-500);
  }
}
.single-box,
.fromGroup {
  position: relative;
  .has-badge {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    cursor: pointer;
    display: none;
    img {
      width: 20px;
    }
  }
  label {
    display: block;
    color: var(--gray-900);
    font-size: 14px;
    margin-bottom: 6px;
    line-height: 20px;
    font-weight: 400;
  }
  &.success,
  &.warning {
    .form-control {
      padding: 10px 40px 10px 16px;
      background-color: var(--success-50);
      border: 1px solid var(--success-500);
      &::placeholder {
        color: var(--gray-700);
      }
      &:focus {
        border-color: var(--success-500) !important;
      }
    }
    .has-badge {
      display: block !important;
    }
    .warning-icon {
      display: none;
    }
    .success-icon {
      display: block;
    }
  }
  &.warning {
    .form-control {
      background-color: var(--danger-50);
      border: 1px solid var(--danger-500);
      &:focus {
        border-color: var(--danger-500) !important;
      }
    }
    .warning-icon {
      display: block;
    }
    .success-icon {
      display: none;
    }
  }
  &.eye {
    .form-control {
      padding: 10px 40px 10px 16px;
    }
    .has-badge {
      display: block !important;
      i {
        font-size: 22px;
        line-height: 1;
        margin-top: 7px;
      }
    }
  }

  .icon-badge,
  .icon-badge-2 {
    position: absolute;
    left: 0px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
  }
  .icon-badge-2 {
    left: 15px;
  }
  &.has-icon {
    #{$all-text-inputs},
    .form-control {
      padding-left: 45px;
    }
  }
  &.has-icon2 {
    #{$all-text-inputs},
    .form-control {
      padding-left: 52px;
    }
  }
}

#{$all-text-inputs-focus},
.form-control:focus {
  box-shadow: none !important;
  border-color: var(--primary-500) !important;
  outline: none;
}

.rt-form {
  &.otp-form {
    #{$all-text-inputs},
    .form-control {
      height: 41px;
      width: 40px;
      border-radius: 8px;
      font-size: 18px;
      padding: 10px;
      text-align: center;
      margin-right: 10px;
      &:last-child {
        margin-right: 0px;
      }
      &:focus {
        color: var(--primary-500);
      }
    }
    &.size-lg {
      #{$all-text-inputs},
      .form-control {
        height: 64px;
        font-size: 33px;
        width: 64px;
        @include breakpoint(xs) {
          height: 41px;
          width: 40px;
          font-size: 18px;
        }
      }
    }
  }

  &.line-form {
    #{$all-text-inputs},
    .form-control {
      font-size: 16px;
      height: 54px;
      border-radius: 0px;
      padding-left: 0px;
      padding-right: 15px;
      border: none;
      border-bottom: 1px solid var(--gray-50);
      &::placeholder {
        color: #abb9c7;
        font-size: 16px;
        text-transform: capitalize;
      }
    }
    label {
      color: #abb9c7;
      font-size: 16px;
      text-transform: capitalize;

      width: 100%;

      line-height: 21px;
      transition: 300ms ease all;
      span {
        margin-right: 15px;
        img {
          position: relative;
          top: -3px;
        }
      }
    }

    #{$all-text-inputs-focus},
    .form-control:focus {
      box-shadow: none;
      outline: none;
      border-color: var(--primary-500);
    }
    .left-icon-parent {
      #{$all-text-inputs},
      .form-control {
        padding-left: 27px;
      }
    }
  }

  &.input-f-size-12 {
    #{$all-text-inputs},
    .form-control {
      font-size: 12px !important;
    }
  }
}

.outline-label {
  select {
    height: 47px;
    border: none;
    font-size: 16px;
    &:focus ~ label,
    &:valid ~ label {
      top: -15px;
      font-size: 13px;
      color: #abb9c7;
      background: #fff;
      padding: 0px 5px;
    }
    &:focus ~ .border {
      border: 1px solid var(--gray-50);
      border-radius: 3px;
      border-radius: 3px;
      position: absolute;
      top: 0px;
      pointer-events: none;
      transition: all 0.1s ease;
    }
    &:focus {
      border: none;
    }
  }

  #{$all-text-inputs},
  .form-control {
    border: none;
    height: 47px;
    font-size: 16px;
    &:focus ~ label,
    &:valid ~ label {
      top: -15px;
      font-size: 13px;
      color: #abb9c7;
      background: #fff;
      padding: 0px 5px;
    }
    &:focus ~ .border {
      border: 1px solid var(--gray-50);
      border-radius: 5px;
      position: absolute;
      top: 0px;
      pointer-events: none;
      transition: all 0.1s ease;
    }
  }
  label {
    color: #abb9c7;
    font-size: 16px;
    font-weight: 400;
    position: absolute;
    text-transform: capitalize;
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    left: 18px;
    top: 9px;
    transition: all 0.2s ease;
  }

  .border {
    border: 1px solid var(--gray-50);
    border-radius: 5px;
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0px;
    pointer-events: none;
    transition: all 0.3s ease;
  }
}

// envalid option
.is-invalid {
  #{$all-text-inputs},
  .form-control,
  select {
    border-color: var(--danger-color);
    &:focus ~ label,
    &:valid ~ label {
      color: var(--danger-color);
    }
    &:focus ~ .border {
      border-color: var(--danger-color);
    }
  }
  .invalid-tooltip {
    color: var(--danger-color);
    font-size: 13px;
    line-height: 18px;
    font-weight: 400;
    margin: 10px 0 0;
  }

  .border {
    border-color: var(--danger-color);
  }
}

.input-transparent {
  #{$all-text-inputs},
  .form-control {
    background-color: transparent;
    border-color: transparent;
  }
}

// bs 5 switch design
.form-switch {
  .form-check-input {
    width: 44px;
    height: 22px;
    border-color: var(--gray-300);
    order: 1;
    &.active {
      filter: brightness(100%);
    }
    &:focus {
      border-color: var(--primary-500);
      outline: 0;
      box-shadow: none;
    }
    &:checked {
      background-color: var(--primary-500);
      border-color: var(--primary-500);
    }
  }
  .form-check-input[type="checkbox"]:indeterminate {
    background-color: var(--primary-500);
    border-color: var(--primary-500);
  }

  .form-check-label {
    order: 2;
  }
  label {
    vertical-align: middle;
    font-size: 14px;
    line-height: 20px;
    color: var(--gray-900);
    cursor: pointer;
  }
}

.custom-switch {
  &.form-switch {
    padding: 0;
    display: flex;
    .form-check-input {
      float: none;
      margin: 0;
      width: 32px;
      height: 20px;
      border: none;
      cursor: pointer;
      transition: all 0.4s;
      background-color: var(--gray-100);
      background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
      &:checked {
        background-color: var(--primary-500);
      }
      &:hover {
        background-color: var(--primary-200);
      }
    }
  }
  &.invalid {
    .form-check-input {
      background-color: var(--danger-500);
    }
  }
  .form-check-input:checked ~ .form-check-label {
    color: var(--gray-700);
  }
  .form-check-input:checked ~ .label1 {
    color: var(--gray-300);
  }
}

//custom checkbox
.has-minus {
  &.form-check {
    margin-left: -1.5rem;
  }
}
.from-chekbox-custom {
  .form-check-input {
    height: 20px;
    width: 20px;
    border: 2px solid;
    flex-shrink: 0;
    border-color: var(--gray-100);
    border-radius: 3px;
    margin-right: 8px;
    transition: all 0.4s;
    cursor: pointer;
    &:hover {
      border-color: var(--primary-500);
      box-shadow: 0px 2px 8px rgba(14, 95, 217, 0.24);
    }
    &:focus {
      box-shadow: none;
    }
    &:checked {
      border-color: var(--primary-500) !important;
    }
  }
  &.invalid {
    .form-check-input {
      border-color: var(--danger-500);
    }
  }

  .form-check-input:active {
    filter: brightness(100%);
    background: var(--primary-500);
    border-color: var(--primary-500);
  }
  label {
    vertical-align: middle;
    font-size: 14px;
    line-height: 20px;
    color: var(--gray-900);
    cursor: pointer;
  }
}
.from-radio-custom {
  .form-check-input {
    height: 20px;
    width: 20px;
    border: 2px solid;
    border-color: var(--gray-100);
    border-radius: 50%;
    margin-right: 8px;
    position: relative;
    transition: all 0.4s;
    cursor: pointer;
    &:hover {
      border-color: var(--primary-500);
      box-shadow: 0px 2px 8px rgba(14, 95, 217, 0.24);
    }
    &:checked {
      background-color: var(--primary-500) !important;
    }
    &::after {
      position: absolute;
      left: 0;
      top: 0px;
      right: 0px;
      bottom: 0px;
      height: 8px;
      width: 8px;
      border-radius: 50%;
      margin: auto;
      background-color: white;
      content: "";
      @include hidden();
    }
  }
  &.invalid {
    .form-check-input {
      border-color: var(--danger-500);
    }
  }
  label {
    vertical-align: middle;
    font-size: 14px;
    line-height: 20px;
    color: var(--gray-900);
    cursor: pointer;
  }
  .form-check-input:checked {
    border-color: var(--primary-500);
    box-shadow: none;
    background: transparent;
    background-image: none;
    &::after {
      @include vis();
      animation: zoomIn 0.24s ease-in-out;
    }
  }
}

// date picker

#date {
  width: 150px;
  outline: none;
  border: 1px solid #aaa;
  padding: 6px 28px;
  color: #aaa;
}

.date-container {
  position: relative;
  float: left;
  .date-text {
    position: absolute;
    top: 6px;
    left: 12px;
    color: #aaa;
  }

  .date-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
    color: #aaa;
  }
}

.form-control-icon {
  position: relative;
}

/** Custom Select **/
.custom-select-wrapper {
  position: relative;
  user-select: none;
  cursor: pointer;
}
.custom-select-wrapper select {
  display: none;
}
.custom-select {
  position: relative;
}
.custom-select-trigger {
  position: relative;
  display: block;
  width: 100%;
  padding: 10px 16px;
  height: 40px;
  font-weight: 400;
  color: var(--gray-400);
  background-color: transparent;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  text-transform: capitalize;
  transition: all 0.3s ease-in-out;
  border: 1px solid var(--gray-100);
  &::after {
    position: absolute;
    display: block;
    content: "";
    width: 8px;
    height: 8px;
    top: 50%;
    right: 20px;
    margin-top: -3px;
    border-bottom: 1.5px solid var(--gray-400);
    border-right: 1.5px solid var(--gray-400);
    transform: rotate(45deg) translateY(-50%);
    transition: all 0.35s ease-out;
    transform-origin: 50% 0;
  }
}
.custom-select.opened .custom-select-trigger:after {
  margin-top: 3px;
  transform: rotate(-135deg) translateY(-50%);
}
.custom-options {
  position: absolute;
  display: block;
  top: 100%;
  left: 0%;
  right: 0;
  width: 100%;
  margin: 15px 0;
  border-radius: 0;
  padding: 10px 0;
  box-sizing: border-box;
  background: #fff;
  transition: all 0.3s ease-in-out;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-15px);
  border: 0;
  z-index: 9;
  border: 1px solid #e9eaf0;
  border-top: none;
  box-shadow: 0px 6px 16px rgba(0, 0, 0, 0.06);
}
.custom-select.opened .custom-options {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}
.option-hover:before {
  background: #f9f9f9;
}
.custom-option {
  position: relative;
  display: block;
  font-weight: 400;
  line-height: 30px;
  cursor: pointer;
  transition: all 0.05s ease-in-out;
  font-size: 14px;
  line-height: 22px;
  letter-spacing: -0.01em;
  color: #4e5566;
  transition: all 0.3s;
  padding: 5px 18px;
  text-transform: capitalize;
  &:hover {
    color: white !important;
    background-color: var(--primary-500);
  }
}
.fromGroup.horizontal-form {
  display: flex;
  align-items: center;
  label {
    width: 130px;
    margin: 0;
    display: inline-block;
    @include max(479px) {
      width: 100px;
    }
  }
  input.form-control,
  .form-control-icon,
  .select-box {
    flex: 1;
  }
}

.modal-dialog.createcard-modal-dialog {
  .modal-content {
    border-radius: 8px;
  }
}
