/* Access Level Switching Bar Styles */
.access-level-bar {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-bottom: 2px solid #dee2e6;
  padding: 0.75rem 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 1040;
}

.access-level-bar .container-fluid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

/* School Context Bar Styles */
.school-context-bar {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  border-bottom: 2px solid #90caf9;
  padding: 0.75rem 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 1039;
}

.school-context-bar .container-fluid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.school-context-bar .label {
  font-weight: 600;
  color: #1565c0;
  font-size: 0.9rem;
  margin: 0;
  text-align: center;
}

.school-context-bar .btn-select {
  width: 100%;
  text-align: left;
  border: 2px solid #90caf9;
  background: white;
  color: #1565c0;
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  transition: all 0.2s ease;
}

.school-context-bar .btn-select:hover:not(:disabled) {
  background: #e3f2fd;
  border-color: #42a5f5;
  color: #0d47a1;
}

.school-context-bar .btn-select:disabled {
  background: #f5f5f5;
  border-color: #ccc;
  color: #999;
  cursor: not-allowed;
}

.school-context-bar #school-context-status {
  color: #1565c0;
  font-weight: 500;
}

.school-context-bar #school-context-status.selected {
  color: #2e7d32;
  font-weight: 600;
}

.access-level-bar .label {
  font-weight: 600;
  color: #495057;
  font-size: 0.9rem;
  margin: 0;
}

.access-level-bar .label.text-warning {
  color: #856404 !important;
  font-weight: 700;
}

.access-level-bar .current-level {
  background: #007bff;
  color: white;
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  font-weight: 500;
  font-size: 0.875rem;
  min-width: 120px;
  text-align: center;
}

.access-level-bar .current-level.text-warning {
  background: #ffc107;
  color: #212529;
  border: 2px solid #ffca2c;
  animation: pulse-warning 2s infinite;
}

@keyframes pulse-warning {
  0% { background-color: #ffc107; }
  50% { background-color: #ffca2c; }
  100% { background-color: #ffc107; }
}

.access-level-bar .current-level.switched {
  background: #28a745;
  animation: pulse 2s infinite;
}

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

.access-level-bar .dropdown {
  position: relative;
}

.access-level-bar .btn-switch {
  background: #6c757d;
  color: white;
  border: none;
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.access-level-bar .btn-switch:hover {
  background: #5a6268;
  transform: translateY(-1px);
}

.access-level-bar .btn-reset {
  background: #dc3545;
  color: white;
  border: none;
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.access-level-bar .btn-reset:hover {
  background: #c82333;
  transform: translateY(-1px);
}

.access-level-bar .dropdown-menu {
  margin-top: 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid #dee2e6;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  max-height: 300px;
  overflow-y: auto;
}

.access-level-bar .dropdown-item {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.access-level-bar .dropdown-item:hover {
  background: #f8f9fa;
  color: #007bff;
}

.access-level-bar .dropdown-item.active {
  background: #007bff;
  color: white;
}

.access-level-bar .dropdown-item.active:hover {
  background: #0056b3;
}

.access-level-bar .level-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: #6c757d;
}

.access-level-bar .level-badge {
  background: #e9ecef;
  color: #495057;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.access-level-bar .notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #28a745;
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 1050;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease;
}

.access-level-bar .notification.show {
  opacity: 1;
  transform: translateX(0);
}

.access-level-bar .notification.error {
  background: #dc3545;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .access-level-bar .container-fluid {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .access-level-bar .level-info {
    text-align: center;
  }
}

/* Loading state */
.access-level-bar .loading {
  opacity: 0.6;
  pointer-events: none;
}

.access-level-bar .spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 0.5rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}