/* Main Site Navigation Styling */
.navbar.bg-primary {
    background-color: #4B9CD3 !important; /* Carolina Blue */
}

.navbar-dark .navbar-brand,
.navbar-dark .navbar-nav .nav-link,
.navbar-dark .navbar-toggler-icon {
    color: #ffffff !important;
}

.navbar-dark .navbar-brand:hover,
.navbar-dark .navbar-brand:focus,
.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus {
    color: #f8f9fa !important;
}

/* Real-time Change Detection Notifications */

#change-notifications {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    max-width: 400px;
}

.change-notification {
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: none;
    transition: all 0.3s ease;
}

.change-notification:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.change-notification .toast-header {
    background: linear-gradient(45deg, #007bff, #0056b3);
    color: white;
    border-bottom: none;
}

.change-notification .toast-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

.change-notification .avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.change-notification .toast-body {
    padding: 1rem;
}

.change-notification .btn-group {
    gap: 0.5rem;
}

.change-notification .btn-sm {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
}

/* Animation for new notifications */
.change-notification.show {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animation for dismissing notifications */
.change-notification.dismissing {
    animation: slideOutRight 0.3s ease-in;
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Different styles for notification types */
.change-notification.notification-single .toast-header {
    background: linear-gradient(45deg, #28a745, #1e7e34);
}

.change-notification.notification-batch .toast-header {
    background: linear-gradient(45deg, #17a2b8, #138496);
}

.change-notification.notification-urgent .toast-header {
    background: linear-gradient(45deg, #ffc107, #e0a800);
    color: #212529;
}

.change-notification.notification-urgent .btn-close {
    filter: none;
}

/* Active users indicator */
.active-users-indicator {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 123, 255, 0.1);
    border: 1px solid rgba(0, 123, 255, 0.2);
    border-radius: 20px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    color: #007bff;
}

.active-users-indicator .fas {
    margin-right: 0.5rem;
    animation: pulse 2s infinite;
}

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

/* Mobile responsiveness */
@media (max-width: 576px) {
    #change-notifications {
        top: 0.5rem;
        right: 0.5rem;
        left: 0.5rem;
        max-width: none;
    }
    
    .change-notification {
        margin-bottom: 0.5rem;
    }
    
    .change-notification .btn-group {
        flex-direction: column;
    }
    
    .change-notification .btn-group .btn {
        margin-bottom: 0.25rem;
    }
}

/* Loading states */
.change-notification .btn.loading {
    position: relative;
    color: transparent;
}

.change-notification .btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
