.mm-mastering-notifications {
    position: relative;
    flex: 0 0 auto;
}

.mm-mastering-bell {
    position: relative;
    display: inline-grid;
    width: 2.6rem;
    height: 2.6rem;
    padding: 0;
    place-items: center;
    border: 1px solid var(--mm-border);
    border-radius: 50%;
    color: var(--mm-muted);
    background: rgba(255, 255, 255, .035);
    transition: color .16s ease, border-color .16s ease, background-color .16s ease, transform .16s ease;
}

.mm-mastering-bell:hover,
.mm-mastering-bell:focus-visible,
.mm-mastering-bell[aria-expanded="true"] {
    color: var(--mm-text);
    border-color: rgba(13, 202, 240, .55);
    background: rgba(13, 202, 240, .12);
}

.mm-mastering-bell:focus-visible {
    outline: 3px solid rgba(13, 202, 240, .3);
    outline-offset: 2px;
}

.mm-mastering-bell > i {
    font-size: 1.08rem;
    transform-origin: 50% 8%;
}

.mm-mastering-bell.is-unread {
    color: #f8d76e;
    border-color: rgba(248, 215, 110, .65);
    box-shadow: 0 0 0 0 rgba(248, 215, 110, .35);
    animation: mm-mastering-bell-pulse 1.65s ease-in-out infinite;
}

.mm-mastering-bell.is-unread > i {
    animation: mm-mastering-bell-swing 1.05s ease-in-out infinite;
}

.mm-mastering-bell__badge {
    position: absolute;
    top: -.18rem;
    right: -.22rem;
    display: grid;
    min-width: 1.15rem;
    height: 1.15rem;
    padding-inline: .24rem;
    place-items: center;
    border: 2px solid var(--mm-surface, #121820);
    border-radius: 999px;
    color: #111;
    background: #f8d76e;
    font-size: .62rem;
    font-weight: 800;
    line-height: 1;
}

.mm-mastering-notifications__panel {
    position: absolute;
    top: calc(100% + .65rem);
    right: 0;
    z-index: 1090;
    width: min(25rem, calc(100vw - 2rem));
    overflow: hidden;
    border: 1px solid var(--mm-border);
    border-radius: .9rem;
    color: var(--mm-text);
    background: rgba(15, 20, 28, .985);
    box-shadow: 0 1.25rem 3.5rem rgba(0, 0, 0, .5);
}

.mm-mastering-notifications__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .85rem .95rem;
    border-bottom: 1px solid var(--mm-border);
}

.mm-mastering-notifications__header > div {
    display: grid;
    min-width: 0;
    gap: .08rem;
}

.mm-mastering-notifications__header strong {
    font-size: .92rem;
}

.mm-mastering-notifications__header small {
    color: var(--mm-muted);
    font-size: .72rem;
}

.mm-mastering-notifications__mark-all {
    flex: 0 0 auto;
    padding: .2rem .25rem;
    color: var(--bs-info);
    font-size: .72rem;
    text-decoration: none;
}

.mm-mastering-notifications__list {
    max-height: min(29rem, calc(100vh - 7rem));
    overflow-y: auto;
    overscroll-behavior: contain;
}

.mm-mastering-notification {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 2.85rem;
    align-items: stretch;
    min-height: 4.35rem;
    border-bottom: 1px solid rgba(255, 255, 255, .065);
    color: inherit;
    transition: background-color .15s ease;
}

.mm-mastering-notification:last-child {
    border-bottom: 0;
}

.mm-mastering-notification:hover,
.mm-mastering-notification:focus-within {
    background: rgba(255, 255, 255, .065);
}

.mm-mastering-notification.is-unread {
    background: linear-gradient(90deg, rgba(13, 202, 240, .14), rgba(13, 202, 240, .035));
}

.mm-mastering-notification.is-unread::before {
    position: absolute;
    top: 50%;
    left: .25rem;
    z-index: 1;
    width: .34rem;
    height: .34rem;
    border-radius: 50%;
    content: "";
    background: var(--bs-info);
    box-shadow: 0 0 .65rem rgba(13, 202, 240, .8);
    transform: translateY(-50%);
}

.mm-mastering-notification__link {
    display: grid;
    grid-template-columns: 2.15rem minmax(0, 1fr) auto;
    gap: .7rem;
    align-items: center;
    min-width: 0;
    padding: .72rem .35rem .72rem .85rem;
    color: inherit;
    text-decoration: none;
}

.mm-mastering-notification__link:hover,
.mm-mastering-notification__link:focus-visible {
    color: inherit;
    outline: none;
}

.mm-mastering-notification__link:focus-visible,
.mm-mastering-notification__play:focus-visible {
    box-shadow: inset 0 0 0 2px rgba(13, 202, 240, .55);
}

.mm-mastering-notification__icon {
    display: grid;
    width: 2.15rem;
    height: 2.15rem;
    place-items: center;
    border-radius: .62rem;
    color: #8de4ef;
    background: rgba(13, 202, 240, .12);
}

.mm-mastering-notification__body {
    display: grid;
    min-width: 0;
    gap: .12rem;
}

.mm-mastering-notification__title {
    overflow: hidden;
    font-size: .82rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mm-mastering-notification__meta {
    overflow: hidden;
    color: var(--mm-muted);
    font-size: .7rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mm-mastering-notification__open {
    color: var(--mm-muted);
    font-size: .85rem;
}

.mm-mastering-notification__play {
    align-self: center;
    display: grid;
    width: 2.15rem;
    height: 2.15rem;
    margin-right: .55rem;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(13, 202, 240, .28);
    border-radius: 50%;
    color: #8de4ef;
    background: rgba(13, 202, 240, .08);
    font-size: 1rem;
    transition: color .15s ease, border-color .15s ease, background-color .15s ease, transform .15s ease;
}

.mm-mastering-notification__play:hover:not(:disabled) {
    color: #d9fbff;
    border-color: rgba(13, 202, 240, .65);
    background: rgba(13, 202, 240, .18);
    transform: scale(1.04);
}

.mm-mastering-notification__play:disabled {
    cursor: default;
    opacity: .35;
}

.mm-mastering-notification__play > i {
    margin-left: .08rem;
}

.mm-mastering-notifications__empty {
    padding: 1.3rem 1rem;
    color: var(--mm-muted);
    font-size: .82rem;
    text-align: center;
}

@keyframes mm-mastering-bell-swing {
    0%, 100% { transform: rotate(0deg); }
    14% { transform: rotate(18deg); }
    28% { transform: rotate(-16deg); }
    42% { transform: rotate(12deg); }
    56% { transform: rotate(-9deg); }
    70% { transform: rotate(5deg); }
}

@keyframes mm-mastering-bell-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(248, 215, 110, .28); }
    50% { box-shadow: 0 0 0 .48rem rgba(248, 215, 110, 0); }
}

@media (max-width: 575.98px) {
    .mm-mastering-notifications__panel {
        position: fixed;
        top: var(--mm-topbar-height, 4rem);
        right: .65rem;
        left: .65rem;
        width: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mm-mastering-bell,
    .mm-mastering-bell > i,
    .mm-mastering-notification,
    .mm-mastering-notification__play {
        animation: none !important;
        transition: none;
    }
}
