/**
 * The Activities bell and its drawer (appjs/common/ux2/activityBell.js; LXP-2641, LXP-2642). The drawer itself is the
 * shared one (assets/ux2/drawer.css); here only the bell's count and the rows. Status colours: green done, red didn't
 * finish, brand working, grey waiting.
 */
.ux2-bell {
    position: relative;
    overflow: visible !important;
}

/* The count: a small red pill starting at the bell's top-right shoulder (measured from the bell, which sits centred in
   the button), so the two read as one */
.ux2-bell-count {
    position: absolute;
    top: 50%;
    left: 50%;
    margin: -15px 0 0 3px;
    min-width: 14px;
    height: 14px;
    padding: 0 3px;
    font-size: 9.5px;
    font-weight: 700;
    line-height: 14px;
    letter-spacing: -.02em;
    color: #fff;
    text-align: center;
    background: var(--ux2k-red, #c62828);
    border: 1.5px solid #fff;
    border-radius: 999px;
    box-sizing: content-box;
    pointer-events: none;
}

.ux2-bell-count[hidden] {
    display: none;
}

.ux2-bell-drawer h2 :is(i, svg) {
    margin-right: 4px;
    color: var(--ux2k-brand, #1e5f69);
}

.ux2-bell-sound {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
    font-size: 13px;
    color: var(--ux2k-ink-2, #3f4254);
    cursor: pointer;
}

.ux2-bell-sound[hidden] {
    display: none;
}

.ux2-bell-group + .ux2-bell-group {
    margin-top: 22px;
}

.ux2-bell-group h3 {
    display: flex;
    gap: 8px;
    align-items: center;
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--ux2k-muted, #6b6f85);
}

.ux2-bell-group ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

/* One row: status icon, then the title and time on one line, the result under it */
.ux2-bell-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 4px;
    border-bottom: 1px solid var(--ux2k-line, #e4e7ec);
}

.ux2-bell-item:last-child {
    border-bottom: 0;
}

.ux2-bell-ico {
    flex: none;
    margin-top: 1px;
    font-size: 18px;
    line-height: 1;
}

.ux2-bell-item.is-done .ux2-bell-ico { color: var(--ux2k-green, #147a4b); }
.ux2-bell-item.is-failed .ux2-bell-ico { color: var(--ux2k-red, #c62828); }
.ux2-bell-item.is-working .ux2-bell-ico { color: var(--ux2k-brand, #1e5f69); }
.ux2-bell-item.is-waiting .ux2-bell-ico { color: var(--ux2k-grey, #8a8fa3); }

.ux2-bell-text {
    flex: 1;
    min-width: 0;
}

.ux2-bell-top {
    display: flex;
    gap: 12px;
    align-items: baseline;
    justify-content: space-between;
}

.ux2-bell-top b {
    min-width: 0;
    overflow: hidden;
    font-size: 14px;
    font-weight: 600;
    color: var(--ux2k-ink, #14172b);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ux2-bell-top time {
    flex: none;
    font-size: 12px;
    color: var(--ux2k-muted, #6b6f85);
}

.ux2-bell-text p {
    margin: 2px 0 0;
    font-size: 13px;
    color: var(--ux2k-muted, #6b6f85);
    overflow-wrap: anywhere;
}

.ux2-bell-text a {
    font-weight: 600;
    color: var(--ux2k-brand, #1e5f69);
    text-decoration: none;
}

.ux2-bell-text a:hover {
    text-decoration: underline;
}

.ux2-bell-empty {
    padding: 48px 16px;
    text-align: center;
    color: var(--ux2k-muted, #6b6f85);
}

.ux2-bell-empty :is(i, svg) {
    display: block;
    margin-bottom: 10px;
    font-size: 28px;
    color: var(--ux2k-quiet, #b5b9c4);
}

.ux2-bell-empty b {
    display: block;
    margin-bottom: 4px;
    font-size: 15px;
    color: var(--ux2k-ink, #14172b);
}

.ux2-bell-empty p {
    max-width: 360px;
    margin: 0 auto;
    font-size: 13px;
}

/* Loading: three soft rows */
.ux2-bell-loading span {
    display: block;
    height: 44px;
    margin-bottom: 12px;
    background: linear-gradient(90deg, var(--ux2k-soft, #f6f7f9) 0, #eceef2 50%, var(--ux2k-soft, #f6f7f9) 100%) 0 0 / 200% 100%;
    border-radius: 10px;
    animation: ux2-bell-shine 1.2s linear infinite;
}

@keyframes ux2-bell-shine {
    to { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
    .ux2-bell-loading span { animation: none; }
}

.ux2-calm .ux2-bell-loading span { animation: none; }
