.ne-activity-organism {
    position: fixed !important;
    z-index: 100000;
    top: auto !important;
    right: auto !important;
    bottom: 0;
    left: 50% !important;
    width: 130px;
    height: 40px;
    transform: translateX(-50%);
}

.ne-activity-organism__trigger {
    display: block;
    box-sizing: border-box;
    width: 130px;
    height: 40px;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .09);
    /* border-radius: 6px; */
    background: #1b1b1b;
    /* box-shadow: inset 0 0 16px rgba(0, 0, 0, .58); */
    cursor: default;
}

.ne-activity-organism.has-controls .ne-activity-organism__trigger {
    cursor: pointer;
}

.ne-activity-organism__canvas {
    display: block;
    width: 130px;
    height: 40px;
}

body.ne-hardware-skin .ne-activity-organism__trigger {
    padding: 2px;
    border: 1px solid #080808;
    border-radius: 3px;
    background: linear-gradient(180deg, #555 0, #292929 35%, #111 100%);
    box-shadow: inset 0 1px rgba(255, 255, 255, .2), 0 1px 1px rgba(0, 0, 0, .85);
}

body.ne-hardware-skin .ne-activity-organism__canvas {
    width: 100%;
    height: 100%;
    border-radius: 1px;
    background: #0d100d;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, .82);
}

.ne-activity-organism__controls {
    position: absolute;
    z-index: 120;
    top: auto;
    bottom: 47px;
    left: 50%;
    box-sizing: border-box;
    width: 290px;
    padding: 14px;
    transform: translateX(-50%);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 12px;
    background: rgba(18, 19, 18, .97);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .38);
    color: #f1f1eb;
}

.ne-activity-organism__controls[hidden] { display: none; }
.ne-activity-organism__control-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.ne-activity-organism__explanation { margin: 0; color: rgba(255,255,255,.72); font-size: 12px; line-height: 1.45; }
.ne-activity-organism__sources { display: grid; gap: 8px; margin-top: 12px; }
.ne-activity-organism__source-head { display: flex; justify-content: space-between; gap: 8px; color: rgba(255,255,255,.66); font-size: 10px; line-height: 1.2; }
.ne-activity-organism__source-head b { color: rgba(255,255,255,.9); font-weight: 600; }
.ne-activity-organism__source-track { height: 4px; margin-top: 4px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.09); }
.ne-activity-organism__source-track i { display: block; height: 100%; border-radius: inherit; background: #1fbe84; transition: width .25s ease; }
.ne-activity-organism__controls label { display: grid; gap: 5px; margin: 0; font-size: 12px; }
.ne-activity-organism__debug-actions { display: flex; gap: 6px; margin-top: 12px; }
.ne-activity-organism__mini-button { padding: 3px 7px; border: 1px solid rgba(255,255,255,.14); border-radius: 5px; background: rgba(255,255,255,.06); color: rgba(255,255,255,.76); font: inherit; font-size: 10px; line-height: 1.2; cursor: pointer; }
.ne-activity-organism__mini-button[aria-expanded="true"] { background: rgba(255,255,255,.14); color: #fff; }
.ne-activity-organism__preview { margin-top: 10px !important; }
.ne-activity-organism__preview[hidden], .ne-activity-organism__debug[hidden] { display: none; }
.ne-activity-organism__case-buttons { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.ne-activity-organism__mini-button[aria-pressed="true"] { background: rgba(255,255,255,.14); color: #fff; }
.ne-activity-organism__controls input[type="range"] { width: 100%; }
.ne-activity-organism__debug { max-height: 150px; margin: 10px 0 0; overflow: auto; color: rgba(255,255,255,.58); font-size: 9px; line-height: 1.35; white-space: pre-wrap; }

#stats_tab.has-activity-organism { z-index: 100000; }

#stats_tab.has-activity-organism .wrap {
    display: grid;
    grid-template-columns: minmax(0, calc(50vw - 65px)) 130px minmax(0, 1fr);
    min-width: 0;
}

#stats_tab .ne-stats-data {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    gap: 2px;
}

#stats_tab .ne-stats-data > .stat {
    flex: 1 1 0;
    min-width: 0;
}

#stats_tab .ne-stats-data--right {
    justify-content: flex-end;
}

#stats_tab .ne-stats-data > .stat.ne-pagination-stat {
    flex: 0 0 104px;
    width: 104px;
}

#stats_tab .ne-pagination-slot {
    width: 104px;
    height: 100%;
}

