/* Notifications Styles */

/* ── Notification item card ── */
.notification-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    border-left: 4px solid transparent; /* overridden inline per type */
    padding: 0;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    overflow: hidden;
}

.notification-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow-medium);
    border-color: var(--border-secondary);
}

.notification-item.unread {
    background: var(--interactive-bg);
    box-shadow: 0 2px 8px var(--shadow-light);
}

/* Inner click area */
.notification-item .notif-body {
    cursor: pointer;
    padding: 16px 52px 16px 16px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

/* Icon circle */
.notif-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Text block */
.notif-text {
    flex: 1;
    min-width: 0;
}

.notif-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1.4;
}

.notif-message {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 8px;
    line-height: 1.5;
}

.notif-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    color: var(--text-muted);
}

.notif-meta i {
    margin-right: 3px;
}

.notif-link-hint {
    color: #667eea;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

/* Unread dot */
.notif-unread-dot {
    position: absolute;
    top: 14px;
    right: 48px;
    width: 8px;
    height: 8px;
    background: #dc3545;
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--bg-primary);
}

/* Delete button */
.notif-delete-btn {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    background: transparent;
    color: var(--text-muted);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    opacity: 0;
    transition: opacity 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.notification-item:hover .notif-delete-btn {
    opacity: 1;
}

.notif-delete-btn:hover {
    background: #dc3545 !important;
    color: white !important;
    border-radius: 8px;
    transform: translateY(-50%) scale(1.1);
}

/* Empty state */
.notif-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

.notif-empty i {
    font-size: 40px;
    color: var(--border-secondary);
    display: block;
    margin-bottom: 12px;
}

/* Badge pulse */
#notificationBadge {
    animation: pulse 2s infinite;
}

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

/* ── Modal overlay ── */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 16px;
}

/* ── Modal container ── */
.modal-content {
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
    box-shadow: 0 20px 60px var(--shadow-heavy);
    width: 100%;
    max-width: 560px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modal-in 0.22s ease;
}

@keyframes modal-in {
    from { opacity: 0; transform: translateY(12px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Modal header ── */
.modal-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    background: var(--bg-secondary);
}

.modal-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-header h3 i {
    color: #667eea;
}

/* Mark all read button */
.notif-mark-all-btn {
    background: var(--interactive-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.notif-mark-all-btn:hover {
    background: var(--interactive-hover);
    border-color: var(--border-secondary);
}

/* Close button */
.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s ease, color 0.2s ease;
    padding: 0;
}

.modal-close:hover {
    background: var(--interactive-hover);
    color: var(--text-primary);
}

/* ── Modal body ── */
.modal-body {
    padding: 16px;
    flex: 1;
    overflow-y: auto;
}

.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--border-secondary);
    border-radius: 3px;
}
