.apf-notification-menu {
    position: relative;
    flex: 0 0 auto;
}

.apf-notification-trigger {
    position: relative;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    color: #f4f4f5;
    background: #151519;
    border: 1px solid #303036;
    border-radius: 14px;
    cursor: pointer;
    transition: 180ms ease;
}

.apf-notification-trigger:hover,
.apf-notification-menu.active .apf-notification-trigger {
    color: var(--beam-color);
    border-color: color-mix(in srgb, var(--beam-color) 55%, transparent);
    background: color-mix(in srgb, var(--beam-color) 11%, #151519);
}

.apf-notification-trigger-icon {
    font-size: 21px;
    line-height: 1;
    filter: grayscale(1) brightness(2);
}

.apf-notification-trigger:hover .apf-notification-trigger-icon,
.apf-notification-menu.active .apf-notification-trigger-icon {
    filter: none;
}

.apf-notification-badge,
.apf-app-notification-count {
    display: inline-grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    color: #070709;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    background: var(--beam-color);
    border-radius: 999px;
}

.apf-notification-badge {
    position: absolute;
    top: -7px;
    left: -7px;
    border: 3px solid #08080a;
}

.apf-notification-badge[hidden],
.apf-app-notification-count[hidden] {
    display: none;
}

.apf-notification-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    z-index: 100;
    width: min(390px, calc(100vw - 30px));
    padding: 12px;
    color: #f4f4f5;
    background: rgba(12, 12, 15, 0.98);
    border: 1px solid #303036;
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.98);
    transform-origin: top left;
    transition: 160ms ease;
}

.apf-notification-menu.active .apf-notification-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.apf-notification-dropdown-head,
.apf-notification-dropdown-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.apf-notification-dropdown-head {
    padding: 4px 4px 12px;
}

.apf-notification-dropdown-head strong {
    font-size: 17px;
}

.apf-notification-mark-all,
.apf-notification-dropdown-foot a {
    padding: 0;
    color: var(--beam-color);
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    background: none;
    border: 0;
    cursor: pointer;
    text-decoration: none;
}

.apf-notification-dropdown-list {
    display: grid;
    gap: 6px;
}

.apf-notification-dropdown-item {
    position: relative;
    display: grid;
    gap: 4px;
    padding: 11px 13px;
    color: #d4d4d8;
    text-decoration: none;
    background: #151519;
    border: 1px solid transparent;
    border-radius: 13px;
    transition: 160ms ease;
}

.apf-notification-dropdown-item:hover,
.apf-notification-dropdown-item.is-unread {
    color: #fff;
    border-color: color-mix(in srgb, var(--beam-color) 28%, transparent);
}

.apf-notification-dropdown-item.is-unread::before {
    position: absolute;
    top: 14px;
    right: 6px;
    width: 5px;
    height: 5px;
    background: var(--beam-color);
    border-radius: 50%;
    content: "";
}

.apf-notification-dropdown-item strong {
    padding-right: 5px;
    font-size: 13px;
}

.apf-notification-dropdown-item span {
    overflow: hidden;
    color: #a1a1aa;
    font-size: 12px;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.apf-notification-dropdown-item small {
    color: #71717a;
    font-size: 10px;
}

.apf-notification-dropdown-empty {
    padding: 30px 16px;
    color: #a1a1aa;
    text-align: center;
    background: #151519;
    border-radius: 13px;
}

.apf-notification-dropdown-foot {
    justify-content: center;
    padding: 12px 4px 2px;
}

.apf-app-card--notifications {
    position: relative;
}

.apf-app-notification-count {
    position: absolute;
    top: 18px;
    left: 18px;
    z-index: 3;
}

.apf-notifications-page {
    width: min(1120px, calc(100% - 32px));
    min-height: 58vh;
    margin: 0 auto;
    padding: 170px 0 90px;
    color: #f4f4f5;
    direction: rtl;
}

.apf-notifications-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding: 34px;
    background:
        radial-gradient(
            circle at 90% 0,
            color-mix(in srgb, var(--beam-color) 18%, transparent),
            transparent 42%
        ),
        #101014;
    border: 1px solid color-mix(in srgb, var(--beam-color) 32%, #303036);
    border-radius: 26px;
}

.apf-notifications-eyebrow {
    color: var(--beam-color);
    font-size: 13px;
    font-weight: 900;
}

.apf-notifications-hero h1 {
    margin: 7px 0;
    font-size: clamp(32px, 5vw, 54px);
}

.apf-notifications-hero p {
    margin: 0;
    color: #a1a1aa;
}

.apf-notifications-read-all {
    min-height: 45px;
    padding: 0 18px;
    color: #08080a;
    font: inherit;
    font-weight: 900;
    background: var(--beam-color);
    border: 0;
    border-radius: 14px;
    cursor: pointer;
}

.apf-notifications-flash {
    margin-top: 18px;
    padding: 14px 18px;
    color: #d1fae5;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 14px;
}

.apf-notifications-flash--error {
    color: #fecaca;
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
}

.apf-notification-filters {
    display: inline-flex;
    gap: 5px;
    margin: 24px 0 16px;
    padding: 5px;
    background: #101014;
    border: 1px solid #29292f;
    border-radius: 15px;
}

.apf-notification-filters a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 18px;
    color: #a1a1aa;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    border-radius: 11px;
}

