.form--inline {
  padding: 2.4rem;
  background: #ebf7f8;
}

/* Base inputs */
input:not([type="submit"]),
select,
textarea {
  font-size: 1.8rem;
  line-height: 2.8rem;
  padding: 1.4rem 1.6rem;
  margin: 0;
  color: #4c4c68;
  background-color: #ebf7f8;
  border: none;
  border-bottom: 1px solid #4c4c68;
  cursor: pointer;
}
@media (max-width: 399px) {
  input:not([type="submit"]),
  select,
  textarea {
    font-size: 1.6rem;
    line-height: 2.6rem;
  }
}
input:not([type="submit"]):not([value=""]),
select:not([value=""]),
textarea:not([value=""]) {
  color: #000028;
  background-color: #ebf7f8;
}
input:not([type="submit"]):hover,
select:hover,
textarea:hover,
input:not([type="submit"]):active,
select:active,
textarea:active,
input:not([type="submit"]):focus,
select:focus,
textarea:focus {
  color: #000028;
  background: #d1fff2;
  border-color: #005159;
}
input:not([type="submit"]):hover:not([value=""]),
select:hover:not([value=""]),
textarea:hover:not([value=""]),
input:not([type="submit"]):active:not([value=""]),
select:active:not([value=""]),
textarea:active:not([value=""]),
input:not([type="submit"]):focus:not([value=""]),
select:focus:not([value=""]),
textarea:focus:not([value=""]) {
  color: #005159;
}
input:not([type="submit"]).error,
select.error,
textarea.error {
  color: #b81e31;
  background-color: #d72339;
  border-color: #b81e31;
}

/* Select */
select {
  -moz-appearance: none;
  -webkit-appearance: none;
  appearance: none;
}
select:not([multiple]) {
  padding-right: 2em;
  background-repeat: no-repeat;
  background-position: calc(100% - 0.8rem) 1.6rem;
  background-size: auto;
  background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M17 9L12 14L7 9H17Z' fill='%23005159'/%3E%3C/svg%3E%0A");
}
select::-ms-expand {
  display: none;
}
select option {
  font-weight: normal;
}

/* Checkbox and radio */
input[type="checkbox"],
input[type="radio"] {
  position: absolute;
  clip: rect(1px, 1px, 1px, 1px);
  padding: 0;
  border: 0;
  height: 1px;
  width: 1px;
  overflow: hidden;
}
input[type="checkbox"] + label,
input[type="radio"] + label {
  position: relative;
}
input[type="checkbox"] + label:before,
input[type="radio"] + label:before {
  content: "";
  display: inline-block;
  vertical-align: bottom;
  width: 2.4rem;
  height: 2.4rem;
  border: 2px solid #4c4c68;
  background: #ebf7f8;
  margin-right: 0.8rem;
}
input[type="checkbox"] + label:after,
input[type="radio"] + label:after {
  font-size: 1.5em;
  vertical-align: bottom;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  content: "";
  color: #4c4c68;
  position: absolute;
  display: none;
  left: 0;
  top: 0;
  width: 2.4rem;
  height: 2.4rem;
  pointer-events: none;
}
input[type="checkbox"] + label:hover:before,
input[type="radio"] + label:hover:before {
  border-color: #005159;
  background: #d1fff2;
  cursor: pointer;
}
input[type="checkbox"] + label:active:after,
input[type="radio"] + label:active:after {
  display: block;
  color: #005159;
}
input[type="checkbox"]:focus + label:before,
input[type="radio"]:focus + label:before {
  outline: 1px solid #199fff;
  outline-offset: 2px;
}
input[type="checkbox"]:checked + label:after,
input[type="radio"]:checked + label:after {
  display: block;
}
input[type="checkbox"] + label:after {
  content: "\e90a";
  font-size: 2.1rem;
  line-height: 1.8rem;
  top: 0.1rem;
  text-align: center;
}
input[type="radio"] + label:before {
  border-radius: 50%;
}
input[type="radio"] + label:after {
  top: 0.7rem;
  left: 0.7rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background-color: currentColor;
}

