/* Role-based Navigation Styles */

/* User Info Dropdown */
.user-info {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.user-info:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.user-name {
    color: white;
    font-weight: 500;
    font-size: 14px;
}

.user-info i {
    color: white;
    font-size: 20px;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 8px;
}

.user-info.active .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown a {
    display: block;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.user-dropdown a:last-child {
    border-bottom: none;
}

.user-dropdown a:hover {
    background-color: #f8f9fa;
    color: var(--bhc-red, #c41e3a);
}

.user-dropdown a:first-child {
    border-radius: 8px 8px 0 0;
}

.user-dropdown a:last-child {
    border-radius: 0 0 8px 8px;
}

/* Dashboard Link Styling */
.dashboard-link {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.dashboard-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* Mobile Navigation Enhancements */
.mobile-logout-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 16px;
    width: 100%;
}

.mobile-logout-btn:hover {
    background: #c82333;
}

/* Role-based Element Visibility */
.admin-only,
.assistant-only {
    display: none;
}

/* Navigation Responsive Adjustments */
@media (max-width: 768px) {
    .user-info {
        display: none; /* Hide desktop user info on mobile */
    }
    
    .dashboard-link {
        display: none; /* Hide desktop dashboard link on mobile */
    }
}

/* Loading States */
.nav-loading {
    opacity: 0.6;
    pointer-events: none;
}

.nav-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Enhanced Mobile Menu */


/* User Status Indicator */
.user-status {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #28a745;
    border-radius: 50%;
    margin-left: 8px;
    position: relative;
}

.user-status.offline {
    background: #6c757d;
}

.user-status.busy {
    background: #ffc107;
}

/* Navigation Breadcrumbs */
.nav-breadcrumb {
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    margin-left: 16px;
}

/* Role Badge */
.role-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 8px;
}

.role-badge.admin {
    background: #dc3545;
}

.role-badge.assistant {
    background: #17a2b8;
}

.role-badge.faculty {
    background: #28a745;
}

.role-badge.student {
    background: #007bff;
}

.role-badge.non-teaching {
    background: #6f42c1;
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Quick Actions Menu */
.quick-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-right: 16px;
}

.quick-action-btn {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.3s ease;
    position: relative;
}

.quick-action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Accessibility Improvements */
.nav-link:focus,
.mobile-nav-link:focus,
.user-info:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .user-dropdown {
        background: #2d3748;
        border: 1px solid #4a5568;
    }
    
    .user-dropdown a {
        color: #e2e8f0;
        border-bottom-color: #4a5568;
    }
    
    .user-dropdown a:hover {
        background-color: #4a5568;
        color: white;
    }
}

/* Animation for role transitions */
.role-transition {
    transition: all 0.5s ease;
}

.role-transition.changing {
    opacity: 0.5;
    transform: scale(0.98);
}

/* Service card role-based styling */
.service-card.role-restricted {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}

.service-card.role-restricted::after {
    content: 'Access Restricted';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}