.apf-notification-filters a.active {
    color: #08080a;
    background: var(--beam-color);
}

.apf-notification-filters a span {
    min-width: 20px;
    padding: 2px 6px;
    color: #fff;
    text-align: center;
    background: #27272a;
    border-radius: 999px;
}

.apf-notifications-list {
    display: grid;
    gap: 10px;
}

.apf-notification-row {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 12px 28px;
    align-items: center;
    gap: 14px;
    min-height: 94px;
    padding: 16px 18px;
    color: #f4f4f5;
    text-decoration: none;
    background: #101014;
    border: 1px solid #29292f;
    border-radius: 18px;
    transition: 170ms ease;
}

.apf-notification-row:hover,
.apf-notification-row.is-unread {
    border-color: color-mix(in srgb, var(--beam-color) 38%, #29292f);
}

.apf-notification-row:hover {
    transform: translateY(-2px);
    background: color-mix(in srgb, var(--beam-color) 5%, #101014);
}

.apf-notification-row-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    color: #08080a;
    font-size: 20px;
    font-weight: 900;
    background: var(--beam-color);
    border-radius: 15px;
}

.apf-notification-row-icon.is-ending {
    color: #fff;
    background: #ef4444;
}

.apf-notification-row-copy {
    display: grid;
    min-width: 0;
    gap: 5px;
}

.apf-notification-row-copy strong {
    font-size: 16px;
}

.apf-notification-row-copy > span {
    color: #a1a1aa;
    font-size: 13px;
}

.apf-notification-row-copy small {
    color: #71717a;
    font-size: 11px;
}

.apf-notification-unread-dot {
    width: 9px;
    height: 9px;
    background: var(--beam-color);
    border-radius: 50%;
    box-shadow: 0 0 12px var(--beam-color);
}

.apf-notification-row-arrow {
    color: #71717a;
    font-size: 22px;
}

.apf-notifications-empty {
    padding: 70px 22px;
    text-align: center;
    background: #101014;
    border: 1px dashed #3f3f46;
    border-radius: 22px;
}

.apf-notifications-empty > span {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin: 0 auto 16px;
    color: #08080a;
    font-size: 24px;
    font-weight: 900;
    background: var(--beam-color);
    border-radius: 18px;
}

.apf-notifications-empty h2 {
    margin: 0 0 8px;
}

.apf-notifications-empty p {
    margin: 0 0 20px;
    color: #a1a1aa;
}

.apf-notifications-empty a {
    display: inline-grid;
    place-items: center;
    min-height: 43px;
    padding: 0 18px;
    color: #08080a;
    font-weight: 900;
    text-decoration: none;
    background: var(--beam-color);
    border-radius: 13px;
}

@media (max-width: 760px) {
    .apf-notifications-page {
        width: min(100% - 20px, 1120px);
        padding-top: 125px;
    }

    .apf-notifications-hero {
        align-items: stretch;
        flex-direction: column;
        padding: 24px 20px;
    }

    .apf-notifications-read-all {
        width: 100%;
    }

    .apf-notification-row {
        grid-template-columns: 43px minmax(0, 1fr) 9px;
        gap: 11px;
        padding: 14px 12px;
    }

    .apf-notification-row-icon {
        width: 43px;
        height: 43px;
        border-radius: 13px;
    }

    .apf-notification-row-arrow {
        display: none;
    }

    .apf-notification-row-copy > span {
        display: -webkit-box;
        overflow: hidden;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
}
