/**
 * Role-based navigation styling for Greenspark Platform
 */

/* Portal Indicator Styles */
.portal-indicator {
    position: relative;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    margin-bottom: 0.5rem;
    border-left: 3px solid transparent;
}

.portal-indicator:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.portal-indicator.active-portal {
    background-color: rgba(33, 150, 83, 0.1);
    border-left: 3px solid #28a745;
    font-weight: 500;
}

/* Role-specific portal indicators */
.admin-portal-indicator {
    border-left-color: #dc3545;
}

.technician-portal-indicator {
    border-left-color: #17a2b8;
}

.customer-portal-indicator {
    border-left-color: #28a745;
}

.healthcare-staff-portal-indicator {
    border-left-color: #6610f2;
}

.admin-portal-indicator.active-portal {
    background-color: rgba(220, 53, 69, 0.1);
    border-left-color: #dc3545;
}

.technician-portal-indicator.active-portal {
    background-color: rgba(23, 162, 184, 0.1);
    border-left-color: #17a2b8;
}

.customer-portal-indicator.active-portal {
    background-color: rgba(40, 167, 69, 0.1);
    border-left-color: #28a745;
}

.healthcare-staff-portal-indicator.active-portal {
    background-color: rgba(102, 16, 242, 0.1);
    border-left-color: #6610f2;
}

/* Portal Switch Button Styles */
.portal-switch {
    transition: all 0.3s ease;
}

.portal-switch:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.portal-switch.admin-portal {
    background-color: #dc3545;
    border-color: #dc3545;
}

.portal-switch.technician-portal {
    background-color: #17a2b8;
    border-color: #17a2b8;
}

.portal-switch.customer-portal {
    background-color: #28a745;
    border-color: #28a745;
}

.portal-switch.healthcare-staff-portal {
    background-color: #6610f2;
    border-color: #6610f2;
}

/* Role badges */
.role-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

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

.role-badge-technician {
    background-color: #17a2b8;
    color: white;
}

.role-badge-customer {
    background-color: #28a745;
    color: white;
}

.role-badge-healthcare-staff {
    background-color: #6610f2;
    color: white;
}

/* Portal Navigation Icons */
.portal-nav-icon {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
    border-radius: 50%;
}

.admin-portal .portal-nav-icon {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.technician-portal .portal-nav-icon {
    background-color: rgba(23, 162, 184, 0.1);
    color: #17a2b8;
}

.customer-portal .portal-nav-icon {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.healthcare-staff-portal .portal-nav-icon {
    background-color: rgba(102, 16, 242, 0.1);
    color: #6610f2;
}

/* Portal switch toolbar */
.portal-switcher-toolbar {
    padding: 0.75rem;
    border-radius: 0.5rem;
    background-color: #f8f9fa;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 1rem;
}

/* Current portal indicator */
.current-portal-indicator {
    font-size: 0.8rem;
    padding: 0.35rem 0.65rem;
    border-radius: 1rem;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.current-portal-indicator.admin-portal {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.current-portal-indicator.technician-portal {
    background-color: rgba(23, 162, 184, 0.1);
    color: #17a2b8;
}

.current-portal-indicator.customer-portal {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.current-portal-indicator.healthcare-staff-portal {
    background-color: rgba(102, 16, 242, 0.1);
    color: #6610f2;
}

/* Navigation header for portals */
.portal-nav-header {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    margin: 1rem 0 0.5rem 0;
}

/* Portal navbar highlight */
.navbar.admin-portal-navbar {
    border-top: 3px solid #dc3545;
}

.navbar.technician-portal-navbar {
    border-top: 3px solid #17a2b8;
}

.navbar.customer-portal-navbar {
    border-top: 3px solid #28a745;
}

.navbar.healthcare-staff-portal-navbar {
    border-top: 3px solid #6610f2;
}

/* Role-specific sidebar styles */
.sidebar.admin-sidebar {
    background-color: #343a40;
}

.sidebar.technician-sidebar {
    background-color: #145d6e;
}

.sidebar.customer-sidebar {
    background-color: #1e7e34;
}

.sidebar.healthcare-staff-sidebar {
    background-color: #4805ac;
}

/* Responsive styles */
@media (max-width: 992px) {
    .portal-switcher-toolbar {
        padding: 0.5rem;
    }
    
    .portal-switch {
        padding: 0.25rem 0.5rem;
        font-size: 0.875rem;
    }
    
    .portal-indicator {
        padding: 0.25rem 0.5rem;
    }
}
/* Role-based colors */
.role-admin {
    --role-color: #0066cc;
    --role-hover: #0052a3;
}

.role-technician {
    --role-color: #28a745;
    --role-hover: #218838;
}

.role-healthcare {
    --role-color: #6f42c1;
    --role-hover: #593696;
}

.role-customer {
    --role-color: #17a2b8;
    --role-hover: #138496;
}

/* Portal navigation styling */
.portal-nav {
    position: fixed;
    top: 0;
    right: 20px;
    z-index: 1000;
    padding: 10px;
}

.portal-selector .dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
}

.portal-selector .dropdown-item i {
    width: 20px;
}

/* Role-based header styling */
[data-role="admin"] .header {
    border-bottom: 3px solid var(--role-color);
}

[data-role="technician"] .header {
    border-bottom: 3px solid var(--role-color);
}

[data-role="healthcare"] .header {
    border-bottom: 3px solid var(--role-color);
}

[data-role="customer"] .header {
    border-bottom: 3px solid var(--role-color);
}