#stats_tab .ne-pagination-slot #ne_timeline_pager {
    position: static;
    width: 104px;
    height: 100%;
    padding: 0 6px;
    border: 0;
    background: #212121;
    box-shadow: none;
    color: #d3d3d3;
}

#stats_tab .ne-pagination-slot #ne_timeline_pager .pager-arrow,
#stats_tab .ne-pagination-slot #ne_timeline_pager .pager-meta {
    color: #d3d3d3;
}

#stats_tab .ne-notification-slot {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: visible;
}

#stats_tab .ne-stats-data > .stat.ne-notification-stat {
    position: relative;
    z-index: 20;
    flex: 0 0 540px;
    width: 540px;
    max-width: none;
}

#stats_tab .ne-notification-slot #notifications {
    position: static;
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background-color: #212121;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d6d8d3' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8a6 6 0 0 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9'/%3E%3Cpath d='M10 21h4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: auto 18px;
    color: transparent;
    font-size: 0;
    opacity: 1;
}

#stats_tab .ne-notification-slot #notifications.new {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2319df75' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8a6 6 0 0 0-12 0c0 7-3 7-3 9h18c0-2-3-2-3-9'/%3E%3Cpath d='M10 21h4'/%3E%3C/svg%3E");
}

#ne_feed {
    position: absolute;
    inset: auto auto 0 0;
    display: grid;
    grid-template-columns: 40px 500px;
    width: 540px;
    height: 100%;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
}

#ne_feed.is-detached-from-stats {
    position: fixed;
    z-index: 100000;
    right: auto;
    bottom: 0;
    left: 0;
    height: 40px;
}

#ne_feed #notifications {
    position: relative !important;
    z-index: 4;
    grid-column: 1;
    display: block !important;
    visibility: visible !important;
    width: 40px !important;
    height: 100% !important;
    opacity: 1 !important;
}

#ne_feed .ne-notification-panel {
    position: absolute;
    right: 0;
    bottom: 0;
    box-sizing: border-box;
    width: 500px;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
    background: rgb(38 38 38);
    box-shadow:
        0 3px 0 rgba(38, 38, 38, .72),
        0 6px 0 rgba(38, 38, 38, .42);
    cursor: pointer;
    transition:
        height 260ms cubic-bezier(.4, 0, .2, 1),
        max-height 260ms cubic-bezier(.4, 0, .2, 1),
        box-shadow 220ms ease;
}

#ne_feed.active .ne-notification-panel {
    height: min(var(--ne-notification-expanded-height, 40px), calc(100vh - 120px));
    max-height: min(var(--ne-notification-expanded-height, 40px), calc(100vh - 120px));
    box-shadow: 0 -12px 28px rgba(0, 0, 0, .28);
    cursor: default;
}

#ne_feed.active.is-closing .ne-notification-panel {
    height: 100%;
    max-height: 100%;
    box-shadow:
        0 3px 0 rgba(38, 38, 38, .72),
        0 6px 0 rgba(38, 38, 38, .42);
}

#ne_feed ul {
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: calc(100% - 40px);
    min-height: 0;
    margin: 40px 0 0;
    padding: 0;
    overflow: hidden;
}

#ne_feed:not(.active) ul {
    height: 40px;
    margin-top: 0;
}

#ne_feed:not(.active) li {
    display: none;
}

#ne_feed:not(.active) li:first-child {
    display: grid;
}

#ne_feed li[hidden] {
    display: none;
}

.ne-notification-header {
    position: absolute;
    z-index: 2;
    top: 0;
    left: 0;
    display: none;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    box-sizing: border-box;
    width: 100%;
    height: 40px;
    padding-left: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    background: linear-gradient(180deg, #202320, #191b19);
    box-shadow: inset 0 -1px rgba(0, 0, 0, .35);
    opacity: 1;
    transform: translateY(0);
    transition: opacity 140ms ease, transform 160ms cubic-bezier(.4, 0, .2, 1);
}

#ne_feed.active .ne-notification-header {
    display: grid;
}

#ne_feed.active.is-header-closing .ne-notification-header {
    opacity: 0;
    transform: translateY(40px);
    pointer-events: none;
}

.ne-notification-header > strong {
    overflow: hidden;
    color: #d6d8d3;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .06em;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.ne-notification-pagination {
    display: grid;
    grid-template-columns: 32px 54px 32px 32px;
    align-items: center;
    box-sizing: border-box;
    width: 150px;
    height: 40px;
    border-left: 1px solid rgba(255, 255, 255, .08);
    color: #8d918d;
    text-align: center;
}

