/* daisyUI keeps labels on one line, which makes a long label overflow narrow containers like modals */
.label {
    white-space: normal;
}

/* Use warning color for invalid fields, matching the app theme */
.field_with_errors input,
.field_with_errors select,
.field_with_errors textarea {
    color: var(--color-error-content);
    border-color: var(--color-error-content) !important;
}

/* Do not tint the placeholder when field has errors */
.field_with_errors input::placeholder,
.field_with_errors textarea::placeholder {
    color: revert;
}

/* iOS Safari zooms into a field whose text is smaller than 16px, and the page stays
   zoomed and scrolls sideways afterwards */
@media (max-width: 767px) {
    input:where(:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"])),
    select,
    textarea {
        font-size: 1rem;
    }

    .input-lg,
    .select-lg,
    .textarea-lg {
        font-size: 1.125rem;
    }
}
