html {
  box-sizing: border-box;
}

*, *:before, *:after {
  box-sizing: inherit;
}

body {
  margin: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-top: 0;
}

p {
  margin-top: 0;
}

/* Borders */
:root {
  --default-border: 1px solid var(--grey);
  --light-border: 1px solid var(--light-grey);
  --border-radius: 4px;
}

:root {
  --box-shadow: 2px 2px 12px rgba(17, 25, 65, 0.1);
}

body {
  font-family: var(--default-font);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  margin: 0;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.625rem;
}

h3 {
  font-size: 1.375rem;
}

h4 {
  font-size: 1.125rem;
}

h5 {
  font-size: 1rem;
}

h6 {
  font-size: 0.75rem;
}

p {
  font-size: 1rem;
}

a {
  color: var(--primary-color);
  font-weight: 500;
}

.button {
  height: 36px;
  line-height: 1;
  font-size: 1rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: var(--default-border);
  border-radius: var(--border-radius);
  color: var(--dark-grey);
  font-family: var(--default-font);
}
.button:focus {
  outline-color: var(--navy);
}
.button--block {
  width: 100%;
  display: flex;
}
.button--no-padding {
  padding: 0;
}
.button--primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  border-radius: var(--border-radius);
  color: var(--white);
}
.button--secondary:hover {
  opacity: 1;
  background-color: var(--lightest-grey);
}
.button--facebook {
  background-color: var(--facebook);
  border-color: var(--facebook);
  color: var(--white);
}
.button--twitter {
  background-color: var(--twitter);
  border-color: var(--twitter);
  color: var(--white);
}
.button--small {
  font-size: 0.8125rem;
  padding: 0 0.375rem;
}
.button:hover {
  cursor: pointer;
  opacity: 0.8;
}

a.button {
  text-decoration: none;
}

.form_field + .button {
  margin-top: 1rem;
}

.divider {
  display: block;
  width: 100%;
  height: 1px;
  background-color: var(--grey);
  margin: 1rem 0;
}

.form_field--required label:not(.error):after {
  content: "*";
  color: var(--red);
  margin-left: 0.25rem;
}

.form_field + .form_field {
  margin-top: 0.875rem;
}

.form_label_wrap {
  width: 100%;
  display: flex;
  justify-content: space-between;
}

.form_label {
  display: inline-block;
  margin-bottom: 0.25rem;
  color: var(--dark-grey);
  font-size: 0.875rem;
  font-weight: 500;
}

input:focus,
select:focus {
  outline-color: var(--primary-color);
}

input[type=text],
input[type=password],
select {
  width: 100%;
  height: 2.25rem;
  padding: 0 0.625rem;
  border: var(--default-border);
  border-radius: var(--border-radius);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
input[type=text].error,
input[type=password].error,
select.error {
  background-color: var(--light-red);
  border-color: var(--red);
}
input[type=text].error:focus,
input[type=password].error:focus,
select.error:focus {
  outline-color: var(--red);
}

select {
  padding-right: 3.5rem;
  background-image: linear-gradient(45deg, transparent 50%, gray 50%), linear-gradient(135deg, gray 50%, transparent 50%);
  background-position: calc(100% - 17px) calc(1rem - 2px), calc(100% - 12px) calc(1rem - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

label.error {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--red);
}

input::placeholder {
  color: var(--dark-grey);
  opacity: 0.7;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
  border-color: var(--blue);
  -webkit-text-fill-color: var(--navy);
  box-shadow: 0 0 0px 1000px var(--light-blue) inset;
  -webkit-box-shadow: 0 0 0px 1000px var(--light-blue) inset;
  transition: background-color 5000s ease-in-out 0s;
}

.alert {
  display: flex;
  align-items: center;
  padding: 1rem;
  border-radius: var(--border-radius);
  color: var(--navy);
}
.alert h3 {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.625rem;
}
.alert p {
  margin: 0;
  font-size: 0.75rem;
}
.alert p + p {
  margin-top: 1rem;
}
.alert--info {
  background-color: var(--lightest-grey);
  border: 1px solid var(--grey);
}

.alert_icon {
  font-size: 2rem;
  padding-right: 1.25rem;
}

.alert_text {
  width: 100%;
}

.error-list {
  background-color: var(--light-red);
  border: 1px solid var(--red);
  border-radius: var(--border-radius);
  color: var(--red);
  padding: 0.625rem 0 0.625rem 2rem;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}
.error-list ul {
  padding-left: 0;
}
.error-list ul:empty {
  display: none;
}