/* Keep the checkbox, its text, and its explanation in one aligned column. */
.compat-item .imagerr-exclusion-label,
.compat-attachment-fields .imagerr-exclusion-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding-top: 8px;
    line-height: 1.5;
}

.compat-item .imagerr-exclusion-label span,
.compat-attachment-fields .imagerr-exclusion-label span {
    float: none;
    width: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    text-align: start;
    line-height: inherit;
}

.compat-item .imagerr-exclusion-label input[type="checkbox"],
.compat-attachment-fields .imagerr-exclusion-label input[type="checkbox"] {
    flex: 0 0 auto;
    margin: 2px 0 0;
}

.compat-item .imagerr-exclusion-help,
.compat-attachment-fields .imagerr-exclusion-help {
    margin: 6px 0 0 24px;
    color: #646970;
    line-height: 1.5;
}

/* Align the full attachment editor's table heading with the checkbox text. */
#post-body-content > .compat-attachment-fields .compat-field-imagerr_excluded > th,
#post-body-content > .compat-attachment-fields .compat-field-imagerr_excluded > td {
    vertical-align: top;
    padding-top: 8px;
    line-height: 1.5;
}

#post-body-content > .compat-attachment-fields .imagerr-exclusion-label {
    padding-top: 0;
}

/* Core's description spacing is intended for paragraphs, not this action. */
#imagerr-generate-metadata-wrapper .imagerr-exclusion-status,
.imagerr-generate-metadata-wrapper .imagerr-exclusion-status {
    clear: both;
    margin: 6px 0 0;
    padding: 0;
    color: #646970;
    font-size: 12px;
    line-height: 1.5;
}

#imagerr-generate-metadata-wrapper .imagerr-generate-metadata,
.imagerr-generate-metadata-wrapper .imagerr-generate-metadata {
    margin-bottom: 0;
}

@media (max-width: 782px) {
    .compat-item .imagerr-exclusion-help,
    .compat-attachment-fields .imagerr-exclusion-help {
        margin-inline-start: 33px;
    }
}

/* The media sidebar can be very narrow even on a tablet-sized screen. */
@media (max-width: 900px) {
    .compat-item .compat-field-imagerr_excluded .label,
    .compat-item .compat-field-imagerr_excluded .field {
        float: none;
        width: 100%;
        margin: 0;
        text-align: start;
    }
    .compat-item .compat-field-imagerr_excluded .label br {
        display: none;
    }
    .compat-item .compat-field-imagerr_excluded .label span {
        float: none;
        text-align: start;
        padding-inline: 0;
    }
}
