/*
 * Keep every field label and its control in a predictable vertical rhythm.
 * This file is loaded after Bootstrap so it also covers hand-written form
 * groups outside the shared field partials.
 */
.form-field-label {
    display: flex;
    align-items: baseline;
    width: 100%;
    min-height: 1.5rem;
    margin-bottom: .5rem;
    line-height: 1.5;
}

.form-field-label > label {
    display: inline;
    min-width: 0;
    margin-bottom: 0;
}

.form-field-required,
.form-group > label + .required,
.form-group > label + .text-danger,
.form-group > label + [data-required] {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: baseline;
    margin-left: .25rem;
    color: #dc3545;
    line-height: inherit;
    white-space: nowrap;
}

/* A required marker must stay on the label line, never between the label
 * and the control. The script also moves dynamically generated markers into
 * the label; these rules keep the server-rendered fallback aligned as well.
 */
.form-group > label:not(.form-switch) {
    display: inline-flex;
    align-items: baseline;
    max-width: 100%;
    min-height: 1.5rem;
    margin-bottom: .5rem;
    line-height: 1.5;
}

.form-group > label:not(.form-switch) + br {
    display: none;
}

.form-group > label:not(.form-switch) + .required,
.form-group > label:not(.form-switch) + .text-danger,
.form-group > label:not(.form-switch) + [data-required] {
    vertical-align: baseline;
}
