/* ==========================================================================
   AAROGYAM INDIA - USER PERSONAL NOTIFICATION SYSTEM (MODERN & RESPONSIVE)
   ========================================================================== */

/* 1. Header Bell Icon & Badge */
.user-notif-bell-btn {
    position: relative;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #1e293b;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.user-notif-bell-btn:hover {
    background: #f1f5f9;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.user-notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 900;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    padding: 0 4px;
    border-radius: 10px;
    text-align: center;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 5px rgba(239, 68, 68, 0.4);
    animation: userNotifPulse 2s infinite ease-in-out;
}

@keyframes userNotifPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* 2. Notification Overlay & Dropdown / Drawer */
.user-notif-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.user-notif-overlay.show {
    opacity: 1;
    visibility: visible;
}

.user-notif-panel {
    position: fixed;
    top: 65px;
    right: 20px;
    width: 390px;
    max-width: calc(100vw - 30px);
    max-height: calc(100vh - 90px);
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18), 0 0 0 1px rgba(0,0,0,0.04);
    display: flex;
    flex-direction: column;
    z-index: 100000;
    overflow: hidden;
    transform: translateY(-10px) scale(0.96);
    opacity: 0;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

.user-notif-overlay.show .user-notif-panel {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* 3. Panel Header */
.user-notif-header {
    padding: 14px 18px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-notif-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-notif-title {
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}

.user-notif-unread-pill {
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 0.72rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 12px;
}

.user-notif-header-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.user-notif-btn-action {
    background: none;
    border: none;
    font-size: 0.76rem;
    font-weight: 700;
    color: #2563eb;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.15s;
}

.user-notif-btn-action:hover {
    background: #eff6ff;
}

.user-notif-btn-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #64748b;
    cursor: pointer;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 4px;
}

.user-notif-btn-close:hover {
    color: #0f172a;
    background: #e2e8f0;
}

/* 4. Filter Tabs */
.user-notif-tabs {
    display: flex;
    background: #ffffff;
    padding: 8px 12px;
    gap: 6px;
    border-bottom: 1px solid #f1f5f9;
    overflow-x: auto;
    scrollbar-width: none;
}
.user-notif-tabs::-webkit-scrollbar { display: none; }

.user-notif-tab {
    background: #f1f5f9;
    border: 1px solid transparent;
    color: #475569;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.user-notif-tab.active {
    background: #059669;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
}

/* 5. Notification Items List */
.user-notif-list {
    padding: 0;
    margin: 0;
    list-style: none;
    overflow-y: auto;
    max-height: 380px;
}

.user-notif-item {
    display: flex;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.15s;
    position: relative;
}

.user-notif-item:hover {
    background: #f8fafc;
}

.user-notif-item.unread {
    background: #f0fdf4;
}

.user-notif-item.unread::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
}

.user-notif-icon-box {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
}

.user-notif-icon-sale { background: #dcfce7; color: #15803d; }
.user-notif-icon-lead { background: #e0f2fe; color: #0369a1; }
.user-notif-icon-survey { background: #fef3c7; color: #b45309; }
.user-notif-icon-book { background: #ede9fe; color: #6d28d9; }
.user-notif-icon-alert { background: #fee2e2; color: #b91c1c; }
.user-notif-icon-broadcast { background: #fae8ff; color: #86198f; }

.user-notif-content {
    flex: 1;
}

.user-notif-item-title {
    font-size: 0.88rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 2px 0;
    line-height: 1.3;
}

.user-notif-item-desc {
    font-size: 0.78rem;
    color: #475569;
    margin: 0 0 4px 0;
    line-height: 1.4;
}

.user-notif-item-meta {
    font-size: 0.7rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Empty State */
.user-notif-empty {
    padding: 35px 20px;
    text-align: center;
    color: #64748b;
}

.user-notif-empty-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
    opacity: 0.7;
}

.user-notif-empty-text {
    font-size: 0.88rem;
    font-weight: 700;
    color: #334155;
    margin: 0 0 4px 0;
}

.user-notif-empty-sub {
    font-size: 0.76rem;
    color: #94a3b8;
    margin: 0;
}

/* 6. Top Toast Notification (Mobile & Desktop) */
.user-notif-top-toast {
    position: fixed;
    top: 15px;
    left: 50%;
    transform: translateX(-50%) translateY(-120%);
    background: #ffffff;
    border: 1.5px solid #10b981;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    padding: 12px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 100002;
    max-width: 420px;
    width: calc(100% - 30px);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.user-notif-top-toast.show {
    transform: translateX(-50%) translateY(0);
}

.user-notif-toast-icon {
    font-size: 1.5rem;
}

.user-notif-toast-body {
    flex: 1;
}

.user-notif-toast-title {
    font-size: 0.88rem;
    font-weight: 800;
    color: #065f46;
    margin: 0 0 2px 0;
}

.user-notif-toast-desc {
    font-size: 0.76rem;
    color: #334155;
    margin: 0;
}

.user-notif-toast-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #94a3b8;
    cursor: pointer;
    padding: 0 4px;
}

/* 7. Mobile Responsive Adjustments */
@media (max-width: 600px) {
    .user-notif-panel {
        top: auto;
        bottom: 0;
        right: 0;
        left: 0;
        width: 100vw;
        max-width: 100vw;
        border-radius: 20px 20px 0 0;
        max-height: 80vh;
        transform: translateY(100%);
    }

    .user-notif-overlay.show .user-notif-panel {
        transform: translateY(0);
    }
}
