/*! INPUT CONTAINER DIV STATES
---------------------------------------------*/

.modal-header:has(+ .modal-body .tiny_image_form) {
    border-bottom: none;
}

div:has(> .tiny_image_addurl),
.modal-body:has(> .tiny_image_form .tiny_image_insert_image) {
    display: none !important;
}

.modal-footer:has(.tiny_image_addurl) div:has(> .openimagebrowser){
    flex:none;
    max-width: 100%;

}

.modal-footer:has(.tiny_image_addurl) {
    border-top:none;
}

/*! AI CLASSIFICATION FIELD
---------------------------------------------*/

.filepicker-ai-classification {
    /* Bootstrap's .row is display:flex with the default align-items: stretch, which
       stretches the label column to match the right column's height. Once the right
       column grows (selected-help text, the explanation field), the label's own
       content ends up vertically centered in that taller box instead of sitting at
       the top like the rest of the form. Force top alignment instead. */
    align-items: flex-start;
}

.filepicker-ai-error {
    font-weight: 600;
}

.filepicker-ai-select.is-invalid,
.filepicker-ai-explanation.is-invalid {
    border-color: #dc3545;
}