/**
 * Educare Role Manager Frontend Styles
 * 
 * @package EducareRoleManager
 * @since 1.0.0
 */

/* Role-based content visibility */
.educare-role-content {
    display: block;
}

.educare-role-content.hidden {
    display: none !important;
}

/* Permission denied messages */
.educare-permission-denied {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin: 20px 0;
    text-align: center;
}

.educare-permission-denied h3 {
    margin-top: 0;
    color: #721c24;
}

.educare-permission-denied p {
    margin-bottom: 0;
}

/* Role indicator badges */
.educare-role-badge {
    display: inline-block;
    padding: 4px 8px;
    background: #f1f1f1;
    color: #333;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.educare-role-badge.administrator {
    background: #d63638;
    color: #fff;
}

.educare-role-badge.teacher {
    background: #2271b1;
    color: #fff;
}

.educare-role-badge.student {
    background: #00a32a;
    color: #fff;
}

.educare-role-badge.parent {
    background: #f56e28;
    color: #fff;
}

.educare-role-badge.staff {
    background: #8c8f94;
    color: #fff;
}

/* User profile role display */
.educare-user-role-display {
    margin: 15px 0;
    padding: 10px;
    background: #f9f9f9;
    border-left: 4px solid #2271b1;
    border-radius: 0 4px 4px 0;
}

.educare-user-role-display .role-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: #1d2327;
}

.educare-user-role-display .role-description {
    font-size: 14px;
    color: #646970;
    margin: 0;
}

/* Capability listing */
.educare-capabilities-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.educare-capabilities-list li {
    padding: 5px 0 5px 20px;
    position: relative;
    border-bottom: 1px solid #f0f0f0;
}

.educare-capabilities-list li:last-child {
    border-bottom: none;
}

.educare-capabilities-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #00a32a;
    font-weight: bold;
}

.educare-capabilities-list li.denied:before {
    content: "✗";
    color: #d63638;
}

/* Responsive role information */
.educare-role-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
}

.educare-role-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}

.educare-role-icon.administrator {
    background: #d63638;
}

.educare-role-icon.teacher {
    background: #2271b1;
}

.educare-role-icon.student {
    background: #00a32a;
}

.educare-role-icon.parent {
    background: #f56e28;
}

.educare-role-icon.staff {
    background: #8c8f94;
}

.educare-role-text {
    flex: 1;
}

.educare-role-name {
    font-weight: 600;
    color: #1d2327;
    display: block;
}

.educare-role-level {
    font-size: 12px;
    color: #646970;
}

/* Conditional content based on roles */
.educare-admin-only,
.educare-teacher-only,
.educare-student-only,
.educare-parent-only,
.educare-staff-only {
    display: none;
}

/* These classes would be dynamically added based on user role */
body.educare-admin .educare-admin-only,
body.educare-teacher .educare-teacher-only,
body.educare-teacher .educare-admin-only,
body.educare-student .educare-student-only,
body.educare-parent .educare-parent-only,
body.educare-staff .educare-staff-only {
    display: block;
}

/* Role-based navigation styling */
.educare-nav-role-restricted {
    opacity: 0.5;
    pointer-events: none;
}

.educare-nav-role-restricted:hover {
    opacity: 0.5;
}

/* Messages for role-based access */
.educare-access-message {
    padding: 12px 16px;
    margin: 15px 0;
    border-radius: 4px;
    font-size: 14px;
}

.educare-access-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #b8daff;
}

.educare-access-message.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.educare-access-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Role switching interface (if applicable) */
.educare-role-switcher {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin: 20px 0;
}

.educare-role-switcher h4 {
    margin-top: 0;
    color: #1d2327;
}

.educare-role-switcher select {
    width: 100%;
    max-width: 300px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.educare-role-switcher button {
    background: #2271b1;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
}

.educare-role-switcher button:hover {
    background: #135e96;
}

/* Dashboard role widgets */
.educare-dashboard-role-widget {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 20px;
    margin: 15px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.educare-dashboard-role-widget h3 {
    margin-top: 0;
    color: #1d2327;
    font-size: 18px;
}

.educare-dashboard-role-widget .widget-content {
    margin-top: 15px;
}

.educare-dashboard-role-widget .role-stats {
    display: flex;
    gap: 20px;
    margin-top: 15px;
}

.educare-dashboard-role-widget .stat-item {
    flex: 1;
    text-align: center;
}

.educare-dashboard-role-widget .stat-number {
    font-size: 24px;
    font-weight: bold;
    color: #2271b1;
    display: block;
}

.educare-dashboard-role-widget .stat-label {
    font-size: 12px;
    color: #646970;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Responsive design */
@media screen and (max-width: 768px) {
    .educare-role-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .educare-dashboard-role-widget .role-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .educare-role-switcher select {
        max-width: 100%;
    }
    
    .educare-capabilities-list {
        font-size: 14px;
    }
}

@media screen and (max-width: 480px) {
    .educare-role-badge {
        display: block;
        text-align: center;
        margin: 5px 0;
    }
    
    .educare-user-role-display {
        padding: 8px;
    }
    
    .educare-dashboard-role-widget {
        padding: 15px;
    }
}

/* Print styles */
@media print {
    .educare-role-switcher,
    .educare-nav-role-restricted {
        display: none !important;
    }
    
    .educare-role-badge {
        background: #f1f1f1 !important;
        color: #333 !important;
        border: 1px solid #ddd;
    }
    
    .educare-permission-denied {
        background: #f8f8f8 !important;
        color: #333 !important;
        border: 1px solid #ddd !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .educare-user-role-display {
        background: #2a2a2a;
        color: #fff;
    }
    
    .educare-user-role-display .role-title {
        color: #fff;
    }
    
    .educare-user-role-display .role-description {
        color: #ccc;
    }
    
    .educare-dashboard-role-widget {
        background: #1e1e1e;
        border-color: #3c3c3c;
        color: #fff;
    }
    
    .educare-dashboard-role-widget h3 {
        color: #fff;
    }
    
    .educare-role-switcher {
        background: #1e1e1e;
        border-color: #3c3c3c;
        color: #fff;
    }
    
    .educare-role-switcher h4 {
        color: #fff;
    }
    
    .educare-role-switcher select {
        background: #2a2a2a;
        border-color: #3c3c3c;
        color: #fff;
    }
} 