/* Move the add-tag button to the left of the available tags and materials boxes */
.field-tags .related-widget-wrapper,
.field-materials .related-widget-wrapper {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 0.5rem;
}
/* Era (BCE/CE) selectors sit beside their year field, so their own label is
   hidden visually but kept for screen readers. */
.aligned .fieldBox[class*="year_era"] > label {
    position: absolute;
    width: 1px;
    min-width: 0;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Keep a year field's help text from widening its column, so the era
   selector stays right next to the year input; the text wraps instead. */
.form-multiline > div:has(> .fieldBox[class*="year_value"]) > .help {
    contain: inline-size;
}

/* Make the "clear selection" control on autocomplete fields (e.g. Parent
   culture) easy to find; it empties the field and does not delete anything. */
.select2-container--admin-autocomplete .select2-selection--single .select2-selection__clear {
    font-size: 1.1em;
    color: var(--error-fg, #ba2121);
    padding: 0 4px;
}
.select2-container--admin-autocomplete .select2-selection--single .select2-selection__clear::after {
    content: " Clear";
    font-size: 0.8em;
    font-weight: normal;
}
