/* Notifications Page Styles */

.nav-right-actions {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.top-nav-bell-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--ink);
    cursor: pointer;
    transition: all 0.2s ease;
}

.top-nav-bell-btn:hover {
    background: var(--accent-soft);
    color: var(--accent);
    border-color: var(--accent);
}

.top-nav-bell-btn .nav-notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    margin-left: 0;
}

.nav-notif-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 0.7rem;
    font-weight: 700;
    color: #ffffff;
    background: #EF4444;
    border-radius: 9px;
    margin-left: auto;
    box-shadow: 0 1px 3px rgba(239, 68, 68, 0.4);
}

.notifications-page-container {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Controls Header Bar */
.notif-controls-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.85rem;
    padding: 0.85rem 1.15rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    max-width: 100%;
    box-sizing: border-box;
}

.notif-tabs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    max-width: 100%;
    min-width: 0;
    flex: 1 1 auto;
    overflow-x: auto;
    padding-bottom: 2px;
    padding-right: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(156, 163, 175, 0.4) transparent;
    -webkit-overflow-scrolling: touch;
}

.notif-tabs::-webkit-scrollbar {
    height: 4px;
}
.notif-tabs::-webkit-scrollbar-track {
    background: transparent;
}
.notif-tabs::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.4);
    border-radius: 4px;
}

.notif-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--muted);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.notif-tab-btn:hover {
    color: var(--ink);
    background: var(--hover-bg);
}

.notif-tab-btn.active {
    color: var(--accent);
    background: var(--accent-soft);
    border-color: rgba(42, 70, 255, 0.2);
    font-weight: 600;
}

.notif-count-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.1rem 0.45rem;
    font-size: 0.725rem;
    font-weight: 600;
    border-radius: 10px;
    background: var(--accent-soft);
    color: var(--accent);
}

/* Bulk Actions */
.notif-bulk-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.btn-notif-action {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--ink-soft);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-notif-action i {
    width: 14px;
    height: 14px;
}

.btn-notif-action:hover {
    background: var(--hover-bg);
    color: var(--ink);
}

.btn-notif-action.text-danger:hover {
    background: var(--danger-soft);
    color: var(--danger);
    border-color: rgba(239, 68, 68, 0.2);
}

/* Notification Items List */
.notif-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.notif-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.15rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    cursor: pointer;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    transition: all 0.2s ease;
}

.notif-item:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.notif-item.unread {
    background: var(--accent-soft);
    border-left: 4px solid var(--accent);
}

/* Avatar & Icon Badge Overlay */
.notif-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.notif-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--surface);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.notif-badge-icon {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--surface);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.notif-badge-icon i {
    width: 11px;
    height: 11px;
}

/* Notification Body Content */
.notif-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.notif-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.notif-text {
    font-size: 0.925rem;
    color: var(--ink);
    line-height: 1.4;
}

.notif-actor-name {
    font-weight: 600;
    color: var(--ink);
}

.notif-unread-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.notif-snippet {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 0.2rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
    color: var(--ink-soft);
    background: var(--bg);
    border-left: 3px solid var(--accent);
    border-radius: 6px;
    line-height: 1.4;
}

.notif-timestamp {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 0.15rem;
}

/* Delete Button */
.btn-delete-notif {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    padding: 0;
    color: var(--muted);
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.2s ease;
}

.btn-delete-notif i {
    width: 14px;
    height: 14px;
}

.btn-delete-notif:hover {
    opacity: 1;
    color: var(--danger);
    background: var(--danger-soft);
}

/* Empty State Card */
.empty-notif-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3.5rem 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.empty-notif-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(42, 70, 255, 0.08);
    color: #2A46FF;
    margin-bottom: 1rem;
}

.empty-notif-icon i {
    width: 28px;
    height: 28px;
}

.empty-notif-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 0.35rem;
}

.empty-notif-card p {
    font-size: 0.9rem;
    color: var(--muted);
    max-width: 380px;
}

/* Post Card Highlight Flash when Navigated from Notification */
@keyframes postFlashHighlight {
    0% {
        box-shadow: 0 0 0 4px rgba(42, 70, 255, 0.5);
        background-color: rgba(42, 70, 255, 0.05);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(42, 70, 255, 0.3);
        background-color: rgba(42, 70, 255, 0.08);
    }
    100% {
        box-shadow: none;
        background-color: transparent;
    }
}

.post-card-highlight {
    animation: postFlashHighlight 2.5s ease-in-out;
    border-color: #2A46FF !important;
}

/* Mobile Responsiveness */
@media (max-width: 680px) {
    .notif-controls-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
        padding: 0.75rem;
    }
    .notif-tabs {
        width: 100%;
        flex-wrap: wrap;
        gap: 0.4rem;
        padding-bottom: 2px;
    }
    .notif-tabs [data-notif-filter="all"] {
        flex: 1 0 100%;
        width: 100%;
        justify-content: center;
    }
    .notif-tabs .notif-tab-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
        justify-content: center;
    }
    .notif-tabs .notif-tab-btn:not([data-notif-filter="all"]) {
        flex: 1 1 auto;
    }
    .notif-bulk-actions {
        width: 100%;
        justify-content: flex-start;
        gap: 0.5rem;
        border-top: 1px solid var(--border);
        padding-top: 0.65rem;
    }
    .btn-notif-action {
        flex: 1;
        justify-content: center;
        font-size: 0.775rem;
        padding: 0.45rem 0.5rem;
        white-space: nowrap;
    }
    .notif-item {
        padding: 0.85rem;
    }
}

@media (max-width: 440px) {
    .notif-tabs .notif-tab-btn:not([data-notif-filter="all"]) {
        font-size: 0.73rem;
        padding: 0.35rem 0.35rem;
        gap: 0.25rem;
    }
}
