/* Global Notification Indicators */
/* These styles are used across all pages for sidebar notifications */

.global-notification-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    min-width: 18px;
    height: 18px;
    background-color: #ef4444; /* Red */
    color: white;
    border-radius: 9px;
    border: 2px solid white;
    font-size: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: pulse-notification 2s infinite;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* Dot-only variant (no count) */
.global-notification-indicator.dot-only {
    width: 12px;
    height: 12px;
    min-width: 12px;
    border-radius: 50%;
    top: 6px;
    right: 6px;
}

/* With count variant */
.global-notification-indicator.with-count {
    padding: 0 4px;
    min-width: 18px;
    border-radius: 9px;
}

/* Pulse animation */
@keyframes pulse-notification {
    0% { 
        transform: scale(1); 
        opacity: 1; 
    }
    50% { 
        transform: scale(1.1); 
        opacity: 0.8; 
    }
    100% { 
        transform: scale(1); 
        opacity: 1; 
    }
}

/* Hover effects */
.global-notification-indicator:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Focus styles for accessibility */
.global-notification-indicator:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .global-notification-indicator {
        border-width: 3px;
        font-weight: 900;
        background-color: #dc2626;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .global-notification-indicator {
        animation: none;
    }
    
    .global-notification-indicator:hover {
        transform: none;
    }
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .global-notification-indicator {
        border-color: #1f2937;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .global-notification-indicator {
        top: 6px;
        right: 6px;
        min-width: 16px;
        height: 16px;
        font-size: 9px;
    }
    
    .global-notification-indicator.dot-only {
        width: 10px;
        height: 10px;
        min-width: 10px;
        top: 4px;
        right: 4px;
    }
}

/* Ensure parent navigation items have proper positioning */
#navigation-menu li {
    position: relative;
}

/* Smooth transitions for navigation items */
#navigation-menu li a {
    transition: all 0.2s ease;
}

/* Prevent layout shift when indicator appears */
#navigation-menu li:has(.global-notification-indicator) {
    /* This selector might not work in all browsers, fallback handled in JS */
}

/* Alternative approach for preventing layout shift */
.nav-item-with-notification {
    position: relative;
}

/* Ensure indicator doesn't interfere with text */
.global-notification-indicator {
    pointer-events: none; /* Allow clicks to pass through to the navigation link */
}

/* Make indicator clickable if needed */
.global-notification-indicator.clickable {
    pointer-events: auto;
    cursor: pointer;
}

/* Loading state for indicator */
.global-notification-indicator.loading {
    background-color: #9ca3af;
    animation: pulse-loading 1s infinite;
}

@keyframes pulse-loading {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Error state for indicator */
.global-notification-indicator.error {
    background-color: #f59e0b;
    animation: none;
}

/* Success state (when notifications are cleared) */
.global-notification-indicator.clearing {
    animation: fade-out 0.3s ease-out forwards;
}

@keyframes fade-out {
    from { 
        opacity: 1; 
        transform: scale(1); 
    }
    to { 
        opacity: 0; 
        transform: scale(0.8); 
    }
} 