/* Instagram-style in-app notifications */

.notif-bell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}

.notif-bell:hover,
.notif-bell.is-open,
.notif-bell:has(.notif-bell__badge:not([hidden])) {
    color: #ffd700;
}

.notif-bell:hover,
.notif-bell.is-open {
    background: rgba(255, 215, 0, 0.08);
}

.notif-bell__icon {
    width: 22px;
    height: 22px;
}

.notif-bell__badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #ed4956;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    pointer-events: none;
}

.notif-bell--admin {
    width: 32px;
    height: 32px;
    color: #333;
}

.notif-bell--admin:hover,
.notif-bell--admin.is-open {
    color: #b8860b;
    background: rgba(184, 134, 11, 0.12);
}

.mobile-actions .notif-bell {
    width: 32px;
    height: 32px;
}

.mobile-actions .notif-bell__icon {
    width: 20px;
    height: 20px;
}

.notif-panel[hidden] {
    display: none !important;
}

.notif-panel {
    position: fixed;
    inset: 0;
    z-index: 4000;
}

.notif-panel__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.notif-panel__sheet {
    position: absolute;
    top: 58px;
    right: 16px;
    width: min(420px, calc(100vw - 24px));
    max-height: min(72vh, 640px);
    display: flex;
    flex-direction: column;
    background: #121212;
    border: 1px solid rgba(255, 215, 0, 0.12);
    border-radius: 12px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
    overflow: hidden;
}

.notif-panel--admin .notif-panel__sheet {
    left: calc(20% + 12px);
    right: auto;
    top: 16px;
}

.notif-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 16px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.notif-panel__header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    text-transform: none;
}

.notif-panel__mark {
    border: none;
    background: none;
    color: #ffd700;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.notif-panel__mark:hover {
    text-decoration: underline;
}

.notif-panel__list {
    overflow-y: auto;
    flex: 1;
}

.notif-panel__empty {
    padding: 36px 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.45);
    font-size: 14px;
}

.notif-item {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    gap: 12px;
    align-items: center;
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.notif-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.notif-item.is-unread {
    background: rgba(255, 215, 0, 0.06);
}

.notif-item__avatar,
.notif-item__thumb {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    background: #1a140f;
}

.notif-item__thumb {
    border-radius: 6px;
}

.notif-item__body {
    min-width: 0;
}

.notif-item__text {
    margin: 0;
    font-size: 13px;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.88);
}

.notif-item__text strong {
    color: #fff;
    font-weight: 700;
}

.notif-item__time {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
}

.notif-item.is-unread .notif-item__time::after {
    content: "";
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-left: 8px;
    border-radius: 50%;
    background: #ffd700;
    vertical-align: middle;
}

.notif-panel__all {
    display: block;
    padding: 12px 16px;
    text-align: center;
    color: #ffd700;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.notif-panel__all:hover {
    background: rgba(255, 215, 0, 0.06);
}

.notif-page {
    max-width: 640px;
    margin: 24px auto 80px;
    padding: 0 16px;
}

.notif-page h1 {
    margin: 0 0 16px;
    font-size: 28px;
    color: #fff;
    text-transform: none;
}

.notif-panel__more {
    display: block;
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: transparent;
    color: #ffd700;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.notif-panel__more[hidden] {
    display: none;
}

.notif-panel__more:hover:not(:disabled) {
    background: rgba(255, 215, 0, 0.06);
}

.notif-panel__more:disabled {
    opacity: 0.5;
    cursor: wait;
}

.notif-page__list {
    background: #121212;
    border: 1px solid rgba(255, 215, 0, 0.1);
    border-radius: 12px;
    overflow: hidden;
}

.notif-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
}

.notif-pager a,
.notif-pager span {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    text-decoration: none;
}

.notif-pager a {
    padding: 8px 14px;
    border: 1px solid rgba(255, 215, 0, 0.25);
    border-radius: 999px;
    color: #ffd700;
}

.notif-pager a:hover {
    background: rgba(255, 215, 0, 0.08);
}

@media (max-width: 768px) {
    .notif-panel__sheet {
        top: 52px;
        right: 0;
        left: 0;
        width: 100%;
        max-height: calc(100vh - 52px);
        border-radius: 16px 16px 0 0;
    }

    .notif-panel--admin .notif-panel__sheet {
        left: 0;
        top: 0;
        max-height: 100vh;
        border-radius: 0;
    }
}
