/* ═══════════════════════════════════════════════════════════
   KYNK - NOTIFICATIONS CENTER STYLES
   Phase 7 Batch 2: Complete UI styling for notification dropdown
   ═══════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════
   NOTIFICATION BADGE (on bell icon)
   ═══════════════════════════════════════════════════════════ */

#notifications-btn {
    position: relative;
}

.notifications-badge {
    position: absolute;
    top: 0;
    right: 0;
    background-color: var(--oxblood);
    color: white;
    font-size: 10px;
    font-weight: var(--font-weight-bold);
    min-width: 18px;
    height: 18px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid var(--header-bg);
    animation: pulseBadge 2s infinite;
}

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

/* ═══════════════════════════════════════════════════════════
   NOTIFICATIONS DROPDOWN PANEL
   ═══════════════════════════════════════════════════════════ */

.notifications-dropdown {
    position: fixed;
    top: 60px;
    right: 20px;
    width: 400px;
    max-height: calc(100vh - 120px);
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-color);
    z-index: var(--z-dropdown);
    display: none;
    flex-direction: column;
    opacity: 0;
    transform: translateY(-10px);
    transition: all var(--transition-base);
}

.notifications-dropdown.open {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

/* ═══ DROPDOWN HEADER ═══ */
.notifications-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-lg);
    border-bottom: 2px solid var(--border-color);
    background: linear-gradient(135deg, var(--oxblood), var(--oxblood-dark));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.notifications-header h3 {
    margin: 0;
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: white;
}

.mark-all-read-btn {
    padding: var(--spacing-xs) var(--spacing-md);
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md);
    color: white;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all var(--transition-base);
}

.mark-all-read-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.mark-all-read-btn:active {
    transform: translateY(0);
}

/* ═══ NOTIFICATIONS LIST ═══ */
.notifications-list {
    flex: 1;
    overflow-y: auto;
    max-height: calc(100vh - 160px);
}

/* ═══════════════════════════════════════════════════════════
   NOTIFICATION ITEM
   ═══════════════════════════════════════════════════════════ */

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-base);
    position: relative;
}

/* NEW: Wrapper for clickable area (excludes delete button) */
.notification-main {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    flex: 1;
    cursor: pointer;
}

.notification-item:hover {
    background-color: rgba(128, 0, 32, 0.05);
}

.notification-item:last-child {
    border-bottom: none;
}

/* Unread notification styling */
.notification-item.unread {
    background-color: rgba(128, 0, 32, 0.08);
}

.notification-item.unread:hover {
    background-color: rgba(128, 0, 32, 0.12);
}

/* ═══ NOTIFICATION ICON ═══ */
.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--oxblood-light), var(--oxblood));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.notification-item.unread .notification-icon {
    background: linear-gradient(135deg, var(--oxblood), var(--oxblood-dark));
    box-shadow: 0 0 0 3px rgba(128, 0, 32, 0.2);
}


/* ═══ NOTIFICATION CONTENT ═══ */
.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-message {
    font-size: var(--font-size-base);
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: var(--spacing-xs);
    word-wrap: break-word;
}

.notification-item.unread .notification-message {
    font-weight: var(--font-weight-semibold);
}

/* Highlight username in message */
.notification-message strong {
    color: var(--oxblood);
    font-weight: var(--font-weight-semibold);
}

.notification-time {
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
}

/* ═══ UNREAD INDICATOR (blue dot) ═══ */
.unread-indicator {
    position: absolute;
    top: 50%;
    right: var(--spacing-md);
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background-color: var(--oxblood);
    border-radius: var(--radius-full);
    animation: pulseIndicator 2s infinite;
}

@keyframes pulseIndicator {
    0%, 100% {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
    50% {
        opacity: 0.7;
        transform: translateY(-50%) scale(1.2);
    }
}

/* ═══════════════════════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════════════════════ */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-3xl) var(--spacing-xl);
    text-align: center;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 64px;
    color: var(--oxblood);
    opacity: 0.3;
    margin-bottom: var(--spacing-lg);
}

.empty-state h3 {
    font-size: var(--font-size-xl);
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.empty-state p {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════
   LOADING STATE
   ═══════════════════════════════════════════════════════════ */

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-3xl) var(--spacing-xl);
    text-align: center;
    color: var(--text-secondary);
}

