.form {
  margin: 0 0 var(--vertical-rhythm);
}

.form-legend {
  margin: 0 0 calc(var(--vertical-rhythm) / 2 - 1px);
  border-bottom: 1px solid var(--medium-dark-color);
  color: var(--dark-color);
  font-weight: bold;
}

.form-group {
  margin-bottom: calc(var(--vertical-rhythm) / 2);
}

.form-group-heading {
  display: block;
  font-weight: bold;
}

.form-required::after {
  content: '\00a0*';
  color: var(--negative-color);
}

input.form-control {
  -webkit-appearance: none;
}

.form-control {
  display: block;
  position: relative;
  box-sizing: border-box;
  width: 100%;
  padding: calc(var(--vertical-rhythm) / 4 - 1px) calc(0.5rem - 1px);
  background-color: var(--x-light-color);
  border: 1px solid var(--medium-dark-color);
  border-radius: 4px;
  transition: border-color ease-in-out 0.2s, box-shadow ease-in-out 0.2s;
}

.form-control:focus {
  box-shadow: 0 0 0 2px var(--default-outline-color);
  z-index: 1;
}

select.form-control:not([size]):not([multiple]) {
  height: calc(var(--vertical-rhythm) * 1.5);
}

.form-control.has-success {
  border-color: var(--positive-color);
  background-color: var(--x-light-color);
}

.form-control.has-success:focus {
  box-shadow: 0 0 0 2px var(--positive-outline-color);
}

.form-control.has-error {
  border-color: var(--negative-color);
  background-color: var(--x-light-color);
}

.form-control.has-error:focus {
  box-shadow: 0 0 0 2px var(--negative-outline-color);
}

.form-control-addon {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.5rem;
  background-color: var(--light-color);
  border: 1px solid var(--medium-dark-color);
  border-radius: 4px;
  white-space: nowrap;
}

.form-control-addon:not(:last-child) {
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
  }

.form-control-addon:not(:first-child) {
  border-bottom-left-radius: 0;
  border-top-left-radius: 0;
}

.form-check {
  margin-top: -1px;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.form-check-label {
  display: block;
}

.input-group {
  display: flex;
}

.input-group > .button:focus,
.input-group > .button:active,
.input-group > .button:hover,
.input-group > .form-control:focus {
  z-index: 10;
}

.input-group > .button + .button {
  margin-left: -1px;
}

.input-group > .form-control {
  flex: 1;
  min-width: 0;
}

.input-group > .form-control:not(:first-child) {
  border-left: 0;
}

.input-group > .form-control:not(:last-child) {
  border-right: 0;
}

.input-group > .button:not(:first-child),
.input-group > .button-group:not(:first-child) > .button:first-of-type,
.input-group > .form-control:not(:first-child) {
  border-bottom-left-radius: 0;
  border-top-left-radius: 0;
}

.input-group > .button:not(:last-child),
.input-group > .button-group:not(:last-child) > .button:last-of-type,
.input-group > .form-control:not(:last-child) {
  border-bottom-right-radius: 0;
  border-top-right-radius: 0;
}

input.input-search-box {
  -webkit-appearance: none;
}

.input-search-box {
  display: block;
  box-sizing: border-box;
  width: 100%;
  padding: calc(var(--vertical-rhythm) / 4) 0.5rem calc(var(--vertical-rhythm) / 4 - 2px);
  background-color: transparent;
  border: 0;
  border-bottom: 2px solid var(--x-dark-color);
  border-radius: 0;
  transition: border-color 0.2s ease-in-out;
}

.input-search-box:focus {
  border-color: var(--positive-color);
}
