/* Password show/hide eye — Matrix / Bootstrap 2 compatible */

.password-toggle-btn {
  border: 0 !important;
  background: transparent !important;
  padding: 0 !important;
  margin: 0;
  line-height: 1;
  color: #555;
  cursor: pointer;
  box-shadow: none !important;
  text-decoration: none;
  -webkit-appearance: none;
  appearance: none;
}

.password-toggle-btn:hover,
.password-toggle-btn:focus {
  color: #222;
  outline: none;
  text-decoration: none;
}

.password-toggle-btn i {
  font-size: 14px;
}

/*
 * Login / forgot: leave the input completely untouched (same Matrix width:75%
 * as Username). Take the eye out of document flow and pin it to the input's
 * right edge. .add-on is width 30px + padding 9px*2 = 48px.
 */
#loginbox .main_input_box.password-field {
  position: relative;
}

#loginbox .main_input_box.password-field .password-toggle-btn {
  position: absolute;
  top: 0;
  /* space to the right of centered [add-on + 75% input] */
  right: calc((100% - 75% - 48px) / 2);
  z-index: 5;
  width: 30px;
  height: 30px;
  line-height: 30px;
  text-align: center;
  color: #555;
}

/* Dashboard change-password wrap */
.password-toggle-wrap {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  max-width: 100%;
}

.password-toggle-wrap .password-toggle-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: auto;
  height: auto;
  padding: 4px 6px !important;
  line-height: 1;
}

.password-toggle-wrap--plain input.password-toggle-input {
  padding-right: 36px;
}

/* Full-width fields (modals / form-control) */
.password-toggle-wrap--full {
  display: block;
  position: relative;
  width: 100%;
  margin-bottom: 10px;
}

.password-toggle-wrap--full input.password-toggle-input {
  display: block;
  width: 100%;
  height: 40px;
  box-sizing: border-box;
  padding: 8px 36px 8px 10px;
  margin-bottom: 0;
  line-height: 24px;
  font-size: 14px;
}

/* Pin eye to the input row only — do not use top:50% of wrap, or
   jquery-validate error labels below the field push the icon down. */
.password-toggle-wrap--full .password-toggle-btn {
  top: 0;
  right: 8px;
  transform: none;
  width: 36px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  padding: 0 !important;
}

.password-toggle-wrap--full .password-toggle-btn i {
  font-size: 16px;
  vertical-align: middle;
}