.ne-notification-pagination[hidden],
#ne_feed:not(.active) .ne-notification-pagination {
    display: none;
}

.ne-notification-pagination[hidden] + ul {
    height: 100%;
    margin-top: 0;
}

.ne-notification-pagination button {
    width: 32px;
    height: 39px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #d6d8d3;
    cursor: pointer;
    transition: background-color 140ms ease, color 140ms ease;
}

.ne-notification-pagination button:not(:disabled):hover {
    background: rgba(25, 223, 117, .1);
    color: #19df75;
}

.ne-notification-pagination button:disabled {
    opacity: .25;
    cursor: default;
}

#ne_feed.active ul:empty::after {
    content: "No notifications";
    display: block;
    box-sizing: border-box;
    padding: 25px 18px;
    color: rgba(255, 255, 255, .5);
    font-size: 12px;
    text-align: center;
}

#ne_feed.active.is-loading ul:empty::after {
    content: "Loading notifications…";
}

#ne_feed li.ne-notification-old {
    opacity: .85;
}

#ne_feed li.ne-notification-old > span {
    color: #8d918d;
}

#ne_feed .ne-notification-message {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
}

#ne_feed li.is-notification-expanded .ne-notification-message {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
}

#ne_feed .ne-notification-unread-dot {
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: #19df75;
    box-shadow: 0 0 8px rgba(25, 223, 117, .55);
}

#ne_feed .ne-notification-system-avatar {
    overflow: hidden;
    background-color: #fff;
}

#ne_feed .ne-notification-system-avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

#ne_feed .author-name {
    color: #9a9d99;
}

#ne_feed li > .avatar-wrapper {
    opacity: 0;
    transition: opacity 140ms ease;
}

#ne_feed li > .author-name {
    opacity: 1;
    transition: opacity 140ms ease;
}

#ne_feed li:hover > .avatar-wrapper {
    opacity: 1;
}

#ne_feed li:hover > .author-name {
    opacity: 0;
}

#ne_feed li.ne-notification-leaving {
    animation: neNotificationLeave 90ms ease-in forwards;
    pointer-events: none;
}

#ne_feed li.ne-notification-arriving {
    animation: neNotificationArrive 350ms cubic-bezier(.2, .8, .2, 1);
}

@keyframes neNotificationLeave {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(12px);
    }
}

@keyframes neNotificationArrive {
    0% {
        opacity: 0;
        transform: translateY(-12px);
        background-color: rgba(25, 223, 117, .14);
    }
    45% {
        opacity: 1;
        transform: translateY(0);
        background-color: rgba(25, 223, 117, .08);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        background-color: transparent;
    }
}

@media (prefers-reduced-motion: reduce) {
    #ne_feed .ne-notification-panel,
    #ne_feed .ne-notification-header,
    #ne_feed li.ne-notification-leaving,
    #ne_feed li.ne-notification-arriving {
        transition: none;
        animation: none;
    }
}

@media screen and (min-width: 1024px) {
    #ne_feed li {
        grid-template-columns: 70px 25px minmax(0, 1fr) 72px;
        align-items: center;
        box-sizing: border-box;
        width: 100%;
        height: 40px;
        padding: 4px 12px;
    }

    #ne_feed li.is-notification-expanded {
        height: auto;
        min-height: 40px;
    }

    #ne_feed li > * {
        grid-row: 1;
    }

    #ne_feed li > .ne-notification-age {
        grid-column: 1;
    }

    #ne_feed li > .ne-notification-unread-dot {
        grid-column: 2;
        justify-self: center;
    }

    #ne_feed li > div:last-child {
        grid-column: 3;
        min-width: 0;
    }

    #ne_feed li > .avatar-wrapper {
        grid-column: 4;
        justify-self: end;
    }

    #ne_feed li > .author-name {
        grid-column: 4;
        justify-self: end;
    }
}

#stats_tab .ne-activity-organism-stat {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    overflow: visible;
    background: #171917;
}

#stats_tab .ne-activity-organism-slot {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: visible;
}

#stats_tab .ne-activity-organism-slot .ne-activity-organism {
    position: absolute !important;
    top: -2px !important;
    right: auto !important;
    bottom: 0;
    left: 50% !important;
    margin: 0;
    transform: translateX(-50%);
}

@media (max-width: 767px) {
    .ne-activity-organism__controls {
        bottom: 47px;
        width: min(290px, calc(100vw - 20px));
    }
}