/* Dark theme inputs */
.theme-dark input:not([type="submit"]),
.theme-dark select,
.theme-dark textarea {
  color: #b3b3be;
  background-color: #00183b;
  border-color: #b3b3be;
}
.theme-dark input:not([type="submit"]):hover,
.theme-dark select:hover,
.theme-dark textarea:hover,
.theme-dark input:not([type="submit"]):focus,
.theme-dark select:focus,
.theme-dark textarea:focus,
.theme-dark input:not([type="submit"]):active,
.theme-dark select:active,
.theme-dark textarea:active {
  color: #fff;
  background-color: #001f39;
  border-color: #00ffb9;
}

/* File input */
input[type="file"] {
  font-size: 0.8em;
}
input[type="file"]::file-selector-button {
  background: #007993;
  color: #fff;
  padding: 0.25em 0.5em;
  border: 0;
}

/* Form structure */
.form-reset {
  font-size: 1.4rem;
  line-height: 2.4rem;
  margin-left: 1.2em;
  text-decoration: none;
}
.form-reset:hover {
  text-decoration: underline;
}
.form-section {
  padding-bottom: 1.6rem;
  border-bottom: 1px solid #b3b3be;
  margin-bottom: 3.2rem;
}
.form-section h3,
.form-section h4,
.form-section p {
  margin-bottom: 1.6rem;
}
.form-group {
  display: flex;
  flex-direction: column;
  margin: 0.5rem 0;
}
.form-group .checklist-label {
  font-size: 1.4rem;
  line-height: 2.8rem;
  margin: 0;
}
.form-group select {
  margin: 0;
}
.form-group > input[type="radio"] + label,
.form-group > input[type="checkcbox"] + label {
  margin-bottom: 1.2rem;
}
.form-group > input[type="radio"] + label:last-child,
.form-group > input[type="checkcbox"] + label:last-child {
  margin-bottom: 0;
}
.form-group--radios {
  margin-bottom: 3.2rem;
}
.form-row {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 1.6rem;
}
@media (min-width: 720px) {
  .form-row {
    align-items: flex-start;
    flex-direction: row;
  }
}
.form-row > .form-group,
.form-row > .form-element {
  flex: 1 1 auto;
}
.form-element {
  display: flex;
  flex-direction: column-reverse;
  margin-bottom: 2.4rem;
}
.form-element[aria-hidden="true"] {
  display: none !important;
}
.form-element label {
  font-size: 1.4rem;
  line-height: 2.8rem;
  color: #4c4c68;
  margin-bottom: 0;
}
.form-element .form-element__help-text {
  font-size: 1.2rem;
  line-height: 2rem;
  color: #4c4c68;
  margin-bottom: 0;
}
.form-element .form-element__help-text ul {
  padding-left: 1.5em;
}
.form-element .errorlist {
  font-size: 1.2rem;
  line-height: 2rem;
  line-height: 2.8rem;
  list-style: none;
  padding: 0;
  color: #b81e31;
}
.form-element--error > label {
  color: #b81e31;
}
.form-element--error input:not([type="submit"]),
.form-element--error select,
.form-element--error textarea {
  background: #fcccd7;
  border-bottom-color: #d72339;
}
.form-actions {
  display: flex;
  flex-direction: column;
  gap: 3.2rem;
  margin-top: 3.2rem;
}
.form-actions a {
  text-decoration: none;
}
.form-actions a:hover {
  text-decoration: underline;
}
.submit-button-section img {
  max-width: 100%;
}
@media (min-width: 720px) {
  .form-actions {
    align-items: flex-start;
    flex-direction: row;
  }
}
.form-input-notice {
  display: flex;
  align-items: baseline;
}
