/********************************************************************************************************************************
 * Forms
********************************************************************************************************************************/

/**
 * General form styling
 */
.form-textarea-wrapper {
  margin-top: 0.333rem;
}
.form-textarea-wrapper textarea {
  padding: 0.333rem;
}
.form-checkboxes input.form-checkbox,
.form-radios input.form-radio {
  margin-right: 0.25rem;
}
.inline-submit .form-item.form-type-textfield,
.inline-submit .form-actions,
.inline-fields .form-item,
.inline-fields .form-actions,
.inline-field.form-item {
  display: inline-block;
  margin: 0 1rem 0 0;
}
.form-type-date.form-no-label {
  margin: 0;
}

/**
 * Submit buttons
 */
.button:first-child,
.form-actions .button:first-child {
  margin-right: 1rem;
  margin-left: 0;
}
a.button.back-button {
  background-color: #f3f3f3;
  color: #555;
}
a.button.back-button:hover {
  background-color: #f9f9f9;
}

/**
 * Help areas
 */
.congruent-help {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background-color: #f5f5f5;
  border-left: 3px solid #ccc;
  display: grid;
  grid-template-columns: 19px auto;
  grid-column-gap: 8px;
}
.congruent-help .help-icon {
  width: 19px;
  height: 19px;
}
.congruent-help h3 {
  margin-top: 0;
  font-size: 1.2rem;
  font-weight: normal;
  line-height: 100%;
}
.congruent-help ul,
.congruent-help .item-list ul {
  margin-inline: 0;
}
.congruent-help p {
  margin: 0.75rem 0;
}
.congruent-help p:first-child {
  margin-top: 0;
}
.congruent-help p:last-child {
  margin-bottom: 0;
}

/**
 * Fieldsets & field groups
 */
fieldset {
  border: 1px solid #ccc;
  padding-top: 0;
  margin-left: 0;
  margin-right: 0;
}
fieldset.rounded {
  border-radius: 4px;
}
fieldset.as-dashboard-section {
  padding: 0.5em 3%;
  box-shadow: 1px 1px 3px rgb(0 0 0 / 30%);
  border-radius: 4px;
  background-color: #fff;
  border: none;
  border-left: 4px solid #aaa;
}
fieldset.as-dashboard-section > legend {
  background-color: #fff;
  padding: 0 0.333rem;
  margin-left: -0.333rem;
}
fieldset > .fieldset-wrapper > fieldset {
  border: none;
  border-bottom: 1px dotted #ddd;
  padding: 0;
}
fieldset > .fieldset-wrapper > fieldset.form-composite,
fieldset > .fieldset-wrapper > fieldset:last-child {
  border-bottom: none;
}
fieldset.large-heading > legend {
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 1.2rem;
}
fieldset.bold-heading > legend {
  font-weight: 600;
}
fieldset.large-heading > .fieldset-wrapper > fieldset:not(.form-composite) > legend {
  text-transform: uppercase;
  letter-spacing: 1px;
}

/**
 * Login form
 */
form.login-form .form-email {
  padding: 0.6rem;
}

/**
 * Inline items
 */
.container-inline .form-submit {

}

/**
 * Bold labels for groups of checkboxes/radios
 */
.bold-group-label .section-label,
.bold-group-label > legend .fieldset-legend {
  font-weight: bold;
}

/**
 * Checkbox & radio styles with descriptions attached to each element
 */
label.option .label-title.with-description {
  margin-bottom: 0.25rem;
}
.form-type-checkbox span.description,
.form-type-radio span.description {
  display: block;
  margin-left: 0;
  padding-left: 1rem;
  font-size: 0.9rem;
}
.form-type-radio span.description img.pm-img {
  width: 20px;
}

/**
 * Checkbox & radio styles that have a grid layout for each element
 */
.grid-label .form-type-checkbox,
.grid-label .form-type-radio {
  display: grid;
  grid-template-columns: 14px auto;
  grid-column-gap: 5px;
  align-items: start;
}
.grid-label .form-type-checkbox .form-checkbox,
.grid-label .form-type-radio .form-radio {
  margin-top: 3px;
  margin-right: 0;
}
.grid-label label.option {
  line-height: 120%;
}
.grid-label label.option span.label-title,
.grid-label label.option span.description {
  display: block;
  padding-left: 0;
}

/**
 * Checkbox & radio options with labels that are 'inline-block' style
 */
.form-composite.inline-block-label .form-radios label.option,
.form-radios.inline-block-label label.option,
.form-radios input.inline-block-label + label {
  display: inline-block;
}
.form-composite.inline-block-label .form-radios label.option img.pm-img,
.form-radios.inline-block-label label.option img.pm-img,
.form-radios input.inline-block-label + label img.pm-img {
  float: left;
}

.form-type-radio,
.form-type-checkboxes {
  margin-block: 0.4rem;
  margin-inline-start: 1.25rem;
}

/**
 * Radio and checkbox items that are the child of a form item.
 */
.form-type-radio input.form-radio,
.form-type-checkboxes input.form-checkbox {
  position: relative;
  inset-block-start: 0.5rem;
  float: left; /* LTR */
  margin-inline-start: -1.25rem;
  transform: translateY(-50%);
}

/**
 * Styling for checkbox/radio descriptions.
 */
.form-checkboxes .congruent-label,
.form-checkboxes .congruent-description,
.form-radios .congruent-label,
.form-radios .congruent-description {
  display: block;
}
.form-checkboxes .congruent-description.description,
.form-radios .congruent-description.description {
  font-size: 0.95em;
  padding-left: 0;
}
.form-type-checkbox .congruent-description p,
.form-checkboxes .congruent-description p,
.form-radios .congruent-description p {
  margin-bottom: 0;
}

/**
 * Styling for checkboxes/radios that get darker if hovered or clicked
 */
label.option,
.form-type-checkbox label.option,
.form-radios label.option {
  font-weight: 300;
  opacity: 0.85;
}
.form-type-checkbox label:hover,
.form-radios label:hover,
.form-type-checkbox input[type="checkbox"]:checked + label,
.form-radios input[type="radio"]:checked + label {
  opacity: 1;
  font-weight: 400;
}
.form-composite .fieldset-legend,
.form-item.bold-label label,
.bold-label > .form-item label {
  font-weight: 400;
}
.form-type-checkbox input[type="checkbox"]:checked + label strong,
.form-radios input[type="radio"]:checked + label strong {
  font-weight: 600;
}
.form-type-checkbox label.option strong,
.form-radios label.option strong {
  font-weight: 500;
}
.form-composite .fieldset-legend {
  font-weight: 500;
}

/**
 * Styles where the radio button itself is hidden (showing only a button as label)
 */
input.hide-radio.form-radio,
.hide-radio.form-radio input[type="radio"] {
  opacity: 0;
  position: fixed;
  width: 0;
}
form.box {
  padding: 1.5rem 3%;
}
