/*
 * Styles for core_admin/js/translation_tab_errors.js: the error flag on modeltranslation
 * language tabs and the "Errors in translated fields" list under Unfold's error note.
 * Loaded globally via UNFOLD["STYLES"] (core default); inert on pages without those elements.
 */

/*
 * Errored language tab: red label + red dot, keeping Unfold's pill styling. Core STYLES load
 * before Unfold's styles.css and modeltranslation's CSS, so these selectors carry `body` + the
 * .ui-tab-has-errors class to out-specify them (e.g. Unfold's `li.ui-tabs-active a`).
 */
body .ui-tabs.ui-widget .ui-tabs-nav li.ui-tab-has-errors a,
body .ui-tabs.ui-widget .ui-tabs-nav li.ui-tab-has-errors a:hover {
    color: #dc2626;
}

body .ui-tabs.ui-widget .ui-tabs-nav li.ui-tab-has-errors a::after {
    content: "";
    position: static;
    display: inline-block;
    width: 0.375rem;
    height: 0.375rem;
    margin-left: 0.375rem;
    border-radius: 9999px;
    background: #ef4444;
    font-size: 0;
}

.dark body .ui-tabs.ui-widget .ui-tabs-nav li.ui-tab-has-errors a {
    color: #f87171;
}

.mt-tab-error-summary {
    margin: -0.5rem 0 1rem;
    padding: 0.625rem 0.75rem;
    border-radius: 0.375rem;
    background: #fee2e2;
    color: #b91c1c;
    font-size: 0.875rem;
    line-height: 1.4;
}

.mt-tab-error-summary p {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.mt-tab-error-summary ul {
    list-style: disc;
    padding-left: 1.25rem;
}

.mt-tab-error-summary a {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
}

.dark .mt-tab-error-summary {
    background: rgb(239 68 68 / 0.2);
    color: #f87171;
}
