.form {
    display: block;
    position: relative;
}

.form__field {
    display: block;
    margin-bottom: 2.4rem;
}

.form__field label {
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
    line-height: 1.7rem;
    font-weight: 500;
    display: block;
    padding: 0;
    color: #4B4B4B;
    cursor: pointer;
}

.form__field input[type="text"],
.form__field input[type="email"],
.form__field input[type="password"],
.form__field textarea {
    font-family: inherit;
    font-size: 1.4rem;
    line-height: 1.7rem;
    margin: 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%;
    display: block;
    padding: 1.6rem 2.3rem;
    border: 1px solid #7F7E87;
    border-radius: 0;
    background-color: #fff;
    transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 0.15s;
}

.form__field textarea {
    resize: vertical;
}

.form__field input[type="text"]:focus,
.form__field input[type="email"]:focus,
.form__field input[type="password"]:focus,
.form__field textarea:focus {
    outline: 0;
    border-color: #a4cafe;
    box-shadow: 0 0 0 3px rgba(164, 202, 254, 0.45);
}

.form__field input[type="checkbox"] {
    position: absolute !important;
    overflow: hidden;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    clip: rect(0 0 0 0);
    word-wrap: normal !important;
}

.form__field input[type="checkbox"] + label {
    position: relative;
    padding-left: 2.0rem;
    display: block;
}

.form__field input[type="checkbox"] + label:before {
    border-radius: 2px;
    position: absolute;
    top: 1px;
    left: 0;
    display: block;
    width: 1.5rem;
    height: 1.5rem;
    content: "";
    cursor: pointer;
    border: 1px solid #D1D5DB;
    background-color: #fff;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 50% 50%;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.form__field input[type="checkbox"]:checked + label:before {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3E%3Cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3E%3C/svg%3E");
    background-size: 8px auto;
    background-color: var(--color-blue);
    border-color: var(--color-blue);
}

.form__field select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 2.8rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    -webkit-print-color-adjust: exact;
    color-adjust: exact;
    font-family: inherit;
    font-size: 1.4rem;
    line-height: 1.7rem;
    margin: 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 100%;
    display: block;
    padding: 1.6rem 2.3rem;
    border: 1px solid #7F7E87;
    border-radius: 0;
    background-color: #fff;
    transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 0.15s;
}

.form__field input:disabled,
.form__field textarea:disabled {
    cursor: not-allowed;
    background-color: #fafafa;
    color: #596473;
    border: 1px solid rgba(96,125,159,.25);
}


.form__field #user-photo {
    border-radius: 9999px;
}

.form__error {
    color: #771d1d;
    font-size: 1.4rem;
    background-color: #fdf2f2;
    padding: 1rem;
    margin-bottom: 1.5rem;
    list-style-type: none;
}

.form__field-description {
    padding: 0;
    margin: 0.5rem 0;
    font-size: 1.4rem;
    line-height: 1.7rem;
    font-weight: 500;
    display: block;
    color: #4B4B4B;
}

.lightswitch {
    padding: 0;
    margin: 0;
    border-radius: 1.1rem;
    height: 2.2rem;
    width: 3.4rem;
    background-image: linear-gradient(to right,#7b8793,#7b8793);
    border: none;
    cursor: pointer;
    display: block;
    overflow: hidden;
    position: relative;
    -o-transition: background-image .1s linear;
    transition: background-image .1s linear;
    -webkit-user-select: none;
    user-select: none;
    -webkit-appearance: button;
    background-color: transparent;
}

.lightswitch .lightswitch-container {
    width: 4.6rem;
    height: 100%;
    position: relative;
    margin-left: -1.2rem;
}

.lightswitch .lightswitch-container .handle {
    position: absolute;
    top: 0.1rem;
    left: calc(50% - 10px);
    width: 2rem;
    height: 2rem;
    background-color: var(--color-white);
    display: block;
    border-radius: 1rem;
}

.lightswitch.on {
    background-image: linear-gradient(to right,#20a07b,#20a07b);
}

.lightswitch.on .lightswitch-container {
    margin-left: 0rem;
}

.textarea-auto-grow {
    /* easy way to plop the elements on top of each other and have them both sized based on the tallest one's height */
    display: grid;
}
.textarea-auto-grow::after {
    /* Note the weird space! Needed to preventy jumpy behavior */
    content: attr(data-replicated-value) " ";
    /* This is how textarea text behaves */
    white-space: pre-wrap;
    /* Hidden from view, clicks, and screen readers */
    visibility: hidden;
    /* Same styles as textarea to match heigth */
    font-family: inherit;
    font-size: 1.4rem;
    line-height: 1.7rem;
    padding: 1.6rem 2.3rem;
    border: 1px solid #7F7E87;
}
.textarea-auto-grow > textarea {
    /* You could leave this, but after a user resizes, then it ruins the auto sizing */
    resize: none;
    /* Firefox shows scrollbar on growth, you can hide like this. */
    overflow: hidden;
}
.textarea-auto-grow > textarea,
.textarea-auto-grow::after {
    /* Place on top of each other */
    grid-area: 1 / 1 / 2 / 2;
}