.rr-header__alert-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    min-height: 36px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--liquid-glass-edge) 78%, rgba(255, 255, 255, 0.08));
    background: color-mix(in srgb, var(--liquid-glass-surface) 78%, rgba(8, 16, 28, 0.12));
    color: var(--text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    -webkit-backdrop-filter: blur(calc(var(--liquid-glass-blur) * 0.85));
    backdrop-filter: blur(calc(var(--liquid-glass-blur) * 0.85));
    cursor: pointer;
}

.rr-header__alert-button:hover,
.rr-header__alert-button:focus-visible {
    outline: none;
    border-color: color-mix(in srgb, var(--accent-2) 42%, var(--liquid-glass-edge));
}

.rr-header__alert-button .bi {
    font-size: 16px;
    line-height: 1;
}

.rr-header__alert-count {
    position: absolute;
    top: -4px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    font-size: 10px;
    font-weight: 750;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--page-bg, #0d1117) 86%, transparent);
}

.alert-center-open {
    overflow: hidden;
}

.alert-center-modal {
    position: fixed;
    inset: 0;
    z-index: 2100;
    display: grid;
    justify-items: end;
    align-items: stretch;
}

.alert-center-modal.is-hidden {
    display: none;
}

.alert-center-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 10, 18, 0.48);
}

.alert-center-shell {
    position: relative;
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr) auto;
    width: min(440px, calc(100vw - 22px));
    max-height: calc(100dvh - 22px);
    margin: 11px;
    border: 1px solid color-mix(in srgb, var(--liquid-glass-edge) 82%, rgba(255, 255, 255, 0.08));
    border-radius: 24px;
    background: color-mix(in srgb, var(--liquid-glass-surface-deep) 94%, rgba(6, 14, 24, 0.24));
    box-shadow: 0 24px 80px rgba(3, 8, 19, 0.38);
    -webkit-backdrop-filter: blur(calc(var(--liquid-glass-blur) * 1.05));
    backdrop-filter: blur(calc(var(--liquid-glass-blur) * 1.05));
    overflow: hidden;
}

.alert-center-head,
.alert-center-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
}

.alert-center-head {
    border-bottom: 1px solid color-mix(in srgb, var(--liquid-glass-edge) 58%, transparent);
}

.alert-center-kicker,
.alert-center-page .eyebrow {
    margin: 0 0 3px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.alert-center-head h2,
.alert-center-page h1 {
    margin: 0;
    color: var(--text);
    font-size: 20px;
    line-height: 1.15;
}

.alert-center-head-actions {
    display: inline-flex;
    gap: 8px;
}

.alert-center-page__actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.alert-center-icon-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--surface-popup-item-edge) 78%, rgba(255, 255, 255, 0.08));
    background: color-mix(in srgb, var(--surface-popup-item-bg) 86%, rgba(255, 255, 255, 0.04));
    color: var(--text);
    cursor: pointer;
    text-decoration: none;
}

.alert-center-tabs {
    display: flex;
    gap: 8px;
    padding: 12px 16px 0;
}

.alert-center-page > .alert-center-tabs {
    padding: 0;
    margin: 0 0 16px;
}

.alert-center-tab {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid color-mix(in srgb, var(--surface-popup-item-edge) 78%, rgba(255, 255, 255, 0.08));
    background: color-mix(in srgb, var(--surface-popup-item-bg) 86%, rgba(255, 255, 255, 0.04));
    color: color-mix(in srgb, var(--text) 82%, transparent);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.alert-center-tab:is(:hover, :focus-visible),
.alert-center-tab.is-active {
    outline: none;
    color: var(--text);
    border-color: color-mix(in srgb, var(--accent-2) 42%, var(--surface-popup-item-edge));
    background: color-mix(in srgb, var(--accent-2) 12%, var(--surface-popup-item-bg));
}

.alert-center-status {
    min-height: 0;
    padding: 0 16px;
    color: var(--muted);
    font-size: 12px;
}

.alert-center-status:not(:empty) {
    padding-top: 12px;
}

.alert-center-status.is-error {
    color: #fca5a5;
}

.alert-center-list,
.alert-center-page__body {
    position: relative;
    display: grid;
    align-content: start;
    gap: 10px;
    min-height: 0;
    overflow-y: auto;
    padding: 16px;
}

.alert-center-modal.is-loading .alert-center-list > *,
.alert-center-page.is-loading .alert-center-page__body > * {
    filter: blur(3px);
    opacity: 0.48;
    pointer-events: none;
    transition: filter 140ms ease, opacity 140ms ease;
}

.alert-center-modal.is-loading .alert-center-list::after,
.alert-center-page.is-loading .alert-center-page__body::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    width: 34px;
    height: 34px;
    margin: -17px 0 0 -17px;
    border-radius: 999px;
    border: 3px solid color-mix(in srgb, var(--text) 18%, transparent);
    border-top-color: var(--accent-2);
    animation: alert-center-spin 760ms linear infinite;
}

@keyframes alert-center-spin {
    to {
        transform: rotate(360deg);
    }
}

.alert-center-item {
    display: grid;
    gap: 14px;
    padding: 14px;
    border-radius: 8px;
    border: 1px solid color-mix(in srgb, var(--surface-popup-item-edge) 78%, rgba(255, 255, 255, 0.08));
    background: color-mix(in srgb, var(--surface-popup-item-bg) 92%, rgba(255, 255, 255, 0.03));
    transform-origin: center;
    transition: opacity 180ms ease, transform 180ms ease, max-height 220ms ease, padding 220ms ease, margin 220ms ease, border-color 160ms ease, background 160ms ease;
}

