/* Global Django Admin Styles */

/* Help text styling - align left and make block */
.help,
.help-block,
p.help,
.helptext,
.help-text,
div.help {
    text-align: left !important;
    display: block !important;
    margin-top: 5px;
    margin-bottom: 0;
    padding-top: 2px;
    width: 100%;
}

/* Field help text */
.form-row .help,
.field-box .help,
.form-row p.help,
.field-box p.help {
    text-align: left !important;
    display: block !important;
    padding-top: 2px;
}

/* Inline help text */
.help-text,
.helptext {
    text-align: left !important;
    display: block !important;
}

/* Django admin specific help text classes */
.field-help,
.field__help {
    text-align: left !important;
    display: block !important;
}

/* Make sure help text in fieldsets is also aligned */
fieldset .help,
fieldset p.help,
fieldset .helptext {
    text-align: left !important;
    display: block !important;
}

/* Help text in form fields */
input + .help,
select + .help,
textarea + .help,
input + p.help,
select + p.help,
textarea + p.help {
    text-align: left !important;
    display: block !important;
}

/* Django admin field wrapper help */
.field-wrapper .help,
.field-wrapper p.help {
    text-align: left !important;
    display: block !important;
}

/* Fieldset descriptions */
fieldset .description,
fieldset p.description {
    text-align: left !important;
    display: block !important;
    margin-top: 5px;
    margin-bottom: 10px;
}

/* Form field help text in all contexts */
.form-row .field-box .help,
.form-row .field-box p.help,
.form-row div.help,
.field-box div.help {
    text-align: left !important;
    display: block !important;
    width: 100%;
}

/* Ensure all help divs are left-aligned */
div.help,
.help-block div,
fieldset div.help,
.form-row div.help,
.field-box div.help,
.admin-form div.help {
    text-align: left !important;
    display: block !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 2px !important;
}

/* Specific targeting for JSONField help text */
.field-mapping + .help,
#id_field_mapping + .help,
input[name="field_mapping"] + .help,
textarea[name="field_mapping"] + .help {
    text-align: left !important;
    display: block !important;
    width: 100% !important;
}

/* Override any center or right alignment */
.help[style*="text-align: center"],
.help[style*="text-align:right"],
div.help[style*="text-align: center"],
div.help[style*="text-align:right"] {
    text-align: left !important;
}

