form p {
  margin-left: 0;
}

.field--block {
  display: block;
}

.field--inline {
  display: flex;
}

.field-error-js {
  background: var(--warning-light-color);
  padding: 3px;
}

.input {
  box-sizing: border-box;
  padding: 6px;
  border: 1px solid var(--input-border);
  font-size: 14px;
  font-family: var(--font-family-monospace);
  color: var(--input-text-color);
  background: var(--input-color);
  max-width: 100%; /* prevent resizable inputs from overflowing the container */
}

.input::placeholder {
  opacity: 0.54;
  color: inherit;
}

.input[required]:invalid {
  box-shadow: none;
}

.input:focus {
  outline: none;
  border: 1px solid var(--input-border-active);
  background: var(--input-color-active);
}

.input--wide {
  width: 100%;
}

.input--short {
  max-width: 30em;
}

.input--small {
  padding: 0 3px;
}

.input--text {
  min-height: 8.6em;
}

.input--separate-left {
  margin-left: 5px;
}

.input--separate-top {
  margin-top: 5px;
}

.input--decoy {
  display: inline-block;
  width: 0;
  height: 0;
  border: 0;
  padding: 0;
  box-sizing: border-box;
}

.input--resize-vertical {
  resize: vertical;
}

.checkbox {
  margin: 0.2em 0 0 0.4em;
  padding: 0;
}

textarea {
  height: 4em;
}

.field,
.actions {
  margin-bottom: 6px;
}

.field-help-button,
.field-help-button * {
  font-style: italic;
  cursor: pointer;
}

.field-help-button {
  margin-left: 6px;
  font-size: 0.8em;
  color: var(--foreground-half-color);
  border-color: var(--foreground-half-color);
  border-style: dashed;
  border-width: 1px;
  border-radius: 10px;
  padding: 4px;

  /*
    We want this to behave like a button, so double clicking on it
    shouldn't trigger a selection
  */
  user-select: none;
}

.field-help-button:hover {
  background-color: var(--primary-light-color);
}

.field-help-content {
  color: var(--foreground-half-color);
  margin: 10px auto;
  font-style: italic;
}

.field_with_errors {
  background: var(--danger-color);
}

span.help-block {
  background: var(--danger-color);
  display: block;
}

/* hform is used for 30em inline 2-element textinput/button forms */
.hform .field {
  display: flex;
  max-width: 30em;
  width: 100%;
}

/* text input - grow to container size */
.hform__text {
  flex: 1 0 auto;
}
/* button - don't shrink or grow at all */
.hform__button {
  flex: 0 0 auto;
  margin-left: 5px;
}

/* Click-toggleable */
.toggle-box {
  display: none;
}

.toggle-box + label {
  position: relative;
}

.toggle-box + label > * {
  display: inline;
}

.toggle-box + label:before {
  content: "";
  width: 0;
  height: 0;
  border-style: solid;
  display: inline-block;
  margin-right: 0.25em;
  border-width: 0.5em 0 0.5em 0.9em;
  border-color: transparent transparent transparent var(--foreground-color);
}

.toggle-box:checked + label:before {
  border-width: 0.9em 0.5em 0;
  border-color: var(--foreground-color) transparent transparent transparent;
}

.toggle-box-container {
  overflow: hidden;
  position: relative;
  height: 0;
}

.toggle-box:checked + label + .toggle-box-container {
  height: auto;
}

.toggle-box:checked + label + .toggle-box-container > .toggle-box-container__content {
  margin-top: var(--block-spacing);
}

select.input,
select.input:focus {
  -moz-appearance: none;
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, var(--foreground-color) 50%) calc(100% - 15px) 12px / 5px 5px no-repeat,
    linear-gradient(135deg, var(--foreground-color) 50%, transparent 50%) calc(100% - 10px) 12px / 5px 5px no-repeat;
  padding-right: 25px;
}

select.input option,
select.input:focus option {
  background-color: var(--input-color);
}

select.input:hover option,
select.input:focus:hover option {
  background-color: var(--input-color-active);
}

select.input:hover,
select.input:focus:hover {
  cursor: pointer;
  background-color: var(--input-color-active);
}
