label {
  display: block;
}
legend {
  padding: 0;
  float: left;
}
legend + * {
  clear: left;
}
.ajax-progress {
  display: none;
}
.description {
  color: #6f777b;
  font-size: 16px;
}
.fieldgroup {
  margin-left: 0;
}
.fieldset-legend {
  font-size: 16px;
}
.field--type-datetime {
  margin-bottom: 30px;
}
.field--type-datetime .form-item {
  margin-bottom: 0;
}
.form-item {
  margin-bottom: 30px;
}
.form-email,
.form-select,
.form-text,
.form-textarea,
.form-tel {
  border: 2px solid #6f777b;
  font-size: 16px;
  line-height: 1.3157894737;
  padding: 4px;
  width: 100%;
}
.form-number {
  border: 2px solid #6f777b;
  font-size: 16px;
  line-height: 1.3157894737;
  padding: 4px;
}
.form-select {
  background-color: transparent;
}
.form-textarea {
  font-family: "nta", Arial, sans-serif;
}
.js-form-type-date + .js-form-type-date {
  display: inline-block;
  margin-right: 20px;
}
.js-form-type-radio,
.js-form-type-checkbox {
  margin-bottom: 10px;
  position: relative;
}
.js-form-type-radio input,
.js-form-type-checkbox input {
  cursor: pointer;
  height: 30px;
  width: 30px;
  margin: 0;
  position: absolute;
  top: calc(50% - 15px);
  left: 15px;
}
.js-form-type-radio input:hover + label,
.js-form-type-checkbox input:hover + label {
  border-color: #0b0c0c;
}
.js-form-type-radio input:focus,
.js-form-type-checkbox input:focus {
  outline: 0;
}
.js-form-type-radio input:focus + label,
.js-form-type-checkbox input:focus + label {
  outline: 3px solid #ffbf47;
}
.js-form-type-radio input:checked + label,
.js-form-type-checkbox input:checked + label {
  background-color: #ffffff;
  border-color: #0b0c0c;
}
.js-form-type-radio label,
.js-form-type-checkbox label {
  background-color: #dee0e2;
  border: 1px solid #dee0e2;
  display: inline-block;
  padding: 18px 30px 15px 54px;
  vertical-align: top;
}
.js-form-type-radio label:hover,
.js-form-type-checkbox label:hover {
  border-color: #0b0c0c;
  cursor: pointer;
}
.optional {
  color: #6f777b;
  font-size: inherit;
}
.remainingChars {
  color: #6f777b;
  margin: 0;
  position: absolute;
  top: -24px;
  right: 0;
}
textarea.wide ~ .remainingChars{
  right: 0;
}
.remainingChars.warning {
  color: #b10e1e;
}
.remainingChars.error {
  color: red;
}
.textarea-wrapper {
  position: relative;
  width: 100%;
}

@media(min-width: 641px){
  .description,
  .fieldset-legend {
    font-size: 19px;
  }
  .form-email,
  .form-select,
  .form-text,
  .form-textarea,
  .form-tel {
    font-size: 19px;
  }
  .remainingChars {
    top: -28px;
  }
}

@media(min-width: 1020px){
  .form-email,
  .form-select,
  .form-text,
  .form-textarea,
  .form-tel {
    width: 50%;
  }
  .form-textarea.wide {
    width: 100%;
  }
  .js-date-source {
    width: 100%;
  }
  .remainingChars {right: 50%};
}

/* Specific element overides */

/* Title fields 25% widths */
@media(min-width: 641px){
  .form-item-field-your-title select {
    width: 25%;
  }
}

/* School name 100% width */
.field--name-field-cao-reference-number input,
.field--name-field-publication-page-link input,
.field--name-field-provider-name input,
.field--name-field-school-name input {
  width: 100%;
}

/* 100% width labels */
.field--name-field-main-area-of-concern label,
.multistep-complaints-form .js-form-type-radio label {
  width: 100%;
}

/* Yes/no radio buttons - display alongside each other */
.form-item-complained-already,
.form-item-field-complainant,
.form-item-field-registered-parent {
  display: inline-block;
}
.form-item-complained-already + .form-item-complained-already,
.form-item-field-complainant + .form-item-field-complainant,
.form-item-field-registered-parent + .form-item-field-registered-parent {
  margin-left: 10px;
}

/* Display days/times as 2 columns */
@media(min-width: 734px) {
  .field--name-field-contact-day .form-item,
  .field--name-field-contact-time .form-item {
    width: calc(50% - 5px);
  }
  .field--name-field-contact-day .form-item {
    display: inline-block;
  }
  .field--name-field-contact-day .form-item:nth-child(2n-1) {
    margin-right: 10px;
  }
  .field--name-field-contact-day .fieldgroup,
  .field--name-field-contact-time .fieldgroup {
    width: 100%;
  }
  .field--name-field-contact-day .option,
  .field--name-field-contact-time .option {
    width: 100%;
  }
  .field--name-field-contact-day .form-checkboxes {
    font-size: 0;
  }
}

/* Webform tweaks */
/* Radio and checkbox tweaks */
.webform .js-form-type-checkbox input,
.webform .js-form-type-radio input {
  top: 16px;
}

.webform .js-form-type-checkbox > .description:first-child + input,
.webform .js-form-type-radio > .description:first-child + input {
  bottom: 16px;
  top: auto;
}

/* Scale field */
.webform .webform-scale .js-form-item-scale,
.webform .webform-scale .js-form-type-radio {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.webform .webform-scale .js-form-item-scale .option,
.webform .webform-scale .js-form-type-radio .option {
  margin: 0;
  padding: 0;
  border: none;
}

.webform .webform-scale .form-radio {
  position: static !important; /* Override the absolute positioning */
  clip: auto;
  flex-shrink: 0;
}

/* Webform message */
.webform .webform-message {
  position: relative;
  padding: 1rem 3rem 1rem 1rem;
  border: 0.1rem solid #cccccc;
}

.webform .webform-likert-table .js-form-type-radio input {
  top: calc(50% - 15px);
  left: calc(50% - 15px);
}

/* Table Select */
.webform .tableselect .js-form-type-checkbox {
  margin-bottom: 0;
}

.webform .tableselect .js-form-type-checkbox input,
.webform .webform-tableselect-sort .js-form-type-checkbox input {
  position: static;
}

.webform .tableselect th:first-child,
.webform .tableselect td:first-child {
  width: auto;
}

.webform .form-checkbox {
  cursor: pointer;
  height: 30px;
  width: 30px;
  margin: 0;
}

.tabledrag-toggle-weight {
  border: 0;
  display: inline-block;
  font-size: 19px;
  padding: 10px 15px 5px 15px;
  cursor: pointer;
  margin-right: 10px;
}

.table-sort-weight {
  width: auto;
}

.tableselect-sort th:first-child,
.tableselect-sort td:first-child {
  width: auto;
}

.tabledrag-hide {
  padding-left: 5rem;
}

.webform .draggable a.tabledrag-handle {
  position: absolute;
  left: -20px;
}

.tableselect-sort .form-item {
  margin-bottom: 0;
}

/* Adjust spacings */
.webform .webform-element-more,
.webform .form-item.js-form-type-managed-file {
  margin-bottom: 30px;
}

.webform .webform-likert-table .form-item {
  margin-bottom: 10px;
}