.alert-center-item.is-unread {
    border-color: color-mix(in srgb, var(--accent-2) 44%, var(--surface-popup-item-edge));
}

.alert-center-item.is-highlighted {
    border-color: color-mix(in srgb, var(--accent-2) 72%, var(--surface-popup-item-edge));
    background: color-mix(in srgb, var(--accent-2) 17%, var(--surface-popup-item-bg));
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent-2) 34%, transparent), 0 14px 38px rgba(14, 165, 233, 0.18);
}

.alert-center-item.is-restoring {
    border-color: color-mix(in srgb, var(--accent-2) 18%, var(--surface-popup-item-edge));
    background: color-mix(in srgb, var(--accent-2) 5%, var(--surface-popup-item-bg));
}

.alert-center-item.is-archiving {
    max-height: 0;
    margin: 0;
    padding-top: 0;
    padding-bottom: 0;
    opacity: 0;
    transform: translateX(16px) scale(0.98);
    transition-delay: var(--alert-action-delay, 0ms);
    overflow: hidden;
}

.alert-center-item__main {
    min-width: 0;
}

.alert-center-item__top,
.alert-center-item__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.alert-center-item__kind,
.alert-center-item__category,
.alert-center-item__unread {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.alert-center-item__kind {
    background: color-mix(in srgb, var(--accent-2) 14%, transparent);
    color: color-mix(in srgb, var(--accent-2) 72%, var(--text));
}

.alert-center-item__category {
    background: color-mix(in srgb, var(--muted) 10%, transparent);
    color: var(--muted);
}

.alert-center-item__unread {
    background: rgba(220, 38, 38, 0.14);
    color: #fecaca;
    transition: opacity 160ms ease, transform 160ms ease;
}

.alert-center-item h3 {
    margin: 8px 0 0;
    color: var(--text);
    font-size: 15px;
    line-height: 1.25;
}

.alert-center-item p {
    margin: 8px 0 0;
    color: color-mix(in srgb, var(--text) 86%, transparent);
    font-size: 13px;
    line-height: 1.38;
}

.alert-center-item__target,
.alert-center-item__meta {
    margin-top: 7px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.35;
}

.alert-center-item__actions {
    justify-content: flex-start;
}

.alert-center-item__actions :is(a, button),
.alert-center-page__refresh,
.alert-center-page__settings,
.alert-center-page-link {
    min-height: 34px;
    border-radius: 999px;
    text-decoration: none;
}

.alert-center-action-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    padding: 0;
    line-height: 1;
    white-space: nowrap;
    border: 1px solid color-mix(in srgb, var(--surface-popup-item-edge) 78%, rgba(255, 255, 255, 0.08));
    background: color-mix(in srgb, var(--surface-popup-item-bg) 86%, rgba(255, 255, 255, 0.04));
    color: var(--text);
    box-shadow: none;
    transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.alert-center-action-button:is(:hover, :focus-visible),
.alert-center-action-button.primary:is(:hover, :focus-visible) {
    outline: none;
    color: var(--text);
    border-color: color-mix(in srgb, var(--accent-2) 42%, var(--surface-popup-item-edge));
    background: color-mix(in srgb, var(--accent-2) 12%, var(--surface-popup-item-bg));
    transform: translateY(-1px);
}

.alert-center-action-button--danger:is(:hover, :focus-visible) {
    border-color: rgba(239, 68, 68, 0.52);
    background: rgba(239, 68, 68, 0.12);
}

.alert-center-action-button.primary,
.alert-center-action-button.primary:visited {
    color: var(--text);
    border-color: color-mix(in srgb, var(--surface-popup-item-edge) 78%, rgba(255, 255, 255, 0.08));
    background: color-mix(in srgb, var(--surface-popup-item-bg) 86%, rgba(255, 255, 255, 0.04));
}

.alert-center-action-button .bi {
    display: block;
    font-size: 15px;
    line-height: 1;
}

.alert-center-footer {
    border-top: 1px solid color-mix(in srgb, var(--liquid-glass-edge) 58%, transparent);
}

.alert-center-tooltip {
    position: fixed;
    z-index: 9999;
    max-width: 210px;
    padding: 6px 8px;
    border-radius: 8px;
    background: color-mix(in srgb, #020617 92%, transparent);
    color: #fff;
    font-size: 11px;
    font-weight: 650;
    line-height: 1.2;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transform: translateY(4px);
    transition: opacity 120ms ease, transform 120ms ease;
}

.alert-center-tooltip.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.alert-center-empty {
    padding: 24px 14px;
    color: var(--muted);
    text-align: center;
    font-size: 13px;
}

.alert-center-page {
    width: min(980px, calc(100% - 32px));
    margin: 32px auto 48px;
}

.alert-center-page__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.alert-center-page__body {
    padding: 0;
    overflow: visible;
}

body.theme-light .rr-header__alert-button {
    color: #0f172a;
}

body.theme-light .alert-center-shell,
body.theme-light .alert-center-item {
    background: rgba(255, 255, 255, 0.92);
}

body.theme-light .alert-center-item__unread {
    color: #991b1b;
}

@media (max-width: 640px) {
    .alert-center-shell {
        width: calc(100vw - 16px);
        max-height: calc(100dvh - 16px);
        margin: 8px;
        border-radius: 20px;
    }

    .alert-center-head,
    .alert-center-footer {
        padding: 14px;
    }

    .alert-center-list,
    .alert-center-page__body {
        padding: 14px;
    }

    .alert-center-page {
        width: min(100% - 24px, 980px);
        margin-top: 20px;
    }
}