.loading-state i {
    font-size: 48px;
    color: var(--oxblood);
    margin-bottom: var(--spacing-md);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.loading-state p {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    margin: 0;
}

/* ═══════════════════════════════════════════════════════════
   LOAD MORE BUTTON
   ═══════════════════════════════════════════════════════════ */

.load-more-container {
    padding: var(--spacing-md);
    border-top: 1px solid var(--border-color);
}

.load-more-btn {
    width: 100%;
    padding: var(--spacing-sm);
    background: transparent;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
}

.load-more-btn:hover {
    border-color: var(--oxblood);
    color: var(--oxblood);
    background-color: rgba(128, 0, 32, 0.05);
}

.load-more-btn:active {
    transform: scale(0.98);
}

/* ═══════════════════════════════════════════════════════════
   MOBILE RESPONSIVE
   ═══════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    /* Full-screen overlay on mobile */
    .notifications-dropdown {
        top: 60px;
        right: 0;
        left: 0;
        bottom: 60px;
        width: 100%;
        max-height: none;
        border-radius: 0;
        border: none;
        border-top: 1px solid var(--border-color);
    }

    .notifications-header {
        border-radius: 0;
    }

    .notifications-list {
        max-height: none;
        flex: 1;
    }

    .notification-item {
        padding: var(--spacing-md) var(--spacing-sm);
    }

    .notification-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .notification-message {
        font-size: var(--font-size-sm);
    }

    .notification-time {
        font-size: 11px;
    }

    .empty-state i {
        font-size: 48px;
    }

    .empty-state h3 {
        font-size: var(--font-size-lg);
    }

    .empty-state p {
        font-size: var(--font-size-sm);
    }
}

/* ═══════════════════════════════════════════════════════════
   DROPDOWN BACKDROP (click outside to close)
   ═══════════════════════════════════════════════════════════ */

.notifications-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: transparent;
    z-index: calc(var(--z-dropdown) - 1);
    display: none;
}

.notifications-backdrop.active {
    display: block;
}

/* ═══════════════════════════════════════════════════════════
   DARK MODE ADJUSTMENTS
   ═══════════════════════════════════════════════════════════ */

body.dark-mode .notifications-badge {
    border-color: var(--dark-header);
}

body.dark-mode .notifications-dropdown {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* ═══════════════════════════════════════════════════════════
   SCROLL STYLING (for notification list)
   ═══════════════════════════════════════════════════════════ */

/* Already hidden by global scrollbar styles, but ensure smooth scrolling */
.notifications-list {
    scroll-behavior: smooth;
}

/* ═══════════════════════════════════════════════════════════
   ANIMATION DELAYS (stagger effect for notifications)
   ═══════════════════════════════════════════════════════════ */

.notification-item {
    animation: slideInNotification 0.3s ease forwards;
    opacity: 0;
}

@keyframes slideInNotification {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Stagger animation for multiple items */
.notification-item:nth-child(1) { animation-delay: 0.05s; }
.notification-item:nth-child(2) { animation-delay: 0.1s; }
.notification-item:nth-child(3) { animation-delay: 0.15s; }
.notification-item:nth-child(4) { animation-delay: 0.2s; }
.notification-item:nth-child(5) { animation-delay: 0.25s; }

/* After 5th item, no more delay */
.notification-item:nth-child(n+6) { animation-delay: 0.3s; }

/* ═══════════════════════════════════════════════════════════
   DELETE BUTTON (Batch 6 Task 2)
   ═══════════════════════════════════════════════════════════ */

.notification-delete-btn {
    position: relative;
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    flex-shrink: 0;
    opacity: 0;
}

/* Show delete button on hover */
.notification-item:hover .notification-delete-btn {
    opacity: 1;
}

/* Delete button hover state */
.notification-delete-btn:hover {
    background-color: rgba(220, 53, 69, 0.1);
    border-color: var(--danger);
    color: var(--danger);
    transform: scale(1.1);
}

/* Delete button active state */
.notification-delete-btn:active {
    transform: scale(0.95);
}

/* Mobile: Always show delete button (no hover) */
@media (max-width: 768px) {
    .notification-delete-btn {
        opacity: 1;
    }
}

/* ═══════════════════════════════════════════════════════════
   NOTIFICATION ACTIONS (Follow Request Approve/Reject)
   ═══════════════════════════════════════════════════════════ */

.notification-actions {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid var(--border-color);
    margin-top: 8px;
}

.notification-actions .btn-approve,
.notification-actions .btn-reject {
    flex: 1;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.notification-actions .btn-approve {
    background-color: var(--oxblood);
    color: white;
}

.notification-actions .btn-approve:hover {
    background-color: var(--oxblood-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.notification-actions .btn-reject {
    background-color: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.notification-actions .btn-reject:hover {
    background-color: var(--body-bg);
    color: var(--text-primary);
    border-color: var(--text-secondary);
    transform: translateY(-1px);
}