/**
 * TODO: re-write these to BEM. To do this, I need to figure out how to
 * change cakephp's FormHelper templates in a way that doesn't break existing functionality.
 */

form,
form fieldset {
    border: none;
    display: flex;
    flex-flow: column nowrap;
    gap: 10px;
    padding: 0;
}

label {
    font-weight: bold;
    display: block;
}

form label {
    font-weight: normal;
    color: #09222f;
}

.error-message {
    color: red;
    font-style: oblique;
}

.error-message ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.required label::after {
    color: #e32;
    content: '*';
    display: inline;
}

form .description {
    font-size: .9em;
    color: #555;
}

form.squeeze fieldset,
form.squeeze {
    display: flex;
    flex-flow: column nowrap;
    gap: 1em;
}

form.squeeze fieldset {
    border: none;
    margin: 0;
    padding: 15px 0;
}

form.squeeze fieldset legend {
    margin-left: -2px;
    font-weight: bold;
}

form.squeeze fieldset textarea {
    width: 100%;
}

form.squeeze label {
    color: #1b323f;
    white-space: nowrap;
}

form.squeeze select,
form.squeeze input {
    width: fit-content;
}

input[type=submit].disabled {
    /* Prevents the button from being clickable */
    pointer-events: none;
    /* Makes the button look disabled */
    opacity: 0.5;
}

span.input-prefix {
    font-size: .8em;
    font-family: 'Courier New', Courier, monospace;
    color: #555;
}

span:empty([class="input-prefix"]),
span:empty([class^="dt-"]) {
    display: none;
}

.input-prefix:empty {
    display: none;
}